diff --git a/code/game/objects/items/weapons/storage/bags.dm b/code/game/objects/items/weapons/storage/bags.dm index ef2d2260121..705908d9a78 100644 --- a/code/game/objects/items/weapons/storage/bags.dm +++ b/code/game/objects/items/weapons/storage/bags.dm @@ -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, "You can't seem to fit [I] into [src].") + 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("[user] puts [src] over [user.p_their()] head and starts chomping at the insides! Disgusting!") playsound(loc, 'sound/items/eatfood.ogg', 50, 1, -1)