Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Buffs trashbags #3817

Merged
merged 2 commits into from
Jul 19, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 14 additions & 10 deletions code/game/objects/items/storage/bags.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Loading