Files
AeriandMaia 5c919116a4 Makes gun cases use their open icon state when appropriate. (#6041)
## About The Pull Request

Gun cases have had an "open" sprite sitting in the icon file for years
and they're basically vestigial, they only show when you use the case in
hand, which, why the hell would you? Consequently, the sprite has been
quietly gathering dust.

Now the lid does what a lid ought to do. Open a case and it opens.
Rummage away. Close it and it shuts again. You know, like a real case.
Traditionally you need to open a box to look inside it.

As a proactive step, I've rigged it so that it works out for itself
whether a case has an open sprite to show. If it does, the case uses
this state. If it does not, nothing changes for it at all, nothing
changes for TG cases, but any that operate on the newer skyrat spec
should work automatically. Any new cases added in the right way can hook
this for free.

## Why It's Good For The Game

Free polish. The art was already on the cutting room floor, it just
needed somebody to plug it in. It also reads nicely at a glance: an open
case means the container is being accessed.

Artur asked me to do this also.

## Proof Of Testing


https://github.com/user-attachments/assets/49cfb05c-7bd4-41d4-aaf5-efa4df85be38

## Changelog

🆑 Aeri
fix: Gun cases now utilize their existing "open" sprites where
appropriate.
/🆑
2026-08-14 19:42:36 +02:00

51 lines
1.3 KiB
Plaintext

/*
* GUNSET BOXES
*/
/obj/item/storage/toolbox/guncase/skyrat
desc = "A thick gun case with foam inserts laid out to fit a weapon, magazines, and gear securely."
icon = 'modular_skyrat/modules/modular_weapons/icons/obj/gunsets.dmi'
icon_state = "guncase"
worn_icon = 'modular_skyrat/modules/modular_weapons/icons/mob/worn/cases.dmi'
worn_icon_state = "darkcase"
slot_flags = ITEM_SLOT_BACK
material_flags = NONE
/obj/item/storage/toolbox/guncase/skyrat/Initialize(mapload)
. = ..()
atom_storage.max_total_storage = 14 // Technically means you could fit multiple large guns in here but its a case you cant backpack anyways so what it do
atom_storage.max_slots = 6 // We store some extra items in these so lets make a little extra room
// Empty guncase
/obj/item/storage/toolbox/guncase/skyrat/empty
/obj/item/storage/toolbox/guncase/skyrat/empty/PopulateContents()
return
// Small case for pistols and whatnot
/obj/item/storage/toolbox/guncase/skyrat/pistol
name = "small gun case"
icon_state = "guncase_s"
slot_flags = NONE
w_class = WEIGHT_CLASS_BULKY
/obj/item/storage/toolbox/guncase/skyrat/pistol/Initialize(mapload)
. = ..()
atom_storage.max_specific_storage = WEIGHT_CLASS_NORMAL
// Empty pistol case
/obj/item/storage/toolbox/guncase/skyrat/pistol/empty
/obj/item/storage/toolbox/guncase/skyrat/pistol/empty/PopulateContents()
return