Make a global list of items that any suit storage can hold, also make suit storage able to hold any "tiny" item (#92406)

This commit is contained in:
Joshua Kidder
2025-08-19 22:41:11 -04:00
committed by nevimer
parent b932c2b38c
commit f7b1c47a7c
2 changed files with 32 additions and 5 deletions
+28
View File
@@ -227,6 +227,34 @@ DEFINE_BITFIELD(no_equip_flags, list(
/// The index of the entry in 'afk_thefts' with the time it happened
#define AFK_THEFT_TIME 3
/// A list of things that any suit storage can hold
/// Should consist of ubiquitous, non-specialized items
/// or items that are meant to be "suit storage agnostic" as
/// a benefit, which of the time of this commit only applies
/// to the captain's jetpack, here
GLOBAL_LIST_INIT(any_suit_storage, typecacheof(list(
/obj/item/clipboard,
/obj/item/flashlight,
/obj/item/tank/internals/emergency_oxygen,
/obj/item/tank/internals/plasmaman,
/obj/item/lighter,
/obj/item/pen,
/obj/item/modular_computer/pda,
/obj/item/toy,
/obj/item/radio,
/obj/item/storage/bag/books,
/obj/item/storage/fancy/cigarettes,
/obj/item/tank/jetpack/oxygen/captain,
/obj/item/stack/spacecash,
/obj/item/storage/wallet,
/obj/item/folder,
/obj/item/storage/box/matches,
/obj/item/cigarette,
/obj/item/gun/energy/laser/bluetag,
/obj/item/gun/energy/laser/redtag,
/obj/item/storage/belt/holster
)))
//Allowed equipment lists for security vests.
GLOBAL_LIST_INIT(detective_vest_allowed, list(
@@ -765,15 +765,14 @@ GLOBAL_LIST_EMPTY(features_by_species)
if(!disable_warning)
to_chat(H, span_warning("You need a suit before you can attach this [I.name]!"))
return FALSE
if(!H.wear_suit.allowed)
if(!disable_warning)
to_chat(H, span_warning("You somehow have a suit with no defined allowed items for suit storage, stop that."))
return FALSE
var/any_suit_storage = (is_type_in_typecache(I, GLOB.any_suit_storage) || I.w_class == WEIGHT_CLASS_TINY)
if(any_suit_storage)
return TRUE
if(I.w_class > WEIGHT_CLASS_BULKY)
if(!disable_warning)
to_chat(H, span_warning("\The [I] is too big to attach!")) //should be src?
return FALSE
if( istype(I, /obj/item/modular_computer/pda) || istype(I, /obj/item/pen) || is_type_in_list(I, H.wear_suit.allowed) )
if( is_type_in_list(I, H.wear_suit.allowed) )
return TRUE
return FALSE
if(ITEM_SLOT_HANDCUFFED)