diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index cfc5aa6a515..f32690f334c 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -27,7 +27,7 @@ ///Icon state for mob worn overlays, if null the normal icon_state will be used. var/worn_icon_state ///Icon state for the belt overlay, if null the normal icon_state will be used. - var/belt_icon_state + var/inside_belt_icon_state ///Forced mob worn layer instead of the standard preferred size. var/alternate_worn_layer ///The config type to use for greyscaled worn sprites. Both this and greyscale_colors must be assigned to work. @@ -910,7 +910,7 @@ /// Returns the icon used for overlaying the object on a belt /obj/item/proc/get_belt_overlay() - var/icon_state_to_use = belt_icon_state || icon_state + var/icon_state_to_use = inside_belt_icon_state || icon_state if(greyscale_config_belt && greyscale_colors) return mutable_appearance(SSgreyscale.GetColoredIconByType(greyscale_config_belt, greyscale_colors), icon_state_to_use) return mutable_appearance('icons/obj/clothing/belt_overlays.dmi', icon_state_to_use) diff --git a/code/game/objects/items/devices/multitool.dm b/code/game/objects/items/devices/multitool.dm index 0ea1e867b4c..4d538f46184 100644 --- a/code/game/objects/items/devices/multitool.dm +++ b/code/game/objects/items/devices/multitool.dm @@ -283,7 +283,7 @@ desc = "An omni-technological interface." icon = 'icons/obj/antags/abductor.dmi' icon_state = "multitool" - belt_icon_state = "multitool_alien" + inside_belt_icon_state = "multitool_alien" custom_materials = list(/datum/material/iron = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/silver = SHEET_MATERIAL_AMOUNT * 1.25, /datum/material/plasma = SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/titanium = SHEET_MATERIAL_AMOUNT, /datum/material/diamond = SHEET_MATERIAL_AMOUNT) toolspeed = 0.1 diff --git a/code/game/objects/items/tools/crowbar.dm b/code/game/objects/items/tools/crowbar.dm index b98ace86cf0..2d5a508076d 100644 --- a/code/game/objects/items/tools/crowbar.dm +++ b/code/game/objects/items/tools/crowbar.dm @@ -50,7 +50,7 @@ usesound = 'sound/items/weapons/sonic_jackhammer.ogg' custom_materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/silver = SHEET_MATERIAL_AMOUNT*1.25, /datum/material/plasma =HALF_SHEET_MATERIAL_AMOUNT, /datum/material/titanium =SHEET_MATERIAL_AMOUNT, /datum/material/diamond =SHEET_MATERIAL_AMOUNT) icon_state = "crowbar" - belt_icon_state = "crowbar_alien" + inside_belt_icon_state = "crowbar_alien" toolspeed = 0.1 /obj/item/crowbar/large @@ -80,7 +80,7 @@ lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' inhand_icon_state = "clawhammer" - belt_icon_state = "clawhammer" + inside_belt_icon_state = "clawhammer" throwforce = 10 throw_range = 5 throw_speed = 3 diff --git a/code/game/objects/items/tools/screwdriver.dm b/code/game/objects/items/tools/screwdriver.dm index 8cf9005d191..cb6411e7e8c 100644 --- a/code/game/objects/items/tools/screwdriver.dm +++ b/code/game/objects/items/tools/screwdriver.dm @@ -5,7 +5,7 @@ icon_state = "screwdriver_map" inhand_icon_state = "screwdriver" worn_icon_state = "screwdriver" - belt_icon_state = "screwdriver" + inside_belt_icon_state = "screwdriver" lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' flags_1 = IS_PLAYER_COLORABLE_1 @@ -81,7 +81,7 @@ name = "hand drill" desc = "A simple powered hand drill." icon_state = "drill" - belt_icon_state = null + inside_belt_icon_state = null inhand_icon_state = "drill" worn_icon_state = "drill" lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' diff --git a/code/game/objects/items/tools/spess_knife.dm b/code/game/objects/items/tools/spess_knife.dm index 4019aa41c70..3550f4df5ae 100644 --- a/code/game/objects/items/tools/spess_knife.dm +++ b/code/game/objects/items/tools/spess_knife.dm @@ -6,7 +6,7 @@ icon = 'icons/obj/tools.dmi' icon_state = "spess_knife" worn_icon_state = "spess_knife" - belt_icon_state = "spess_knife" + inside_belt_icon_state = "spess_knife" inhand_icon_state = "spess_knife" lefthand_file = 'icons/mob/inhands/equipment/tools_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/tools_righthand.dmi' diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index 41b4556ebac..564403acf0e 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -42,7 +42,7 @@ name = "alien wrench" desc = "A polarized wrench. It causes anything placed between the jaws to turn." icon = 'icons/obj/antags/abductor.dmi' - belt_icon_state = "wrench_alien" + inside_belt_icon_state = "wrench_alien" custom_materials = list(/datum/material/iron =SHEET_MATERIAL_AMOUNT * 2.5, /datum/material/silver = SHEET_MATERIAL_AMOUNT*1.25, /datum/material/plasma =HALF_SHEET_MATERIAL_AMOUNT, /datum/material/titanium =SHEET_MATERIAL_AMOUNT, /datum/material/diamond =SHEET_MATERIAL_AMOUNT) usesound = 'sound/effects/empulse.ogg' toolspeed = 0.1 @@ -96,7 +96,7 @@ desc = "It's like a normal wrench but edgier. Can be found on the battlefield." icon_state = "wrench_combat" inhand_icon_state = "wrench_combat" - belt_icon_state = "wrench_combat" + inside_belt_icon_state = "wrench_combat" attack_verb_continuous = list("devastates", "brutalizes", "commits a war crime against", "obliterates", "humiliates") attack_verb_simple = list("devastate", "brutalize", "commit a war crime against", "obliterate", "humiliate") tool_behaviour = null diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index dc0375ac04b..eb5ade84142 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -437,6 +437,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 icon = 'icons/obj/weapons/hammer.dmi' icon_state = "carpenter_hammer" inhand_icon_state = "carpenter_hammer" + worn_icon_state = "clawhammer" //plaecholder lefthand_file = 'icons/mob/inhands/weapons/hammers_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/hammers_righthand.dmi' desc = "Uncanny looking hammer." @@ -446,6 +447,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 w_class = WEIGHT_CLASS_NORMAL wound_bonus = 20 demolition_mod = 1.25 + slot_flags = ITEM_SLOT_BELT /obj/item/carpenter_hammer/Initialize(mapload) . = ..() diff --git a/code/modules/unit_tests/greyscale_config.dm b/code/modules/unit_tests/greyscale_config.dm index d3d9ce9d4fd..9c0484eff7d 100644 --- a/code/modules/unit_tests/greyscale_config.dm +++ b/code/modules/unit_tests/greyscale_config.dm @@ -21,9 +21,9 @@ TEST_FAIL("[worn.DebugName()] is missing a sprite for the worn overlay for [item_path]. Expected icon state: '[worn_icon_state]'") var/datum/greyscale_config/belt = SSgreyscale.configurations["[initial(item_path.greyscale_config_belt)]"] - var/belt_icon_state = initial(item_path.belt_icon_state) || initial(item_path.icon_state) - if(belt && !belt.icon_states[belt_icon_state]) - TEST_FAIL("[belt.DebugName()] is missing a sprite for the belt overlay for [item_path]. Expected icon state: '[belt_icon_state]'") + var/inside_belt_icon_state = initial(item_path.inside_belt_icon_state) || initial(item_path.icon_state) + if(belt && !belt.icon_states[inside_belt_icon_state]) + TEST_FAIL("[belt.DebugName()] is missing a sprite for the belt overlay for [item_path]. Expected icon state: '[inside_belt_icon_state]'") /// Makes sure objects using greyscale configs have, if any, the correct number of colors /datum/unit_test/greyscale_color_count