From ee24e1d12fc4a2d02e0b741c93089325a7ec35c6 Mon Sep 17 00:00:00 2001 From: John Doe Date: Wed, 5 Jul 2023 12:49:29 -0700 Subject: [PATCH 1/2] makes bags less shit --- code/game/objects/items/storage/bags.dm | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index f0a235b2301f..3083ae68e2f3 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -30,25 +30,23 @@ item_state = "trashbag" w_class = SIZE_LARGE - max_w_class = SIZE_SMALL + max_w_class = SIZE_MEDIUM storage_slots = 21 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) + if(length(contents) == 0) icon_state = "trashbag0" - else if(contents.len < 12) + else if(length(contents) < 12) icon_state = "trashbag1" - else if(contents.len < 21) + else if(length(contents) < 21) icon_state = "trashbag2" else icon_state = "trashbag3" -/obj/item/storage/bag/trash/open(mob/user) - return - // ----------------------------- // Plastic Bag // ----------------------------- @@ -183,7 +181,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 From a76b4323e403b35c586a96e9c33c273cd5422e49 Mon Sep 17 00:00:00 2001 From: John Doe Date: Mon, 17 Jul 2023 03:14:27 -0700 Subject: [PATCH 2/2] morrow changes --- code/game/objects/items/storage/bags.dm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/code/game/objects/items/storage/bags.dm b/code/game/objects/items/storage/bags.dm index 3083ae68e2f3..c86003b251da 100644 --- a/code/game/objects/items/storage/bags.dm +++ b/code/game/objects/items/storage/bags.dm @@ -31,7 +31,8 @@ w_class = SIZE_LARGE max_w_class = SIZE_MEDIUM - storage_slots = 21 + 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) @@ -39,13 +40,18 @@ flags_equip_slot = NONE /obj/item/storage/bag/trash/update_icon() - if(length(contents) == 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(length(contents) < 12) + else if(sum_storage_cost < round(max_storage_space * 0.35)) icon_state = "trashbag1" - else if(length(contents) < 21) + else if(sum_storage_cost < round(max_storage_space * 0.7)) icon_state = "trashbag2" - else icon_state = "trashbag3" + else + icon_state = "trashbag3" // ----------------------------- // Plastic Bag