mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-02-03 12:50:36 +00:00
88 lines
2.4 KiB
Plaintext
88 lines
2.4 KiB
Plaintext
// -----------------------------
|
|
// Laundry Basket
|
|
// -----------------------------
|
|
// An item designed for hauling the belongings of a character.
|
|
// So this cannot be abused for other uses, we make it two-handed and inable to have its storage looked into.
|
|
/obj/item/weapon/storage/laundry_basket
|
|
name = "laundry basket"
|
|
icon = 'icons/obj/janitor.dmi'
|
|
icon_state = "laundry-empty"
|
|
item_state_slots = list(slot_r_hand_str = "laundry", slot_l_hand_str = "laundry")
|
|
desc = "The peak of thousands of years of laundry evolution."
|
|
|
|
w_class = ITEMSIZE_HUGE
|
|
max_w_class = ITEMSIZE_LARGE
|
|
max_storage_space = ITEMSIZE_COST_NORMAL * 8
|
|
storage_slots = 20
|
|
use_to_pickup = 1
|
|
allow_quick_empty = 1
|
|
allow_quick_gather = 1
|
|
collection_mode = 1
|
|
var/linked
|
|
|
|
|
|
/obj/item/weapon/storage/laundry_basket/attack_hand(mob/living/user as mob)
|
|
if(ishuman(user))
|
|
var/mob/living/carbon/human/H = user
|
|
var/obj/item/organ/external/temp = H.get_organ("r_hand")
|
|
if (user.hand)
|
|
temp = H.get_organ("l_hand")
|
|
if(!temp)
|
|
user << "<span class='warning'>You need two hands to pick this up!</span>"
|
|
return
|
|
|
|
if(user.get_inactive_hand())
|
|
user << "<span class='warning'>You need your other hand to be empty</span>"
|
|
return
|
|
return ..()
|
|
|
|
/obj/item/weapon/storage/laundry_basket/attack_self(mob/user as mob)
|
|
var/turf/T = get_turf(user)
|
|
user << "<span class='notice'>You dump the [src]'s contents onto \the [T].</span>"
|
|
return ..()
|
|
|
|
/obj/item/weapon/storage/laundry_basket/pickup(mob/user)
|
|
var/obj/item/weapon/storage/laundry_basket/offhand/O = new(user)
|
|
O.name = "[name] - second hand"
|
|
O.desc = "Your second grip on the [name]."
|
|
O.linked = src
|
|
user.put_in_inactive_hand(O)
|
|
linked = O
|
|
return
|
|
|
|
/obj/item/weapon/storage/laundry_basket/update_icon()
|
|
if(contents.len)
|
|
icon_state = "laundry-full"
|
|
else
|
|
icon_state = "laundry-empty"
|
|
return
|
|
|
|
|
|
/obj/item/weapon/storage/laundry_basket/MouseDrop(obj/over_object as obj)
|
|
if(over_object == usr)
|
|
return
|
|
else
|
|
return ..()
|
|
|
|
/obj/item/weapon/storage/laundry_basket/dropped(mob/user as mob)
|
|
qdel_null(linked)
|
|
return ..()
|
|
|
|
/obj/item/weapon/storage/laundry_basket/show_to(mob/user as mob)
|
|
return
|
|
|
|
/obj/item/weapon/storage/laundry_basket/open(mob/user as mob)
|
|
|
|
|
|
//Offhand
|
|
/obj/item/weapon/storage/laundry_basket/offhand
|
|
icon = 'icons/obj/weapons.dmi'
|
|
icon_state = "offhand"
|
|
name = "second hand"
|
|
use_to_pickup = 0
|
|
|
|
/obj/item/weapon/storage/laundry_basket/offhand/dropped(mob/user as mob)
|
|
user.drop_from_inventory(linked)
|
|
return
|
|
|