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 00a76c21010..f0833df9390 100644 Binary files a/icons/mob/clothing/belt_mirror.dmi and b/icons/mob/clothing/belt_mirror.dmi differ