diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index a3216e85db4..3faab2c76ed 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -131,8 +131,6 @@ GLOBAL_DATUM_INIT(fire_overlay, /mutable_appearance, mutable_appearance('icons/e var/armour_penetration = 0 ///Whether or not our object is easily hindered by the presence of armor var/weak_against_armour = FALSE - ///What objects the suit storage can store - var/list/allowed = null ///In deciseconds, how long an item takes to equip; counts only for normal clothing slots, not pockets etc. var/equip_delay_self = 0 ///In deciseconds, how long an item takes to put on another person diff --git a/code/modules/antagonists/changeling/powers/transform.dm b/code/modules/antagonists/changeling/powers/transform.dm index 40f7f9112c6..84c7ff06c57 100644 --- a/code/modules/antagonists/changeling/powers/transform.dm +++ b/code/modules/antagonists/changeling/powers/transform.dm @@ -96,7 +96,6 @@ /obj/item/changeling name = "flesh" slot_flags = ALL - allowed = list(/obj/item/changeling) item_flags = DROPDEL //ATTACK HAND IGNORING PARENT RETURN VALUE diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 161f064747e..332036cc6b5 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -23,6 +23,8 @@ var/cooldown = 0 var/clothing_flags = NONE + ///List of items that can be equipped in the suit storage slot while we're worn. + var/list/allowed var/can_be_bloody = TRUE diff --git a/code/modules/unit_tests/_unit_tests.dm b/code/modules/unit_tests/_unit_tests.dm index e39c003a0f0..f57a0cb8071 100644 --- a/code/modules/unit_tests/_unit_tests.dm +++ b/code/modules/unit_tests/_unit_tests.dm @@ -183,6 +183,7 @@ #include "stomach.dm" #include "strippable.dm" #include "subsystem_init.dm" +#include "suit_storage_icons.dm" #include "surgeries.dm" #include "teleporters.dm" #include "tgui_create_message.dm" diff --git a/code/modules/unit_tests/suit_storage_icons.dm b/code/modules/unit_tests/suit_storage_icons.dm new file mode 100644 index 00000000000..8c77b052411 --- /dev/null +++ b/code/modules/unit_tests/suit_storage_icons.dm @@ -0,0 +1,51 @@ +/// Makes sure suit slot items aren't using CS:S fallbacks. +/datum/unit_test/suit_storage_icons + +/datum/unit_test/suit_storage_icons/Run() + var/list/wearable_item_paths = list() + + for(var/obj/item/item_path as anything in subtypesof(/obj/item)) + var/cached_slot_flags = initial(item_path.slot_flags) + if(!(cached_slot_flags & ITEM_SLOT_SUITSTORE) || (initial(item_path.item_flags) & ABSTRACT)) + continue + wearable_item_paths |= item_path + + for(var/clothing_path in (subtypesof(/obj/item/clothing) - typesof(/obj/item/clothing/head/mob_holder) - typesof(/obj/item/clothing/suit/space/santa))) //mob_holder is a psuedo abstract item. santa suit is a VERY SNOWFLAKE admin spawn suit that can hold /every/ possible item. + var/obj/item/clothing/spawned_item = new clothing_path + for(var/path in spawned_item.allowed) //find all usable suit storage stuff. + wearable_item_paths |= path + qdel(spawned_item) + + for(var/mod_path in subtypesof(/obj/item/mod/control)) + var/obj/item/mod/control/control_mod = new + for(var/path in control_mod.chestplate.allowed) + wearable_item_paths |= path + qdel(control_mod) + + + var/list/already_warned_icons = list() + var/count = 1 //to be removed once the test goes live / into CI failure mode. + for(var/obj/item/item_path as anything in typecacheof(wearable_item_paths)) + if(initial(item_path.item_flags) & ABSTRACT) + continue + + var/worn_icon = initial(item_path.worn_icon) //override icon file. where our sprite is contained if set. (ie modularity stuff) + var/worn_icon_state = initial(item_path.worn_icon_state) //overrides icon_state. + var/icon_state = worn_icon_state || initial(item_path.icon_state) //icon_state. what sprite name we are looking for. + + + if(isnull(icon_state)) + continue //no sprite for the item. + if(icon_state in already_warned_icons) + continue + + if(worn_icon) //easiest to check since we override everything. + if(!(icon_state in icon_states(worn_icon))) + log_test("\t[count] - [item_path] using invalid [worn_icon_state ? "worn_icon_state" : "icon_state"], \"[icon_state]\" in worn_icon override file, '[worn_icon]'") + count++ + continue + + if(!(icon_state in icon_states('icons/mob/clothing/belt_mirror.dmi'))) + already_warned_icons += icon_state + log_test("\t[count] - [item_path] using invalid [worn_icon_state ? "worn_icon_state" : "icon_state"], \"[icon_state]\"") + count++ diff --git a/tools/deploy.sh b/tools/deploy.sh index 18e6155855b..4bc44257ca6 100755 --- a/tools/deploy.sh +++ b/tools/deploy.sh @@ -11,6 +11,7 @@ fi mkdir -p \ $1/_maps \ + $1/icons/mob/clothing \ $1/icons/mob/inhands \ $1/icons/runtime \ $1/sound/runtime \ @@ -25,6 +26,7 @@ fi cp tgstation.dmb tgstation.rsc $1/ cp -r _maps/* $1/_maps/ +cp -r icons/mob/clothing/* $1/icons/mob/clothing/ cp -r icons/mob/inhands/* $1/icons/mob/inhands/ cp -r icons/runtime/* $1/icons/runtime/ cp -r sound/runtime/* $1/sound/runtime/