From 1ff3945b300a0042b53453615f14b3eb2d963d0b Mon Sep 17 00:00:00 2001 From: ShizCalev Date: Sat, 13 Jun 2020 14:16:52 -0400 Subject: [PATCH] Fixes more belt missing texture crap (#51597) * Fixes more belt missing texture crap * #51010 progress * tank fixes * typo * Removed dead/duplicated code * cleanup * don't need the - meme anymore with build_worn_icon * icon fix * commentary * yelling at future coders * more condensedd --- code/game/gamemodes/changeling/changeling.dm | 3 ++ code/game/machinery/washing_machine.dm | 1 + code/game/objects/items.dm | 19 +++++++++ code/game/objects/items/defib.dm | 3 ++ .../objects/items/devices/traitordevices.dm | 1 + code/game/objects/items/holy_weapons.dm | 1 + code/game/objects/items/melee/misc.dm | 1 + code/game/objects/items/storage/belt.dm | 37 +++++++++++++++++- code/game/objects/items/storage/holsters.dm | 3 ++ code/game/objects/items/tanks/tank_types.dm | 6 +++ code/game/objects/items/tanks/tanks.dm | 1 + code/game/objects/items/toys.dm | 2 + code/game/objects/items/weaponry.dm | 1 + .../antagonists/changeling/changeling.dm | 9 +++++ code/modules/clothing/chameleon.dm | 3 ++ code/modules/clothing/suits/jobs.dm | 1 + .../food_and_drinks/food/snacks_bread.dm | 1 + code/modules/mining/equipment/mining_tools.dm | 4 ++ .../living/carbon/human/human_update_icons.dm | 30 +++----------- code/modules/ninja/energy_katana.dm | 1 + code/modules/paperwork/pen.dm | 2 + .../projectiles/guns/energy/special.dm | 2 + code/modules/projectiles/pins.dm | 1 + icons/mob/clothing/belt_mirror.dmi | Bin 3823 -> 4077 bytes 24 files changed, 107 insertions(+), 26 deletions(-) diff --git a/code/game/gamemodes/changeling/changeling.dm b/code/game/gamemodes/changeling/changeling.dm index 15fd3dd1e4b..4f71ed70442 100644 --- a/code/game/gamemodes/changeling/changeling.dm +++ b/code/game/gamemodes/changeling/changeling.dm @@ -132,8 +132,11 @@ GLOBAL_VAR(changeling_team_objective_type) //If this is not null, we hand our th C.appearance = chosen_prof.appearance_list[slot] C.name = chosen_prof.name_list[slot] C.flags_cover = chosen_prof.flags_cover_list[slot] + C.lefthand_file = chosen_prof.lefthand_file_list[slot] + C.righthand_file = chosen_prof.righthand_file_list[slot] C.inhand_icon_state = chosen_prof.inhand_icon_state_list[slot] C.worn_icon = chosen_prof.worn_icon_list[slot] + C.worn_icon_state = chosen_prof.worn_icon_state_list[slot] if(equip) user.equip_to_slot_or_del(C, GLOB.slot2slot[slot]) diff --git a/code/game/machinery/washing_machine.dm b/code/game/machinery/washing_machine.dm index e9b466b3ede..2e0a656d1a8 100644 --- a/code/game/machinery/washing_machine.dm +++ b/code/game/machinery/washing_machine.dm @@ -219,6 +219,7 @@ GLOBAL_LIST_INIT(dye_registry, list( righthand_file = initial(target_type.righthand_file) inhand_icon_state = initial(target_type.inhand_icon_state) worn_icon = initial(target_type.worn_icon) + worn_icon_state = initial(target_type.worn_icon_state) inhand_x_dimension = initial(target_type.inhand_x_dimension) inhand_y_dimension = initial(target_type.inhand_y_dimension) name = initial(target_type.name) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index b21e9dddee0..db396017a5d 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -11,6 +11,16 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb name = "item" icon = 'icons/obj/items_and_weapons.dmi' blocks_emissive = EMISSIVE_BLOCK_GENERIC + + /* !!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!! + + IF YOU ADD MORE ICON CRAP TO THIS + ENSURE YOU ALSO ADD THE NEW VARS TO CHAMELEON ITEM_ACTION'S update_item() PROC (/datum/action/item_action/chameleon/change/proc/update_item()) + WASHING MASHINE'S dye_item() PROC (/obj/item/proc/dye_item()) + AND ALSO TO THE CHANGELING PROFILE DISGUISE SYSTEMS (/datum/changelingprofile / /datum/antagonist/changeling/proc/create_profile() / /proc/changeling_transform()) + + !!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!! */ + ///icon state for inhand overlays, if null the normal icon_state will be used. var/inhand_icon_state = null ///Icon file for left hand inhand overlays @@ -25,6 +35,15 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb ///Forced mob worn layer instead of the standard preferred ssize. var/alternate_worn_layer + /* !!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!! + + IF YOU ADD MORE ICON CRAP TO THIS + ENSURE YOU ALSO ADD THE NEW VARS TO CHAMELEON ITEM_ACTION'S update_item() PROC (/datum/action/item_action/chameleon/change/proc/update_item()) + WASHING MASHINE'S dye_item() PROC (/obj/item/proc/dye_item()) + AND ALSO TO THE CHANGELING PROFILE DISGUISE SYSTEMS (/datum/changelingprofile / /datum/antagonist/changeling/proc/create_profile() / /proc/changeling_transform()) + + !!!!!!!!!!!!!!! IMPORTANT !!!!!!!!!!!!!! */ + ///Dimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly var/worn_x_dimension = 32 ///Dimensions of the icon file used when this item is worn, eg: hats.dmi (32x32 sprite, 64x64 sprite, etc.). Allows inhands/worn sprites to be of any size, but still centered on a mob properly diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 357a450627d..0f062aefabb 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -240,6 +240,7 @@ desc = "A belt-equipped defibrillator that can be rapidly deployed." icon_state = "defibcompact" inhand_icon_state = "defibcompact" + worn_icon_state = "defibcompact" w_class = WEIGHT_CLASS_NORMAL slot_flags = ITEM_SLOT_BELT @@ -257,6 +258,7 @@ desc = "A belt-equipped blood-red defibrillator. Can revive through spacesuits, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or agressive manner." icon_state = "defibcombat" //needs defib inhand sprites inhand_icon_state = "defibcombat" + worn_icon_state = "defibcombat" combat = TRUE safety = FALSE cooldown_duration = 2.5 SECONDS @@ -277,6 +279,7 @@ desc = "A belt-equipped state-of-the-art defibrillator. Can revive through spacesuits, has an experimental self-recharging battery, and can be utilized in combat via applying the paddles in a disarming or agressive manner." icon_state = "defibnt" //needs defib inhand sprites inhand_icon_state = "defibnt" + worn_icon_state = "defibnt" paddle_type = /obj/item/shockpaddles/syndicate/nanotrasen //paddles diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm index 140a0d43ee7..e8e58800cc8 100644 --- a/code/game/objects/items/devices/traitordevices.dm +++ b/code/game/objects/items/devices/traitordevices.dm @@ -186,6 +186,7 @@ effective or pretty fucking useless. icon = 'icons/obj/clothing/belts.dmi' icon_state = "utilitybelt" inhand_icon_state = "utility" + worn_icon_state = "utility" slot_flags = ITEM_SLOT_BELT attack_verb = list("whipped", "lashed", "disciplined") diff --git a/code/game/objects/items/holy_weapons.dm b/code/game/objects/items/holy_weapons.dm index 169f805fef9..b58fdf37e0c 100644 --- a/code/game/objects/items/holy_weapons.dm +++ b/code/game/objects/items/holy_weapons.dm @@ -360,6 +360,7 @@ desc = "Capable of cutting clean through a holy claymore." icon_state = "katana" inhand_icon_state = "katana" + worn_icon_state = "katana" slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_BACK /obj/item/nullrod/claymore/multiverse diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index 20b53c0788c..6e6ae48f8e0 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -137,6 +137,7 @@ icon = 'icons/obj/items_and_weapons.dmi' icon_state = "beesword" inhand_icon_state = "stinger" + worn_icon_state = "stinger" lefthand_file = 'icons/mob/inhands/weapons/melee_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/melee_righthand.dmi' slot_flags = ITEM_SLOT_BELT diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index a945e2a84ec..1989270a86b 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -4,6 +4,7 @@ icon = 'icons/obj/clothing/belts.dmi' icon_state = "utilitybelt" inhand_icon_state = "utility" + worn_icon_state = "utility" lefthand_file = 'icons/mob/inhands/equipment/belt_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/belt_righthand.dmi' slot_flags = ITEM_SLOT_BELT @@ -31,6 +32,7 @@ desc = "Holds tools." icon_state = "utility" inhand_icon_state = "utility" + worn_icon_state = "utility" content_overlays = TRUE custom_premium_price = 300 drop_sound = 'sound/items/handling/toolbelt_drop.ogg' @@ -72,6 +74,7 @@ desc = "Holds tools, looks snazzy." icon_state = "utility_ce" inhand_icon_state = "utility_ce" + worn_icon_state = "utility_ce" /obj/item/storage/belt/utility/chief/full/PopulateContents() new /obj/item/screwdriver/power(src) @@ -125,6 +128,7 @@ desc = "Can hold various medical equipment." icon_state = "medical" inhand_icon_state = "medical" + worn_icon_state = "medical" /obj/item/storage/belt/medical/ComponentInitialize() . = ..() @@ -199,6 +203,7 @@ desc = "Can hold security gear like handcuffs and flashes." icon_state = "security" inhand_icon_state = "security"//Could likely use a better one. + worn_icon_state = "security" content_overlays = TRUE /obj/item/storage/belt/security/ComponentInitialize() @@ -239,6 +244,7 @@ desc = "Unique and versatile chest rig, can hold security gear." icon_state = "securitywebbing" inhand_icon_state = "securitywebbing" + worn_icon_state = "securitywebbing" content_overlays = FALSE custom_premium_price = 900 @@ -252,6 +258,7 @@ desc = "A versatile chest rig, cherished by miners and hunters alike." icon_state = "explorer1" inhand_icon_state = "explorer1" + worn_icon_state = "explorer1" w_class = WEIGHT_CLASS_BULKY /obj/item/storage/belt/mining/ComponentInitialize() @@ -307,12 +314,14 @@ /obj/item/storage/belt/mining/alt icon_state = "explorer2" inhand_icon_state = "explorer2" + worn_icon_state = "explorer2" /obj/item/storage/belt/mining/primitive name = "hunter's belt" desc = "A versatile belt, woven from sinew." icon_state = "ebelt" inhand_icon_state = "ebelt" + worn_icon_state = "ebelt" /obj/item/storage/belt/mining/primitive/ComponentInitialize() . = ..() @@ -324,6 +333,7 @@ desc = "Designed for ease of access to the shards during a fight, as to not let a single enemy spirit slip away." icon_state = "soulstonebelt" inhand_icon_state = "soulstonebelt" + worn_icon_state = "soulstonebelt" /obj/item/storage/belt/soulstone/ComponentInitialize() . = ..() @@ -346,6 +356,7 @@ desc = "Proves to the world that you are the strongest!" icon_state = "championbelt" inhand_icon_state = "championbelt" + worn_icon_state = "championbelt" custom_materials = list(/datum/material/gold=400) /obj/item/storage/belt/champion/ComponentInitialize() @@ -361,6 +372,7 @@ desc = "A set of tactical webbing worn by Syndicate boarding parties." icon_state = "militarywebbing" inhand_icon_state = "militarywebbing" + worn_icon_state = "militarywebbing" resistance_flags = FIRE_PROOF /obj/item/storage/belt/military/ComponentInitialize() @@ -436,12 +448,14 @@ desc = "A belt used by military forces." icon_state = "grenadebeltold" inhand_icon_state = "security" + worn_icon_state = "grenadebeltold" /obj/item/storage/belt/military/assault name = "assault belt" desc = "A tactical assault belt." icon_state = "assaultbelt" inhand_icon_state = "security" + worn_icon_state = "assault" /obj/item/storage/belt/military/assault/ComponentInitialize() . = ..() @@ -453,6 +467,7 @@ desc = "A belt for holding grenades." icon_state = "grenadebeltnew" inhand_icon_state = "security" + worn_icon_state = "grenadebeltnew" /obj/item/storage/belt/grenade/ComponentInitialize() . = ..() @@ -493,6 +508,7 @@ desc = "A belt designed to hold various rods of power. A veritable fanny pack of exotic magic." icon_state = "soulstonebelt" inhand_icon_state = "soulstonebelt" + worn_icon_state = "soulstonebelt" /obj/item/storage/belt/wands/ComponentInitialize() . = ..() @@ -519,6 +535,7 @@ desc = "A belt used to hold most janitorial supplies." icon_state = "janibelt" inhand_icon_state = "janibelt" + worn_icon_state = "janibelt" /obj/item/storage/belt/janitor/ComponentInitialize() . = ..() @@ -553,6 +570,7 @@ desc = "A bandolier for holding shotgun ammunition." icon_state = "bandolier" inhand_icon_state = "bandolier" + worn_icon_state = "bandolier" /obj/item/storage/belt/bandolier/ComponentInitialize() . = ..() @@ -569,6 +587,7 @@ desc = "A dorky fannypack for keeping small items in." icon_state = "fannypack_leather" inhand_icon_state = "fannypack_leather" + worn_icon_state = "fannypack_leather" dying_key = DYE_REGISTRY_FANNYPACK custom_price = 100 @@ -582,57 +601,68 @@ name = "black fannypack" icon_state = "fannypack_black" inhand_icon_state = "fannypack_black" + worn_icon_state = "fannypack_black" /obj/item/storage/belt/fannypack/red name = "red fannypack" icon_state = "fannypack_red" inhand_icon_state = "fannypack_red" + worn_icon_state = "fannypack_red" /obj/item/storage/belt/fannypack/purple name = "purple fannypack" icon_state = "fannypack_purple" inhand_icon_state = "fannypack_purple" + worn_icon_state = "fannypack_purple" /obj/item/storage/belt/fannypack/blue name = "blue fannypack" icon_state = "fannypack_blue" inhand_icon_state = "fannypack_blue" + worn_icon_state = "fannypack_blue" /obj/item/storage/belt/fannypack/orange name = "orange fannypack" icon_state = "fannypack_orange" inhand_icon_state = "fannypack_orange" + worn_icon_state = "fannypack_orange" /obj/item/storage/belt/fannypack/white name = "white fannypack" icon_state = "fannypack_white" inhand_icon_state = "fannypack_white" + worn_icon_state = "fannypack_white" /obj/item/storage/belt/fannypack/green name = "green fannypack" icon_state = "fannypack_green" inhand_icon_state = "fannypack_green" + worn_icon_state = "fannypack_green" /obj/item/storage/belt/fannypack/pink name = "pink fannypack" icon_state = "fannypack_pink" inhand_icon_state = "fannypack_pink" + worn_icon_state = "fannypack_pink" /obj/item/storage/belt/fannypack/cyan name = "cyan fannypack" icon_state = "fannypack_cyan" inhand_icon_state = "fannypack_cyan" + worn_icon_state = "fannypack_cyan" /obj/item/storage/belt/fannypack/yellow name = "yellow fannypack" icon_state = "fannypack_yellow" inhand_icon_state = "fannypack_yellow" + worn_icon_state = "fannypack_yellow" /obj/item/storage/belt/sabre name = "sabre sheath" desc = "An ornate sheath designed to hold an officer's blade." icon_state = "sheath" inhand_icon_state = "sheath" + worn_icon_state = "sheath" w_class = WEIGHT_CLASS_BULKY /obj/item/storage/belt/sabre/ComponentInitialize() @@ -663,11 +693,13 @@ to_chat(user, "[src] is empty!") /obj/item/storage/belt/sabre/update_icon_state() - icon_state = "sheath" - inhand_icon_state = "sheath" + icon_state = initial(inhand_icon_state) + inhand_icon_state = initial(inhand_icon_state) + worn_icon_state = initial(worn_icon_state) if(contents.len) icon_state += "-sabre" inhand_icon_state += "-sabre" + worn_icon_state += "-sabre" /obj/item/storage/belt/sabre/PopulateContents() new /obj/item/melee/sabre(src) @@ -678,6 +710,7 @@ desc = "A belt used to hold most hydroponics supplies. Suprisingly, not green." icon_state = "plantbelt" inhand_icon_state = "plantbelt" + worn_icon_state = "plantbelt" content_overlays = TRUE /obj/item/storage/belt/plant/ComponentInitialize() diff --git a/code/game/objects/items/storage/holsters.dm b/code/game/objects/items/storage/holsters.dm index f902879db7d..592d638ebd9 100644 --- a/code/game/objects/items/storage/holsters.dm +++ b/code/game/objects/items/storage/holsters.dm @@ -4,6 +4,7 @@ desc = "A rather plain but still badass looking holster with a single pouch that can hold a small firearm." icon_state = "holster" inhand_icon_state = "holster" + worn_icon_state = "holster" alternate_worn_layer = UNDER_SUIT_LAYER /obj/item/storage/belt/holster/equipped(mob/user, slot) @@ -56,6 +57,7 @@ desc = "A two pouched hip holster that uses chameleon technology to disguise itself and any guns in it." icon_state = "syndicate_holster" inhand_icon_state = "syndicate_holster" + worn_icon_state = "syndicate_holster" var/datum/action/item_action/chameleon/change/chameleon_action /obj/item/storage/belt/holster/chameleon/Initialize() @@ -100,6 +102,7 @@ desc = "A deep shoulder holster capable of holding almost any form of ballistic weaponry." icon_state = "syndicate_holster" inhand_icon_state = "syndicate_holster" + worn_icon_state = "syndicate_holster" w_class = WEIGHT_CLASS_BULKY /obj/item/storage/belt/holster/nukie/ComponentInitialize() diff --git a/code/game/objects/items/tanks/tank_types.dm b/code/game/objects/items/tanks/tank_types.dm index 15cfc3cdc83..0e44d624ff3 100644 --- a/code/game/objects/items/tanks/tank_types.dm +++ b/code/game/objects/items/tanks/tank_types.dm @@ -113,6 +113,8 @@ /obj/item/tank/internals/plasmaman/belt icon_state = "plasmaman_tank_belt" inhand_icon_state = "plasmaman_tank_belt" + worn_icon_state = "plasmaman_tank_belt" + worn_icon = null slot_flags = ITEM_SLOT_BELT force = 5 volume = 6 @@ -134,6 +136,8 @@ name = "emergency oxygen tank" desc = "Used for emergencies. Contains very little oxygen, so try to conserve it until you actually need it." icon_state = "emergency" + worn_icon_state = "emergency" + worn_icon = null flags_1 = CONDUCT_1 slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL @@ -153,6 +157,8 @@ /obj/item/tank/internals/emergency_oxygen/engi name = "extended-capacity emergency oxygen tank" icon_state = "emergency_engi" + worn_icon_state = "emergency_engi" + worn_icon = null volume = 2 // should last a bit over 30 minutes if full /obj/item/tank/internals/emergency_oxygen/engi/empty/populate_gas() diff --git a/code/game/objects/items/tanks/tanks.dm b/code/game/objects/items/tanks/tanks.dm index 5803882e3be..daad6f7e2e2 100644 --- a/code/game/objects/items/tanks/tanks.dm +++ b/code/game/objects/items/tanks/tanks.dm @@ -5,6 +5,7 @@ righthand_file = 'icons/mob/inhands/equipment/tanks_righthand.dmi' flags_1 = CONDUCT_1 slot_flags = ITEM_SLOT_BACK + worn_icon = 'icons/mob/clothing/back.dmi' //since these can also get thrown into suit storage slots. if something goes on the belt, set this to null. hitsound = 'sound/weapons/smash.ogg' pressure_resistance = ONE_ATMOSPHERE * 5 force = 5 diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 0325f8cd5a8..497e238460b 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -454,6 +454,7 @@ icon = 'icons/obj/items_and_weapons.dmi' icon_state = "katana" inhand_icon_state = "katana" + worn_icon_state = "katana" lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' flags_1 = CONDUCT_1 @@ -1208,6 +1209,7 @@ desc = "A stylish steampunk watch made out of thousands of tiny cogwheels." icon = 'icons/obj/clockwork_objects.dmi' icon_state = "dread_ipad" + worn_icon_state = "dread_ipad" slot_flags = ITEM_SLOT_BELT w_class = WEIGHT_CLASS_SMALL var/cooldown = 0 diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 060d0a7f5ec..645b861c2b4 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -208,6 +208,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 desc = "Woefully underpowered in D20." icon_state = "katana" inhand_icon_state = "katana" + worn_icon_state = "katana" lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' flags_1 = CONDUCT_1 diff --git a/code/modules/antagonists/changeling/changeling.dm b/code/modules/antagonists/changeling/changeling.dm index 6381383947d..e97f4ca666e 100644 --- a/code/modules/antagonists/changeling/changeling.dm +++ b/code/modules/antagonists/changeling/changeling.dm @@ -300,8 +300,11 @@ prof.name_list[slot] = I.name prof.appearance_list[slot] = I.appearance prof.flags_cover_list[slot] = I.flags_cover + prof.lefthand_file_list[slot] = I.lefthand_file + prof.righthand_file_list[slot] = I.righthand_file prof.inhand_icon_state_list[slot] = I.inhand_icon_state prof.worn_icon_list[slot] = I.worn_icon + prof.worn_icon_state_list[slot] = I.worn_icon_state prof.exists_list[slot] = 1 else continue @@ -511,8 +514,11 @@ var/list/appearance_list = list() var/list/flags_cover_list = list() var/list/exists_list = list() + var/list/lefthand_file_list = list() + var/list/righthand_file_list = list() var/list/inhand_icon_state_list = list() var/list/worn_icon_list = list() + var/list/worn_icon_state_list = list() var/underwear var/undershirt @@ -531,11 +537,14 @@ newprofile.appearance_list = appearance_list.Copy() newprofile.flags_cover_list = flags_cover_list.Copy() newprofile.exists_list = exists_list.Copy() + newprofile.lefthand_file_list = lefthand_file_list.Copy() + newprofile.righthand_file_list = righthand_file_list.Copy() newprofile.inhand_icon_state_list = inhand_icon_state_list.Copy() newprofile.underwear = underwear newprofile.undershirt = undershirt newprofile.socks = socks newprofile.worn_icon_list = worn_icon_list.Copy() + newprofile.worn_icon_state_list = worn_icon_state_list.Copy() /datum/antagonist/changeling/xenobio diff --git a/code/modules/clothing/chameleon.dm b/code/modules/clothing/chameleon.dm index 03810392596..27cc999618c 100644 --- a/code/modules/clothing/chameleon.dm +++ b/code/modules/clothing/chameleon.dm @@ -221,8 +221,11 @@ target.icon_state = initial(picked_item.icon_state) if(isitem(target)) var/obj/item/clothing/I = target + I.lefthand_file = initial(picked_item.lefthand_file) + I.righthand_file = initial(picked_item.righthand_file) I.inhand_icon_state = initial(picked_item.inhand_icon_state) I.worn_icon = initial(picked_item.worn_icon) + I.worn_icon_state = initial(picked_item.worn_icon_state) if(istype(I, /obj/item/clothing) && istype(initial(picked_item), /obj/item/clothing)) var/obj/item/clothing/CL = I var/obj/item/clothing/PCL = picked_item diff --git a/code/modules/clothing/suits/jobs.dm b/code/modules/clothing/suits/jobs.dm index b6e7c194904..b3f12194efa 100644 --- a/code/modules/clothing/suits/jobs.dm +++ b/code/modules/clothing/suits/jobs.dm @@ -119,6 +119,7 @@ desc = "They suspend the illusion of the mime's play." icon = 'icons/obj/clothing/belts.dmi' icon_state = "suspenders" + worn_icon_state = "suspenders" blood_overlay_type = "armor" //it's the less thing that I can put here togglename = "straps" diff --git a/code/modules/food_and_drinks/food/snacks_bread.dm b/code/modules/food_and_drinks/food/snacks_bread.dm index 39ca684cfbf..78045e6e53f 100644 --- a/code/modules/food_and_drinks/food/snacks_bread.dm +++ b/code/modules/food_and_drinks/food/snacks_bread.dm @@ -198,6 +198,7 @@ icon = 'icons/obj/food/burgerbread.dmi' icon_state = "baguette" inhand_icon_state = "baguette" + worn_icon_state = "baguette" bonus_reagents = list(/datum/reagent/consumable/nutriment = 2, /datum/reagent/consumable/nutriment/vitamin = 2) list_reagents = list(/datum/reagent/consumable/nutriment = 6, /datum/reagent/consumable/nutriment/vitamin = 1) bitesize = 3 diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm index 9254f2d9f05..b8461b3bd25 100644 --- a/code/modules/mining/equipment/mining_tools.dm +++ b/code/modules/mining/equipment/mining_tools.dm @@ -8,6 +8,7 @@ force = 15 throwforce = 10 inhand_icon_state = "pickaxe" + worn_icon_state = "pickaxe" lefthand_file = 'icons/mob/inhands/equipment/mining_lefthand.dmi' righthand_file = 'icons/mob/inhands/equipment/mining_righthand.dmi' w_class = WEIGHT_CLASS_BULKY @@ -45,6 +46,7 @@ name = "silver-plated pickaxe" icon_state = "spickaxe" inhand_icon_state = "spickaxe" + worn_icon_state = "spickaxe" toolspeed = 0.5 //mines faster than a normal pickaxe, bought from mining vendor desc = "A silver-plated pickaxe that mines slightly faster than standard-issue." force = 17 @@ -53,6 +55,7 @@ name = "diamond-tipped pickaxe" icon_state = "dpickaxe" inhand_icon_state = "dpickaxe" + worn_icon_state = "dpickaxe" toolspeed = 0.3 desc = "A pickaxe with a diamond pick head. Extremely robust at cracking rock walls and digging up dirt." force = 19 @@ -91,6 +94,7 @@ name = "sonic jackhammer" icon_state = "jackhammer" inhand_icon_state = "jackhammer" + worn_icon_state = "jackhammer" toolspeed = 0.1 //the epitome of powertools. extremely fast mining usesound = 'sound/weapons/sonic_jackhammer.ogg' hitsound = 'sound/weapons/sonic_jackhammer.ogg' diff --git a/code/modules/mob/living/carbon/human/human_update_icons.dm b/code/modules/mob/living/carbon/human/human_update_icons.dm index f73672e5e2e..23a2f1f646e 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -290,10 +290,7 @@ There are several things that need to be remembered: if(client && hud_used && hud_used.hud_shown) client.screen += s_store update_observer_view(s_store) - var/t_state = s_store.inhand_icon_state - if(!t_state) - t_state = s_store.icon_state - overlays_standing[SUIT_STORE_LAYER] = mutable_appearance('icons/mob/clothing/belt_mirror.dmi', t_state, -SUIT_STORE_LAYER) + overlays_standing[SUIT_STORE_LAYER] = s_store.build_worn_icon(default_layer = SUIT_STORE_LAYER, default_icon_file = 'icons/mob/clothing/belt_mirror.dmi') var/mutable_appearance/s_store_overlay = overlays_standing[SUIT_STORE_LAYER] if(OFFSET_S_STORE in dna.species.offset_features) s_store_overlay.pixel_x += dna.species.offset_features[OFFSET_S_STORE][1] @@ -493,37 +490,22 @@ generate/load female uniform sprites matching all previously decided variables */ /obj/item/proc/build_worn_icon(default_layer = 0, default_icon_file = null, isinhands = FALSE, femaleuniform = NO_FEMALE_UNIFORM, override_state = null) + //Find a valid icon_state from variables+arguments var/t_state if(override_state) t_state = override_state else - t_state = icon_state - if(isinhands) - if(inhand_icon_state) - t_state = inhand_icon_state - else if(worn_icon_state) - t_state = worn_icon_state - var/t_icon = worn_icon - if(!t_icon) - t_icon = default_icon_file + t_state = !isinhands ? (worn_icon_state ? worn_icon_state : icon_state) : (inhand_icon_state ? inhand_icon_state : icon_state) //Find a valid icon file from variables+arguments - var/file2use - if(!isinhands && worn_icon) - file2use = worn_icon - if(!file2use) - file2use = default_icon_file + var/file2use = !isinhands ? (worn_icon ? worn_icon : default_icon_file) : default_icon_file //Find a valid layer from variables+arguments - var/layer2use - if(alternate_worn_layer) - layer2use = alternate_worn_layer - if(!layer2use) - layer2use = default_layer + var/layer2use = alternate_worn_layer ? alternate_worn_layer : default_layer var/mutable_appearance/standing if(femaleuniform) - standing = wear_female_version(t_state,file2use,layer2use,femaleuniform) + standing = wear_female_version(t_state,file2use,layer2use,femaleuniform) //should layer2use be in sync with the adjusted value below? needs testing - shiz if(!standing) standing = mutable_appearance(file2use, t_state, -layer2use) diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm index 9f5f7913ff4..082b7cfcaf5 100644 --- a/code/modules/ninja/energy_katana.dm +++ b/code/modules/ninja/energy_katana.dm @@ -3,6 +3,7 @@ desc = "A katana infused with strong energy." icon_state = "energy_katana" inhand_icon_state = "energy_katana" + worn_icon_state = "energy_katana" lefthand_file = 'icons/mob/inhands/weapons/swords_lefthand.dmi' righthand_file = 'icons/mob/inhands/weapons/swords_righthand.dmi' force = 40 diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index 645a8917935..29d2547564e 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -16,6 +16,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "pen" inhand_icon_state = "pen" + worn_icon_state = "pen" slot_flags = ITEM_SLOT_BELT | ITEM_SLOT_EARS throwforce = 0 w_class = WEIGHT_CLASS_TINY @@ -257,6 +258,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "digging_pen" inhand_icon_state = "pen" + worn_icon_state = "pen" force = 3 w_class = WEIGHT_CLASS_TINY custom_materials = list(/datum/material/iron=10, /datum/material/diamond=100, /datum/material/titanium = 10) diff --git a/code/modules/projectiles/guns/energy/special.dm b/code/modules/projectiles/guns/energy/special.dm index 63d63ce830f..f9624697070 100644 --- a/code/modules/projectiles/guns/energy/special.dm +++ b/code/modules/projectiles/guns/energy/special.dm @@ -19,6 +19,7 @@ name = "ion carbine" desc = "The MK.II Prototype Ion Projector is a lightweight carbine version of the larger ion rifle, built to be ergonomic and efficient." icon_state = "ioncarbine" + worn_icon_state = "ioncarbine" w_class = WEIGHT_CLASS_NORMAL slot_flags = ITEM_SLOT_BELT pin = null @@ -70,6 +71,7 @@ icon = 'icons/obj/bureaucracy.dmi' icon_state = "pen" inhand_icon_state = "pen" + worn_icon_state = "pen" lefthand_file = 'icons/mob/inhands/items_lefthand.dmi' righthand_file = 'icons/mob/inhands/items_righthand.dmi' w_class = WEIGHT_CLASS_TINY diff --git a/code/modules/projectiles/pins.dm b/code/modules/projectiles/pins.dm index f6819d191f8..6b696af1f8f 100644 --- a/code/modules/projectiles/pins.dm +++ b/code/modules/projectiles/pins.dm @@ -4,6 +4,7 @@ icon = 'icons/obj/device.dmi' icon_state = "firing_pin" inhand_icon_state = "pen" + worn_icon_state = "pen" flags_1 = CONDUCT_1 w_class = WEIGHT_CLASS_TINY attack_verb = list("poked") diff --git a/icons/mob/clothing/belt_mirror.dmi b/icons/mob/clothing/belt_mirror.dmi index 00a76c21010de26b72b19ded89cd494c03d5e1a7..f0833df9390ce448aed385ccae1f2fa5fe1302a0 100644 GIT binary patch literal 4077 zcmcJSdpwivAII-SdYp19$B-$a9LgceP)(9!$SG_^v{qy}?!eST2RtkZ%{hr27M>BY zO=>1dQAF5NCfS;04#UWAoyOXtb=}wXy|35zzP|74b6xi>4>w0yDRn6T z0A!s`Ks^BfWG~Xr-y}pmFGC;y5Is1ez5Sx0=dXsK5LcoRkr4n8Uy$*>H{!af3~koT z#^L?=qlFMhW3TF4$AnT0*Fc7{%iTQJu>qb(Z3-d>CpN9}SEi2hTx(KwW>{QhkGspT zT&Q6q4sD!f!h33#GhEYCc8nQ|g>=iLR~(S0+e*L#@21Qd5MR~2`chER#hI0D(jDtv zOd0@LA1>-U0R3$gbmS>EMA2H}&jJa)Pr0T2n{iA1zmi{6-b8sH_H6X5BA>kco)m@t zv;}lq@YMJXNG20IW(xuK1v6nw^UoqEu`o6eE@*1XPux& zyyFYFW099~K4{WrnT;i!yr$-|JiV~!j+7@UE}iqe!8YM(XZ5nPPJEy>Jk+r#*1l+Q zrdcTZU9o_7D5Oi7rK+S}&QX);K6l@$&vo(5DBg^+v(8_o;G)o0-PaD#qJF z(*2N=^V0+TcaGZKA3x^F$jFGFx^X{)Y&mPerv+$S!039Dter_9?YYn>?SAv5b4O1` zQZ<)HI8uK_N14%~g`m8~eUxe3i#=(=tctmmYbR7&J*&1M@ zf%tm@9odJT29-azFVv&9+xNP!EL`}Q%O=`ZH?Jaka~E(7BEDEUy^XQbtzWy`K#@y0 z3V3Y~rc#S@7F6F3b za9I3^R~tZp_5P5I4-S;`Hq1d$)e_#xnAot+`1 zz8?8Ij}RKdUcX4NDqTaSgad$y6=;)38u05?T?(j&6zr$JgvbEqW$&~;Xxcx&F};Kh zdeT%!MvBn48hYyzv*m4o#(N>Jq(#(08cOLSJJhvl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