diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index f0a235b2301f..c86003b251da 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -30,24 +30,28 @@ item_state = "trashbag" w_class = SIZE_LARGE - max_w_class = SIZE_SMALL - storage_slots = 21 + max_w_class = SIZE_MEDIUM + storage_slots = null + max_storage_space = 21 //equivalent to an IMP backpack can_hold = list() // any cant_hold = list(/obj/item/disk/nuclear, /obj/item/weapon/throwing_knife) storage_flags = STORAGE_GATHER_SIMULTAENOUSLY|STORAGE_QUICK_GATHER|STORAGE_CLICK_GATHER + flags_equip_slot = NONE /obj/item/storage/bag/trash/update_icon() - if(contents.len == 0) + var/sum_storage_cost = 0 + for(var/obj/item/item in contents) + sum_storage_cost += item.get_storage_cost() + + if(!sum_storage_cost) icon_state = "trashbag0" - else if(contents.len < 12) + else if(sum_storage_cost < round(max_storage_space * 0.35)) icon_state = "trashbag1" - else if(contents.len < 21) + else if(sum_storage_cost < round(max_storage_space * 0.7)) icon_state = "trashbag2" - else icon_state = "trashbag3" - -/obj/item/storage/bag/trash/open(mob/user) - return + else + icon_state = "trashbag3" // ----------------------------- // Plastic Bag @@ -183,7 +187,7 @@ //Turned numbered display on. Appears to work as intended, despite above comment -- Vanagandr. /obj/item/storage/bag/sheetsnatcher/orient2hud() - var/adjusted_contents = contents.len + var/adjusted_contents = length(contents) //Numbered contents display var/list/datum/numbered_display/numbered_contents