Empty trashbags can now fit inside backpacks. (#21888)

* i think this is workin

* sillly me

* also this guh
This commit is contained in:
1080pCat
2023-08-16 20:31:04 +01:00
committed by GitHub
parent 4b25db5a5d
commit d1d0effa0a
@@ -42,6 +42,31 @@
can_hold = list() // any
cant_hold = list(/obj/item/disk/nuclear)
/obj/item/storage/bag/trash/proc/update_weight()
if(!length(contents))
w_class = WEIGHT_CLASS_NORMAL
return
w_class = WEIGHT_CLASS_BULKY
/obj/item/storage/bag/trash/remove_from_storage(obj/item/I, atom/new_location)
. = ..()
update_weight()
/obj/item/storage/bag/trash/can_be_inserted(obj/item/I, stop_messages = FALSE)
if(isstorage(loc) && !istype(loc, /obj/item/storage/backpack/holding))
to_chat(usr, "<span class='warning'>You can't seem to fit [I] into [src].</span>")
return FALSE
. = ..()
/obj/item/storage/bag/trash/Initialize(mapload)
. = ..()
update_weight()
/obj/item/storage/bag/trash/handle_item_insertion(obj/item/I, prevent_warning)
. = ..()
update_weight()
/obj/item/storage/bag/trash/suicide_act(mob/user)
user.visible_message("<span class='suicide'>[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!</span>")
playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)