Shuffle around fancy storage code, fix some stuff, minor changes (#91316)

## About The Pull Request

So this is all because of a leftover bit making all fancy holders set
their `max_slots` to the `spawn_count`, which of course would override
the custom storage datums.

https://github.com/tgstation/tgstation/blob/526e006583eee95d809b4062938072f78974ed78/code/game/objects/items/storage/fancy.dm#L33-L36
This just moves all of the fancy storage items away from
auto-calculating storage based on those vars entirely, making new
storage datums for all of the ones which didn't have one yet.
We also move this out of the misc file, because a misc file is
meaningless if everything together makes it bloated.

We also do some minor fixes and changes.
- The pickle jar could only hold seven small items, even though it'd
take ten pickles, so we make it hold ten small items.
- Coffee cartridge racks started with the sprite for 4 of them, so we
make it start with the sprite for 1 of them.
- Nugget fish in the bugget box :)
- We make a few of the visual storages with even amounts above 7 split
their storage up into two even rows, so their UI actually looks full
when full.
## Why It's Good For The Game

Less jank good 👍 

It feels kinda awkward when you have a full box of stuff, visually full
of stuff, and the storage UI is for a significant portion empty- but you
can't put in more.
This makes it so the full storage UI actually matches the object looking
full.

It's funny if Fryish, the nugget fish, can be stored in a nugget box.
## Changelog
🆑
balance: Egg boxes' storage UI is now 6 slots wide, such that it
contains an even dozen slots when full.
balance: The storage UIs for heart-shaped chocolate boxes, pickle jars,
and rolling paper packs are now 4, 5, and 5 slots wide respectively,
such that they fill the whole storage UI when full.
balance: Fryish and its fried snack cousins can now be stored in nugget
boxes.
fix: Pickle jars can actually hold the ten pickles they spawn with.
fix: Fertile egg boxes, coffee condiment displays, and coffee cart racks
have the right amount of slots.
fix: Coffee cart racks spawn with the sprite for holding 1 cartridge
like they do, rather than looking like they're holding 4 cartridges.
/🆑
This commit is contained in:
_0Steven
2025-05-25 12:27:08 +03:00
committed by GitHub
parent feffb52100
commit 8101de5c3f
5 changed files with 127 additions and 78 deletions
+6 -14
View File
@@ -30,11 +30,6 @@
/// Whether it supports open and closed state icons.
var/has_open_closed_states = TRUE
/obj/item/storage/fancy/Initialize(mapload)
. = ..()
atom_storage.max_slots = spawn_count
/obj/item/storage/fancy/PopulateContents()
if(!spawn_type)
return
@@ -103,7 +98,7 @@
appearance_flags = KEEP_TOGETHER|LONG_GLIDE
custom_premium_price = PAYCHECK_COMMAND * 1.75
contents_tag = "donut"
storage_type = /datum/storage/donut
storage_type = /datum/storage/donut_box
/obj/item/storage/fancy/donut_box/PopulateContents()
. = ..()
@@ -179,7 +174,7 @@
spawn_count = 5
open_status = FANCY_CONTAINER_ALWAYS_OPEN
contents_tag = "candle"
storage_type = /datum/storage/fancy_holder
storage_type = /datum/storage/candle_box
////////////
//CIG PACK//
@@ -396,7 +391,7 @@
spawn_count = 10
custom_price = PAYCHECK_LOWER
has_open_closed_states = FALSE
storage_type = /datum/storage/fancy_holder
storage_type = /datum/storage/rolling_paper_pack
/obj/item/storage/fancy/rollingpapers/update_overlays()
. = ..()
@@ -415,15 +410,12 @@
base_icon_state = "cigarcase"
w_class = WEIGHT_CLASS_NORMAL
contents_tag = "premium cigar"
storage_type = /datum/storage/cigar_box
spawn_type = /obj/item/cigarette/cigar/premium
spawn_count = 5
spawn_coupon = FALSE
display_cigs = FALSE
/obj/item/storage/fancy/cigarettes/cigars/Initialize(mapload)
. = ..()
atom_storage.set_holdable(/obj/item/cigarette/cigar)
/obj/item/storage/fancy/cigarettes/cigars/update_icon_state()
. = ..()
//reset any changes the parent call may have made
@@ -486,7 +478,7 @@
w_class = WEIGHT_CLASS_SMALL
spawn_type = /obj/item/food/nugget
spawn_count = 6
storage_type = /datum/storage/fancy_holder
storage_type = /datum/storage/nugget_box
/*
* Jar of pickles
@@ -505,7 +497,7 @@
custom_materials = list(/datum/material/glass = SHEET_MATERIAL_AMOUNT)
open_status = FANCY_CONTAINER_ALWAYS_OPEN
has_open_closed_states = FALSE
storage_type = /datum/storage/fancy_holder
storage_type = /datum/storage/pickles_jar
/obj/item/storage/fancy/pickles_jar/update_icon_state()
. = ..()