From 2eccf3cea0a090302be8b110b77c7a9f728897f5 Mon Sep 17 00:00:00 2001 From: Kapu1178 <75460809+Kapu1178@users.noreply.github.com> Date: Tue, 16 Aug 2022 13:50:21 -0400 Subject: [PATCH] Cleans up update_icons, makes the update_icon_updates_onmob element bespoke, updates CODEOWNERS (#69179) * I just realised this is all one commit. * hail marry * fix. * FIXES IT FOR REAL * Update code/datums/elements/update_icon_updates_onmob.dm --- .github/CODEOWNERS | 2 + code/_onclick/click.dm | 4 +- code/_onclick/hud/screen_objects.dm | 2 +- code/_onclick/other_mobs.dm | 4 +- code/datums/components/bloodysoles.dm | 2 +- code/datums/components/twohanded.dm | 4 +- .../elements/update_icon_updates_onmob.dm | 15 ++- .../effects/decals/cleanable/humans.dm | 4 +- code/game/objects/items.dm | 24 ++-- code/game/objects/items/RCL.dm | 2 +- code/game/objects/items/chainsaw.dm | 2 +- code/game/objects/items/cigs_lighters.dm | 12 +- code/game/objects/items/crayons.dm | 2 +- code/game/objects/items/defib.dm | 2 +- code/game/objects/items/flamethrower.dm | 2 +- code/game/objects/items/his_grace.dm | 2 +- code/game/objects/items/latexballoon.dm | 4 +- code/game/objects/items/melee/energy.dm | 2 +- code/game/objects/items/shields.dm | 2 +- code/game/objects/items/storage/belt.dm | 10 +- code/game/objects/items/tanks/watertank.dm | 2 +- code/game/objects/items/tools/weldingtool.dm | 2 +- code/game/objects/items/toys.dm | 2 +- code/game/objects/items/weaponry.dm | 4 +- code/modules/admin/topic.dm | 2 +- .../abductor/equipment/abduction_gear.dm | 6 +- .../changeling/powers/mutations.dm | 6 +- .../changeling/powers/tiny_prick.dm | 2 +- .../antagonists/fugitive/fugitive_outfits.dm | 4 +- code/modules/antagonists/nukeop/clownop.dm | 4 +- code/modules/antagonists/nukeop/nukeop.dm | 6 +- code/modules/antagonists/thief/thief.dm | 4 +- .../antagonists/traitor/datum_traitor.dm | 2 +- code/modules/clothing/glasses/_glasses.dm | 6 +- .../clothing/glasses/engine_goggles.dm | 2 +- code/modules/clothing/glasses/hud.dm | 2 +- code/modules/clothing/gloves/_gloves.dm | 2 +- code/modules/clothing/head/_head.dm | 4 +- code/modules/clothing/head/animalears.dm | 2 +- code/modules/clothing/head/hardhat.dm | 2 +- code/modules/clothing/head/helmet.dm | 6 +- code/modules/clothing/head/soft_caps.dm | 2 +- code/modules/clothing/head/wig.dm | 2 +- code/modules/clothing/masks/_masks.dm | 2 +- code/modules/clothing/masks/animal_masks.dm | 4 +- code/modules/clothing/masks/costume.dm | 2 +- code/modules/clothing/masks/gasmask.dm | 6 +- code/modules/clothing/shoes/_shoes.dm | 4 +- code/modules/clothing/shoes/bananashoes.dm | 2 +- code/modules/clothing/shoes/magboots.dm | 2 +- code/modules/clothing/shoes/wheelys.dm | 2 +- code/modules/clothing/spacesuits/plasmamen.dm | 2 +- code/modules/clothing/suits/_suits.dm | 2 +- .../modules/clothing/suits/reactive_armour.dm | 2 +- code/modules/clothing/suits/toggles.dm | 4 +- code/modules/clothing/under/_under.dm | 18 +-- code/modules/explorer_drone/loot.dm | 4 +- code/modules/fishing/fishing_rod.dm | 4 +- code/modules/forensics/forensics_helpers.dm | 6 +- code/modules/hydroponics/grown/flowers.dm | 4 +- code/modules/jobs/job_types/assistant.dm | 2 +- code/modules/mining/equipment/mining_tools.dm | 2 +- code/modules/mob/inventory.dm | 6 +- .../alien/humanoid/humanoid_update_icons.dm | 8 +- .../carbon/alien/larva/larva_update_icons.dm | 2 +- code/modules/mob/living/carbon/carbon.dm | 20 ++-- .../mob/living/carbon/carbon_defense.dm | 6 +- .../mob/living/carbon/carbon_update_icons.dm | 66 ++++++++--- code/modules/mob/living/carbon/human/dummy.dm | 1 + code/modules/mob/living/carbon/human/human.dm | 16 +-- .../mob/living/carbon/human/human_defense.dm | 24 ++-- .../living/carbon/human/human_stripping.dm | 2 +- .../living/carbon/human/human_update_icons.dm | 108 +++++------------- .../mob/living/carbon/human/inventory.dm | 50 ++++---- .../mob/living/carbon/human/species.dm | 10 +- code/modules/mob/living/carbon/inventory.dm | 22 ++-- code/modules/mob/living/living.dm | 4 +- .../simple_animal/friendly/drone/inventory.dm | 8 +- .../friendly/drone/visuals_icons.dm | 12 +- .../living/simple_animal/guardian/guardian.dm | 6 +- .../simple_animal/guardian/types/dextrous.dm | 2 +- .../hostile/gorilla/visuals_icons.dm | 4 +- .../mob/living/simple_animal/simple_animal.dm | 4 +- code/modules/mob/mob.dm | 2 +- code/modules/mob/mob_update_icons.dm | 52 ++++++--- code/modules/mod/mod_activation.dm | 14 +-- code/modules/projectiles/gun.dm | 2 +- .../guns/energy/kinetic_accelerator.dm | 4 +- .../projectiles/guns/energy/laser_gatling.dm | 4 +- .../reagents/reagent_containers/spray.dm | 2 +- .../surgery/bodyparts/dismemberment.dm | 10 +- .../surgery/organs/stomach/_stomach.dm | 8 +- 92 files changed, 380 insertions(+), 352 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 472e412b7b8..b9c112ca205 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -121,7 +121,9 @@ # Kapu1178 /code/modules/surgery/bodyparts/ @Kapu1178 +/code/modules/surgery/organs/ @Kapu1178 /code/modules/mob/living/carbon/carbon_update_icons.dm @Kapu1178 +/code/modules/mob/living/carbon/human/human_update_icons.dm @Kapu1178 # MrStonedOne diff --git a/code/_onclick/click.dm b/code/_onclick/click.dm index fec84e0006e..0bc50f25c34 100644 --- a/code/_onclick/click.dm +++ b/code/_onclick/click.dm @@ -128,11 +128,11 @@ if(W == A) if(LAZYACCESS(modifiers, RIGHT_CLICK)) W.attack_self_secondary(src, modifiers) - update_inv_hands() + update_held_items() return else W.attack_self(src, modifiers) - update_inv_hands() + update_held_items() return //These are always reachable. diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index 062c751f9d4..dc4cee4b655 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -144,7 +144,7 @@ return inv_item.Click(location, control, params) if(usr.attack_ui(slot_id, params)) - usr.update_inv_hands() + usr.update_held_items() return TRUE /atom/movable/screen/inventory/MouseEntered(location, control, params) diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 2882139d7a4..f7f00de4579 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -275,14 +275,14 @@ /mob/living/simple_animal/resolve_unarmed_attack(atom/attack_target, list/modifiers) if(dextrous && (isitem(attack_target) || !combat_mode)) attack_target.attack_hand(src, modifiers) - update_inv_hands() + update_held_items() else return ..() /mob/living/simple_animal/resolve_right_click_attack(atom/target, list/modifiers) if(dextrous && (isitem(target) || !combat_mode)) . = target.attack_hand_secondary(src, modifiers) - update_inv_hands() + update_held_items() else return ..() diff --git a/code/datums/components/bloodysoles.dm b/code/datums/components/bloodysoles.dm index cae768597a2..6e4f8c2e920 100644 --- a/code/datums/components/bloodysoles.dm +++ b/code/datums/components/bloodysoles.dm @@ -272,7 +272,7 @@ human.overlays_standing[SHOES_LAYER] = bloody_feet human.apply_overlay(SHOES_LAYER) else - human.update_inv_shoes() + human.update_worn_shoes() /datum/component/bloodysoles/feet/add_parent_to_footprint(obj/effect/decal/cleanable/blood/footprints/FP) if(!ishuman(wielder)) diff --git a/code/datums/components/twohanded.dm b/code/datums/components/twohanded.dm index 1b69c210843..2f0746ca534 100644 --- a/code/datums/components/twohanded.dm +++ b/code/datums/components/twohanded.dm @@ -244,9 +244,9 @@ if(istype(user)) // tk showed that we might not have a mob here if(user.get_item_by_slot(ITEM_SLOT_BACK) == parent) - user.update_inv_back() + user.update_worn_back() else - user.update_inv_hands() + user.update_held_items() // if the item requires two handed drop the item on unwield if(require_twohands && can_drop) diff --git a/code/datums/elements/update_icon_updates_onmob.dm b/code/datums/elements/update_icon_updates_onmob.dm index 7d1cb8d287d..47a7d689fd3 100644 --- a/code/datums/elements/update_icon_updates_onmob.dm +++ b/code/datums/elements/update_icon_updates_onmob.dm @@ -1,7 +1,14 @@ //update_icon() may change the onmob icons //Very good name, I know +/datum/element/update_icon_updates_onmob + element_flags = ELEMENT_BESPOKE + id_arg_index = 2 + ///The ITEM_SLOT_X flags to update on the parent mob. (Ex: ITEM_SLOT_HANDS|ITEM_SLOT_FEET) + var/update_flags = NONE + ///Should the element call [/mob/proc/update_body()] in addition to clothing updates? + var/update_body = FALSE -/datum/element/update_icon_updates_onmob/Attach(datum/target) +/datum/element/update_icon_updates_onmob/Attach(datum/target, flags, body = FALSE) . = ..() if(!istype(target, /obj/item)) return ELEMENT_INCOMPATIBLE @@ -13,6 +20,8 @@ if(ismob(target.loc)) var/mob/M = target.loc if(M.is_holding(target)) - M.update_inv_hands() + M.update_held_items() else - M.regenerate_icons() //yeah this is shit, but we don't know which update_foo() proc to call instead so we'll call them all + M.update_clothing(update_flags) + if(update_body) + M.update_body() diff --git a/code/game/objects/effects/decals/cleanable/humans.dm b/code/game/objects/effects/decals/cleanable/humans.dm index 0c4f8332bf3..2a55360048f 100644 --- a/code/game/objects/effects/decals/cleanable/humans.dm +++ b/code/game/objects/effects/decals/cleanable/humans.dm @@ -377,10 +377,10 @@ GLOBAL_LIST_EMPTY(bloody_footprints_cache) var/mob/living/carbon/human/splashed_human = iter_atom if(splashed_human.wear_suit) splashed_human.wear_suit.add_blood_DNA(blood_dna_info) - splashed_human.update_inv_wear_suit() //updates mob overlays to show the new blood (no refresh) + splashed_human.update_worn_oversuit() //updates mob overlays to show the new blood (no refresh) if(splashed_human.w_uniform) splashed_human.w_uniform.add_blood_DNA(blood_dna_info) - splashed_human.update_inv_w_uniform() //updates mob overlays to show the new blood (no refresh) + splashed_human.update_worn_undersuit() //updates mob overlays to show the new blood (no refresh) splatter_strength-- if(splatter_strength <= 0) // we used all the puff so we delete it. qdel(src) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 9d8edc39696..acf083fe185 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -833,29 +833,29 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons var/mob/owner = loc var/flags = slot_flags if(flags & ITEM_SLOT_OCLOTHING) - owner.update_inv_wear_suit() + owner.update_worn_oversuit() if(flags & ITEM_SLOT_ICLOTHING) - owner.update_inv_w_uniform() + owner.update_worn_undersuit() if(flags & ITEM_SLOT_GLOVES) - owner.update_inv_gloves() + owner.update_worn_gloves() if(flags & ITEM_SLOT_EYES) - owner.update_inv_glasses() + owner.update_worn_glasses() if(flags & ITEM_SLOT_EARS) owner.update_inv_ears() if(flags & ITEM_SLOT_MASK) - owner.update_inv_wear_mask() + owner.update_worn_mask() if(flags & ITEM_SLOT_HEAD) - owner.update_inv_head() + owner.update_worn_head() if(flags & ITEM_SLOT_FEET) - owner.update_inv_shoes() + owner.update_worn_shoes() if(flags & ITEM_SLOT_ID) - owner.update_inv_wear_id() + owner.update_worn_id() if(flags & ITEM_SLOT_BELT) - owner.update_inv_belt() + owner.update_worn_belt() if(flags & ITEM_SLOT_BACK) - owner.update_inv_back() + owner.update_worn_back() if(flags & ITEM_SLOT_NECK) - owner.update_inv_neck() + owner.update_worn_neck() ///Returns the temperature of src. If you want to know if an item is hot use this proc. /obj/item/proc/get_temperature() @@ -1105,7 +1105,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons var/hand_index = M.get_held_index_of_item(src) if(hand_index) M.held_items[hand_index] = null - M.update_inv_hands() + M.update_held_items() if(M.client) M.client.screen -= src layer = initial(layer) diff --git a/code/game/objects/items/RCL.dm b/code/game/objects/items/RCL.dm index de5e72f8eb9..c288927a6b8 100644 --- a/code/game/objects/items/RCL.dm +++ b/code/game/objects/items/RCL.dm @@ -25,7 +25,7 @@ /obj/item/rcl/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) AddComponent(/datum/component/two_handed, wield_callback = CALLBACK(src, .proc/on_wield), unwield_callback = CALLBACK(src, .proc/on_unwield)) /// triggered on wield of two handed item diff --git a/code/game/objects/items/chainsaw.dm b/code/game/objects/items/chainsaw.dm index bba0fa956cb..ca5ad8772d0 100644 --- a/code/game/objects/items/chainsaw.dm +++ b/code/game/objects/items/chainsaw.dm @@ -63,7 +63,7 @@ toolspeed = on ? 0.5 : initial(toolspeed) //Turning it on halves the speed if(src == user.get_active_held_item()) //update inhands - user.update_inv_hands() + user.update_held_items() update_action_buttons() /obj/item/chainsaw/doomslayer diff --git a/code/game/objects/items/cigs_lighters.dm b/code/game/objects/items/cigs_lighters.dm index bcfff42cbae..80f1c9daee9 100644 --- a/code/game/objects/items/cigs_lighters.dm +++ b/code/game/objects/items/cigs_lighters.dm @@ -172,7 +172,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(starts_lit) light() AddComponent(/datum/component/knockoff, 90, list(BODY_ZONE_PRECISE_MOUTH), slot_flags) //90% to knock off when wearing a mask - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_MASK|ITEM_SLOT_HANDS) icon_state = icon_off inhand_icon_state = inhand_icon_off @@ -267,8 +267,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM //can't think of any other way to update the overlays :< if(ismob(loc)) var/mob/M = loc - M.update_inv_wear_mask() - M.update_inv_hands() + M.update_worn_mask() + M.update_held_items() /obj/item/clothing/mask/cigarette/extinguish() if(!lit) @@ -286,8 +286,8 @@ CIGARETTE PACKETS ARE IN FANCY.DM if(ismob(loc)) var/mob/living/M = loc to_chat(M, span_notice("Your [name] goes out.")) - M.update_inv_wear_mask() - M.update_inv_hands() + M.update_worn_mask() + M.update_held_items() /// Handles processing the reagents in the cigarette. /obj/item/clothing/mask/cigarette/proc/handle_reagents() @@ -609,7 +609,7 @@ CIGARETTE PACKETS ARE IN FANCY.DM update_icon() inhand_icon_state = icon_off - user?.update_inv_wear_mask() + user?.update_worn_mask() STOP_PROCESSING(SSobj, src) /obj/item/clothing/mask/cigarette/pipe/attackby(obj/item/thing, mob/user, params) diff --git a/code/game/objects/items/crayons.dm b/code/game/objects/items/crayons.dm index 86e557d67bf..219e27c4f24 100644 --- a/code/game/objects/items/crayons.dm +++ b/code/game/objects/items/crayons.dm @@ -725,7 +725,7 @@ var/obj/item/target_item = target var/mob/living/holder = target.loc if(holder.is_holding(target_item)) - holder.update_inv_hands() + holder.update_held_items() else holder.update_clothing(target_item.slot_flags) SEND_SIGNAL(target, COMSIG_OBJ_PAINTED, color_is_dark) diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index 62a4ef7b3ac..8651f21bf85 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -342,7 +342,7 @@ /obj/item/shockpaddles/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS|ITEM_SLOT_BACK) AddComponent(/datum/component/two_handed, force_unwielded=8, force_wielded=12) /obj/item/shockpaddles/Destroy() diff --git a/code/game/objects/items/flamethrower.dm b/code/game/objects/items/flamethrower.dm index 1ba161adb87..1d71b76a96e 100644 --- a/code/game/objects/items/flamethrower.dm +++ b/code/game/objects/items/flamethrower.dm @@ -33,7 +33,7 @@ /obj/item/flamethrower/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) /obj/item/flamethrower/Destroy() if(weldtool) diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index 453af6f6e7c..e59282ae9ff 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -269,7 +269,7 @@ update_appearance() playsound(src, 'sound/effects/his_grace_ascend.ogg', 100) if(istype(master)) - master.update_inv_hands() + master.update_held_items() master.visible_message("Gods will be watching.") name = "[master]'s mythical toolbox of three powers" master.client?.give_award(/datum/award/achievement/misc/ascension, master) diff --git a/code/game/objects/items/latexballoon.dm b/code/game/objects/items/latexballoon.dm index 86c531d8030..78df10ab7c3 100644 --- a/code/game/objects/items/latexballoon.dm +++ b/code/game/objects/items/latexballoon.dm @@ -20,7 +20,7 @@ return icon_state = "latexballon_blow" inhand_icon_state = "latexballon" - user.update_inv_hands() + user.update_held_items() to_chat(user, span_notice("You blow up [src] with [tank].")) air_contents = tank.remove_air_volume(3) @@ -38,7 +38,7 @@ inhand_icon_state = "lgloves" if(isliving(loc)) var/mob/living/user = src.loc - user.update_inv_hands() + user.update_held_items() loc.assume_air(air_contents) /obj/item/latexballon/ex_act(severity, target) diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index 02cc1502c4a..3176e9eae18 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -262,7 +262,7 @@ to_chat(user, span_warning("RNBW_ENGAGE")) if(force >= active_force) icon_state = "[initial(icon_state)]_on_rainbow" - user.update_inv_hands() + user.update_held_items() /obj/item/melee/energy/sword/pirate name = "energy cutlass" diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 150fdfdf33f..c16c46e8563 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -129,7 +129,7 @@ /obj/item/shield/riot/flash/Initialize(mapload) . = ..() embedded_flash = new(src) - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) /obj/item/shield/riot/flash/attack(mob/living/M, mob/user) . = embedded_flash.attack(M, user) diff --git a/code/game/objects/items/storage/belt.dm b/code/game/objects/items/storage/belt.dm index 89cdcd20d5c..41c14344e73 100644 --- a/code/game/objects/items/storage/belt.dm +++ b/code/game/objects/items/storage/belt.dm @@ -779,14 +779,16 @@ /obj/item/storage/belt/sabre/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_BELT) atom_storage.max_slots = 1 atom_storage.rustle_sound = FALSE atom_storage.max_specific_storage = WEIGHT_CLASS_BULKY - atom_storage.set_holdable(list( - /obj/item/melee/sabre, - )) + atom_storage.set_holdable( + list( + /obj/item/melee/sabre, + ) + ) /obj/item/storage/belt/sabre/examine(mob/user) . = ..() diff --git a/code/game/objects/items/tanks/watertank.dm b/code/game/objects/items/tanks/watertank.dm index 76e09084823..b63034fac1d 100644 --- a/code/game/objects/items/tanks/watertank.dm +++ b/code/game/objects/items/tanks/watertank.dm @@ -469,7 +469,7 @@ var/used_amount = inj_am / usage_ratio reagents.trans_to(user, used_amount, multiplier=usage_ratio, methods = INJECT) update_appearance() - user.update_inv_back() //for overlays update + user.update_worn_back() //for overlays update /datum/action/item_action/activate_injector name = "Activate Injector" diff --git a/code/game/objects/items/tools/weldingtool.dm b/code/game/objects/items/tools/weldingtool.dm index 3adcdf58ba5..fb927d91721 100644 --- a/code/game/objects/items/tools/weldingtool.dm +++ b/code/game/objects/items/tools/weldingtool.dm @@ -51,7 +51,7 @@ /obj/item/weldingtool/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) AddElement(/datum/element/tool_flash, light_range) create_reagents(max_fuel) reagents.add_reagent(/datum/reagent/fuel, max_fuel) diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index 3bc3d16ee61..3959765f8f6 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -44,7 +44,7 @@ /obj/item/toy/waterballoon/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) create_reagents(10) /obj/item/toy/waterballoon/attack(mob/living/carbon/human/M, mob/user) diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index 553dbb2e00f..173195462ac 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -393,7 +393,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 /obj/item/switchblade/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) AddComponent(/datum/component/butchering, \ speed = 7 SECONDS, \ effectiveness = 100, \ @@ -964,7 +964,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 wield_callback = CALLBACK(src, .proc/on_wield), \ unwield_callback = CALLBACK(src, .proc/on_unwield), \ ) - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) /obj/item/highfrequencyblade/update_icon_state() icon_state = "hfrequency[HAS_TRAIT(src, TRAIT_WIELDED)]" diff --git a/code/modules/admin/topic.dm b/code/modules/admin/topic.dm index 6142c571790..022d7431893 100644 --- a/code/modules/admin/topic.dm +++ b/code/modules/admin/topic.dm @@ -903,7 +903,7 @@ return var/obj/item/new_item = new H.dna.species.species_cookie(H) if(H.put_in_hands(new_item)) - H.update_inv_hands() + H.update_held_items() else qdel(new_item) log_admin("[key_name(H)] has their hands full, so they did not receive their [new_item.name], spawned by [key_name(src.owner)].") diff --git a/code/modules/antagonists/abductor/equipment/abduction_gear.dm b/code/modules/antagonists/abductor/equipment/abduction_gear.dm index 066dcb031e2..37cdf08ccb7 100644 --- a/code/modules/antagonists/abductor/equipment/abduction_gear.dm +++ b/code/modules/antagonists/abductor/equipment/abduction_gear.dm @@ -55,7 +55,7 @@ icon_state = "vest_stealth" if(ishuman(loc)) var/mob/living/carbon/human/H = loc - H.update_inv_wear_suit() + H.update_worn_oversuit() update_action_buttons() /obj/item/clothing/suit/armor/abductor/vest/item_action_slot_check(slot, mob/user) @@ -77,7 +77,7 @@ M.icon_state = disguise.icon_state M.cut_overlays() M.add_overlay(disguise.overlays) - M.update_inv_hands() + M.update_held_items() /obj/item/clothing/suit/armor/abductor/vest/proc/DeactivateStealth() if(!stealth_active) @@ -458,7 +458,7 @@ Congratulations! You are now trained for invasive xenobiology research!"} /obj/item/melee/baton/abductor/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HANDS) /obj/item/melee/baton/abductor/proc/toggle(mob/living/user=usr) if(!AbductorCheck(user)) diff --git a/code/modules/antagonists/changeling/powers/mutations.dm b/code/modules/antagonists/changeling/powers/mutations.dm index 518f07f01e8..ff10a808899 100644 --- a/code/modules/antagonists/changeling/powers/mutations.dm +++ b/code/modules/antagonists/changeling/powers/mutations.dm @@ -33,7 +33,7 @@ if(!silent) playsound(user, 'sound/effects/blobattack.ogg', 30, TRUE) user.visible_message(span_warning("With a sickening crunch, [user] reforms [user.p_their()] [weapon_name_simple] into an arm!"), span_notice("We assimilate the [weapon_name_simple] back into our body."), "You hear organic matter ripping and tearing!") qdel(blade) - target.update_inv_hands() + target.update_held_items() /datum/action/changeling/sting/extract_dna name = "Extract DNA Sting" diff --git a/code/modules/antagonists/fugitive/fugitive_outfits.dm b/code/modules/antagonists/fugitive/fugitive_outfits.dm index a9a4bec2033..f494a0f6f8b 100644 --- a/code/modules/antagonists/fugitive/fugitive_outfits.dm +++ b/code/modules/antagonists/fugitive/fugitive_outfits.dm @@ -8,7 +8,7 @@ // This outfit is used by the assets SS, which is ran before the atoms SS if(SSatoms.initialized == INITIALIZATION_INSSATOMS) prisoner.w_uniform?.update_greyscale() - prisoner.update_inv_w_uniform() + prisoner.update_worn_undersuit() if(visualsOnly) return prisoner.fully_replace_character_name(null,"NTP #CC-0[rand(111,999)]") //same as the lavaland prisoner transport, but this time they are from CC, or CentCom @@ -32,7 +32,7 @@ /datum/outfit/waldo/post_equip(mob/living/carbon/human/equipped_on, visualsOnly=FALSE) equipped_on.w_uniform?.update_greyscale() - equipped_on.update_inv_w_uniform() + equipped_on.update_worn_undersuit() if(visualsOnly) return equipped_on.fully_replace_character_name(null,"Waldo") diff --git a/code/modules/antagonists/nukeop/clownop.dm b/code/modules/antagonists/nukeop/clownop.dm index 3bed41d605d..e1a1ae49e18 100644 --- a/code/modules/antagonists/nukeop/clownop.dm +++ b/code/modules/antagonists/nukeop/clownop.dm @@ -74,7 +74,7 @@ /datum/outfit/clown_operative/post_equip(mob/living/carbon/human/H, visualsOnly) var/obj/item/mod/module/armor_booster/booster = locate() in H.back booster.active = TRUE - H.update_inv_back() + H.update_worn_back() /datum/outfit/clown_operative_elite name = "Clown Operative (Elite, Preview only)" @@ -85,4 +85,4 @@ /datum/outfit/clown_operative_elite/post_equip(mob/living/carbon/human/H, visualsOnly) var/obj/item/mod/module/armor_booster/booster = locate() in H.back booster.active = TRUE - H.update_inv_back() + H.update_worn_back() diff --git a/code/modules/antagonists/nukeop/nukeop.dm b/code/modules/antagonists/nukeop/nukeop.dm index bb963939985..a4cf09b76f6 100644 --- a/code/modules/antagonists/nukeop/nukeop.dm +++ b/code/modules/antagonists/nukeop/nukeop.dm @@ -197,7 +197,7 @@ /datum/outfit/nuclear_operative/post_equip(mob/living/carbon/human/H, visualsOnly) var/obj/item/mod/module/armor_booster/booster = locate() in H.back booster.active = TRUE - H.update_inv_back() + H.update_worn_back() /datum/outfit/nuclear_operative_elite name = "Nuclear Operative (Elite, Preview only)" @@ -210,10 +210,10 @@ /datum/outfit/nuclear_operative_elite/post_equip(mob/living/carbon/human/H, visualsOnly) var/obj/item/mod/module/armor_booster/booster = locate() in H.back booster.active = TRUE - H.update_inv_back() + H.update_worn_back() var/obj/item/shield/energy/shield = locate() in H.held_items shield.icon_state = "[shield.base_icon_state]1" - H.update_inv_hands() + H.update_held_items() /datum/antagonist/nukeop/leader name = "Nuclear Operative Leader" diff --git a/code/modules/antagonists/thief/thief.dm b/code/modules/antagonists/thief/thief.dm index 181185ed6ac..3576ad97340 100644 --- a/code/modules/antagonists/thief/thief.dm +++ b/code/modules/antagonists/thief/thief.dm @@ -161,7 +161,7 @@ // This outfit is used by the assets SS, which is ran before the atoms SS if(SSatoms.initialized == INITIALIZATION_INSSATOMS) thief.w_uniform?.update_greyscale() - thief.update_inv_w_uniform() + thief.update_worn_undersuit() thief.physique = FEMALE //update_body() and gender block or something thief.hair_color = "#2A71DC" //hair color dna block thief.skin_tone = "caucasian2" //skin tone dna block @@ -174,4 +174,4 @@ // This outfit is used by the assets SS, which is ran before the atoms SS if (SSatoms.initialized == INITIALIZATION_INSSATOMS) thief.wear_mask?.update_greyscale() - thief.update_inv_wear_mask() + thief.update_worn_mask() diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm index c80f2cd0a82..7f1cc05f09e 100644 --- a/code/modules/antagonists/traitor/datum_traitor.dm +++ b/code/modules/antagonists/traitor/datum_traitor.dm @@ -332,4 +332,4 @@ sword.icon_state = "e_sword_on_red" sword.worn_icon_state = "e_sword_on_red" - H.update_inv_hands() + H.update_held_items() diff --git a/code/modules/clothing/glasses/_glasses.dm b/code/modules/clothing/glasses/_glasses.dm index fe7e1a6f44a..e27a11629f9 100644 --- a/code/modules/clothing/glasses/_glasses.dm +++ b/code/modules/clothing/glasses/_glasses.dm @@ -405,7 +405,7 @@ /obj/item/clothing/glasses/blindfold/white/visual_equipped(mob/living/carbon/human/user, slot) if(ishuman(user) && slot == ITEM_SLOT_EYES) update_icon(ALL, user) - user.update_inv_glasses() //Color might have been changed by update_icon. + user.update_worn_glasses() //Color might have been changed by update_icon. ..() /obj/item/clothing/glasses/blindfold/white/update_icon(updates=ALL, mob/living/carbon/human/user) @@ -624,11 +624,11 @@ if(amount < SANITY_UNSTABLE) icon_state = "salesman_fzz" desc = "A pair of glasses, the lenses are full of TV static. They've certainly seen better days..." - bigshot.update_inv_glasses() + bigshot.update_worn_glasses() else icon_state = initial(icon_state) desc = initial(desc) - bigshot.update_inv_glasses() + bigshot.update_worn_glasses() /obj/item/clothing/glasses/nightmare_vision name = "nightmare vision goggles" diff --git a/code/modules/clothing/glasses/engine_goggles.dm b/code/modules/clothing/glasses/engine_goggles.dm index f62465c4b14..9f30fd44757 100644 --- a/code/modules/clothing/glasses/engine_goggles.dm +++ b/code/modules/clothing/glasses/engine_goggles.dm @@ -26,7 +26,7 @@ /obj/item/clothing/glasses/meson/engine/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_EYES) START_PROCESSING(SSobj, src) update_appearance() diff --git a/code/modules/clothing/glasses/hud.dm b/code/modules/clothing/glasses/hud.dm index 0435c0c7c48..b567b5e03e1 100644 --- a/code/modules/clothing/glasses/hud.dm +++ b/code/modules/clothing/glasses/hud.dm @@ -236,7 +236,7 @@ else icon_state = "purple" change_glass_color(user, /datum/client_colour/glass_colour/purple) - user.update_inv_glasses() + user.update_worn_glasses() /obj/item/clothing/glasses/hud/toggle/thermal/emp_act(severity) . = ..() diff --git a/code/modules/clothing/gloves/_gloves.dm b/code/modules/clothing/gloves/_gloves.dm index 269a8541695..cad378713c9 100644 --- a/code/modules/clothing/gloves/_gloves.dm +++ b/code/modules/clothing/gloves/_gloves.dm @@ -39,7 +39,7 @@ ..() if(ismob(loc)) var/mob/M = loc - M.update_inv_gloves() + M.update_worn_gloves() /obj/item/clothing/gloves/wirecutter_act(mob/living/user, obj/item/I) . = ..() diff --git a/code/modules/clothing/head/_head.dm b/code/modules/clothing/head/_head.dm index 1dabbf0ee5d..34d01faa2a6 100644 --- a/code/modules/clothing/head/_head.dm +++ b/code/modules/clothing/head/_head.dm @@ -37,7 +37,7 @@ H.visible_message(span_warning("[src] knocks [WH] off [H]'s head!"), span_warning("[WH] is suddenly knocked off your head by [src]!")) if(H.equip_to_slot_if_possible(src, ITEM_SLOT_HEAD, 0, 1, 1)) H.visible_message(span_notice("[src] lands neatly on [H]'s head!"), span_notice("[src] lands perfectly onto your head!")) - H.update_inv_hands() //force update hands to prevent ghost sprites appearing when throw mode is on + H.update_held_items() //force update hands to prevent ghost sprites appearing when throw mode is on return if(iscyborg(hit_atom)) var/mob/living/silicon/robot/R = hit_atom @@ -72,4 +72,4 @@ ..() if(ismob(loc)) var/mob/M = loc - M.update_inv_head() + M.update_worn_head() diff --git a/code/modules/clothing/head/animalears.dm b/code/modules/clothing/head/animalears.dm index 13890bf507f..4c60167ff7d 100644 --- a/code/modules/clothing/head/animalears.dm +++ b/code/modules/clothing/head/animalears.dm @@ -9,7 +9,7 @@ /obj/item/clothing/head/kitty/visual_equipped(mob/living/carbon/human/user, slot) if(ishuman(user) && slot == ITEM_SLOT_HEAD) update_icon(ALL, user) - user.update_inv_head() //Color might have been changed by update_appearance. + user.update_worn_head() //Color might have been changed by update_appearance. ..() /obj/item/clothing/head/kitty/update_icon(updates=ALL, mob/living/carbon/human/user) diff --git a/code/modules/clothing/head/hardhat.dm b/code/modules/clothing/head/hardhat.dm index 4e99ba8ff54..6d7bcbc58e0 100644 --- a/code/modules/clothing/head/hardhat.dm +++ b/code/modules/clothing/head/hardhat.dm @@ -23,7 +23,7 @@ /obj/item/clothing/head/hardhat/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HEAD) /obj/item/clothing/head/hardhat/attack_self(mob/living/user) toggle_helmet_light(user) diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm index c9fd22b3f85..0dbd59666bd 100644 --- a/code/modules/clothing/head/helmet.dm +++ b/code/modules/clothing/head/helmet.dm @@ -17,7 +17,7 @@ /obj/item/clothing/head/helmet/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_HEAD) /obj/item/clothing/head/helmet/sec @@ -136,7 +136,7 @@ icon_state = "[initial(icon_state)][up ? "up" : ""]" to_chat(user, span_notice("[up ? alt_toggle_message : toggle_message] \the [src].")) - user.update_inv_head() + user.update_worn_head() if(iscarbon(user)) var/mob/living/carbon/carbon_user = user carbon_user.head_update(src, forced = TRUE) @@ -343,7 +343,7 @@ /obj/item/clothing/head/helmet/rus_helmet/Initialize(mapload) . = ..() - + create_storage(type = /datum/storage/pockets/helmet) /obj/item/clothing/head/helmet/rus_ushanka diff --git a/code/modules/clothing/head/soft_caps.dm b/code/modules/clothing/head/soft_caps.dm index fc51b45e237..0d143a24175 100644 --- a/code/modules/clothing/head/soft_caps.dm +++ b/code/modules/clothing/head/soft_caps.dm @@ -36,7 +36,7 @@ else icon_state = "[soft_type]soft" to_chat(user, span_notice("You flip the hat back in normal position.")) - usr.update_inv_head() //so our mob-overlays update + usr.update_worn_head() //so our mob-overlays update /obj/item/clothing/head/soft/examine(mob/user) . = ..() diff --git a/code/modules/clothing/head/wig.dm b/code/modules/clothing/head/wig.dm index dfa2a4a899b..f99f5cad4e5 100644 --- a/code/modules/clothing/head/wig.dm +++ b/code/modules/clothing/head/wig.dm @@ -107,4 +107,4 @@ if (color != user.hair_color) // only update if necessary add_atom_colour(user.hair_color, FIXED_COLOUR_PRIORITY) update_appearance() - user.update_inv_head() + user.update_worn_head() diff --git a/code/modules/clothing/masks/_masks.dm b/code/modules/clothing/masks/_masks.dm index a0007239abc..4e793306c3b 100644 --- a/code/modules/clothing/masks/_masks.dm +++ b/code/modules/clothing/masks/_masks.dm @@ -57,7 +57,7 @@ ..() if(ismob(loc)) var/mob/M = loc - M.update_inv_wear_mask() + M.update_worn_mask() //Proc that moves gas/breath masks out of the way, disabling them and allowing pill/food consumption /obj/item/clothing/mask/proc/adjustmask(mob/living/user) diff --git a/code/modules/clothing/masks/animal_masks.dm b/code/modules/clothing/masks/animal_masks.dm index 75976058a60..4f16e199673 100644 --- a/code/modules/clothing/masks/animal_masks.dm +++ b/code/modules/clothing/masks/animal_masks.dm @@ -70,7 +70,7 @@ GLOBAL_LIST_INIT(cursed_animal_masks, list( if(update_speech_mod) RegisterSignal(M, COMSIG_MOB_SAY, .proc/handle_speech) to_chat(M, span_userdanger("[src] was cursed!")) - M.update_inv_wear_mask() + M.update_worn_mask() /obj/item/clothing/mask/animal/proc/clear_curse() REMOVE_TRAIT(src, TRAIT_NODROP, CURSED_MASK_TRAIT) @@ -87,7 +87,7 @@ GLOBAL_LIST_INIT(cursed_animal_masks, list( to_chat(M, span_notice("[src]'s curse has been lifted!")) if(update_speech_mod) UnregisterSignal(M, COMSIG_MOB_SAY) - M.update_inv_wear_mask() + M.update_worn_mask() /obj/item/clothing/mask/animal/handle_speech(datum/source, list/speech_args) if(clothing_flags & VOICEBOX_DISABLED) diff --git a/code/modules/clothing/masks/costume.dm b/code/modules/clothing/masks/costume.dm index 32dd4f59aaa..59f83fe80b6 100644 --- a/code/modules/clothing/masks/costume.dm +++ b/code/modules/clothing/masks/costume.dm @@ -23,7 +23,7 @@ /obj/item/clothing/mask/joy/reskin_obj(mob/user) . = ..() - user.update_inv_wear_mask() + user.update_worn_mask() current_skin = null//so we can infinitely reskin /obj/item/clothing/mask/mummy diff --git a/code/modules/clothing/masks/gasmask.dm b/code/modules/clothing/masks/gasmask.dm index 306cb0fab5e..398e4769f50 100644 --- a/code/modules/clothing/masks/gasmask.dm +++ b/code/modules/clothing/masks/gasmask.dm @@ -213,7 +213,7 @@ if(src && choice && !user.incapacitated() && in_range(user,src)) icon_state = options[choice] - user.update_inv_wear_mask() + user.update_worn_mask() update_action_buttons() to_chat(user, span_notice("Your Clown Mask has now morphed into [choice], all praise the Honkmother!")) return TRUE @@ -271,7 +271,7 @@ if(src && choice && !user.incapacitated() && in_range(user,src)) icon_state = options[choice] - user.update_inv_wear_mask() + user.update_worn_mask() update_action_buttons() to_chat(user, span_notice("Your Mime Mask has now morphed into [choice]!")) return TRUE @@ -359,7 +359,7 @@ if(src && choice && !M.stat && in_range(M,src)) icon_state = options[choice] - user.update_inv_wear_mask() + user.update_worn_mask() update_action_buttons() to_chat(M, span_notice("The Tiki Mask has now changed into the [choice] Mask!")) return 1 diff --git a/code/modules/clothing/shoes/_shoes.dm b/code/modules/clothing/shoes/_shoes.dm index 058857598db..e06e280e9f8 100644 --- a/code/modules/clothing/shoes/_shoes.dm +++ b/code/modules/clothing/shoes/_shoes.dm @@ -68,7 +68,7 @@ if(offset && (slot_flags & slot)) user.pixel_y += offset worn_y_dimension -= (offset * 2) - user.update_inv_shoes() + user.update_worn_shoes() equipped_before_drop = TRUE /obj/item/clothing/shoes/equipped(mob/user, slot) @@ -96,7 +96,7 @@ ..() if(ismob(loc)) var/mob/M = loc - M.update_inv_shoes() + M.update_worn_shoes() /** * adjust_laces adjusts whether our shoes (assuming they can_be_tied) and tied, untied, or knotted diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm index e36e50158d5..22b9ee78cd9 100644 --- a/code/modules/clothing/shoes/bananashoes.dm +++ b/code/modules/clothing/shoes/bananashoes.dm @@ -10,7 +10,7 @@ /obj/item/clothing/shoes/clown_shoes/banana_shoes/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_FEET) AddComponent(/datum/component/material_container, list(/datum/material/bananium), 100 * MINERAL_MATERIAL_AMOUNT, MATCONTAINER_EXAMINE|MATCONTAINER_ANY_INTENT|MATCONTAINER_SILENT, allowed_items=/obj/item/stack) AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75, falloff_exponent = 20) RegisterSignal(src, COMSIG_SHOES_STEP_ACTION, .proc/on_step) diff --git a/code/modules/clothing/shoes/magboots.dm b/code/modules/clothing/shoes/magboots.dm index abbf5777761..98b5aaa0e5a 100644 --- a/code/modules/clothing/shoes/magboots.dm +++ b/code/modules/clothing/shoes/magboots.dm @@ -41,7 +41,7 @@ icon_state = "[magboot_state][magpulse]" to_chat(user, span_notice("You [magpulse ? "enable" : "disable"] the mag-pulse traction system.")) update_gravity_trait(user) - user.update_inv_shoes() //so our mob-overlays update + user.update_worn_shoes() //so our mob-overlays update user.update_gravity(user.has_gravity()) user.update_equipment_speed_mods() //we want to update our speed so we arent running at max speed in regular magboots update_action_buttons() diff --git a/code/modules/clothing/shoes/wheelys.dm b/code/modules/clothing/shoes/wheelys.dm index 780f70361bb..29dfe19c256 100644 --- a/code/modules/clothing/shoes/wheelys.dm +++ b/code/modules/clothing/shoes/wheelys.dm @@ -18,7 +18,7 @@ /obj/item/clothing/shoes/wheelys/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_FEET) wheels = new wheels(null) wheels.link_shoes(src) diff --git a/code/modules/clothing/spacesuits/plasmamen.dm b/code/modules/clothing/spacesuits/plasmamen.dm index 774a438d124..a60f9a1664d 100644 --- a/code/modules/clothing/spacesuits/plasmamen.dm +++ b/code/modules/clothing/spacesuits/plasmamen.dm @@ -151,7 +151,7 @@ helmet_on = !helmet_on icon_state = "[initial(icon_state)][helmet_on ? "-light":""]" inhand_icon_state = icon_state - user.update_inv_head() //So the mob overlay updates + user.update_worn_head() //So the mob overlay updates if(helmet_on) if(!up) diff --git a/code/modules/clothing/suits/_suits.dm b/code/modules/clothing/suits/_suits.dm index 26af272fae2..9c16b476860 100644 --- a/code/modules/clothing/suits/_suits.dm +++ b/code/modules/clothing/suits/_suits.dm @@ -37,7 +37,7 @@ ..() if(ismob(loc)) var/mob/M = loc - M.update_inv_wear_suit() + M.update_worn_oversuit() /** * Wrapper proc to apply shielding through AddComponent(). diff --git a/code/modules/clothing/suits/reactive_armour.dm b/code/modules/clothing/suits/reactive_armour.dm index 157eb996d82..b7686412e8b 100644 --- a/code/modules/clothing/suits/reactive_armour.dm +++ b/code/modules/clothing/suits/reactive_armour.dm @@ -52,7 +52,7 @@ /obj/item/clothing/suit/armor/reactive/Initialize(mapload) . = ..() - AddElement(/datum/element/update_icon_updates_onmob) + AddElement(/datum/element/update_icon_updates_onmob, ITEM_SLOT_OCLOTHING) /obj/item/clothing/suit/armor/reactive/update_icon_state() . = ..() diff --git a/code/modules/clothing/suits/toggles.dm b/code/modules/clothing/suits/toggles.dm index 206908a37c1..358ba5a69b2 100644 --- a/code/modules/clothing/suits/toggles.dm +++ b/code/modules/clothing/suits/toggles.dm @@ -44,7 +44,7 @@ if(ishuman(hood.loc)) var/mob/living/carbon/human/H = hood.loc H.transferItemToLoc(hood, src, TRUE) - H.update_inv_wear_suit() + H.update_worn_oversuit() else hood.forceMove(src) @@ -77,7 +77,7 @@ return hood_up = TRUE icon_state = "[initial(icon_state)]_t" - H.update_inv_wear_suit() + H.update_worn_oversuit() update_action_buttons() else RemoveHood() diff --git a/code/modules/clothing/under/_under.dm b/code/modules/clothing/under/_under.dm index 150b3805a7c..21dbae42ffe 100644 --- a/code/modules/clothing/under/_under.dm +++ b/code/modules/clothing/under/_under.dm @@ -61,7 +61,7 @@ ..() if(ismob(loc)) var/mob/M = loc - M.update_inv_w_uniform() + M.update_worn_undersuit() if(damaged_state == CLOTHING_SHREDDED && has_sensor > NO_SENSORS) has_sensor = BROKEN_SENSORS else if(damaged_state == CLOTHING_PRISTINE && has_sensor == BROKEN_SENSORS) @@ -100,14 +100,14 @@ var/mob/living/carbon/human/H = user if(H.dna.species.bodytype & BODYTYPE_DIGITIGRADE) adjusted = DIGITIGRADE_STYLE - H.update_inv_w_uniform() + H.update_worn_undersuit() if(attached_accessory && slot != ITEM_SLOT_HANDS && ishuman(user)) var/mob/living/carbon/human/H = user attached_accessory.on_uniform_equip(src, user) H.fan_hud_set_fandom() if(attached_accessory.above_suit) - H.update_inv_wear_suit() + H.update_worn_oversuit() /obj/item/clothing/under/equipped(mob/living/user, slot) ..() @@ -122,7 +122,7 @@ var/mob/living/carbon/human/H = user H.fan_hud_set_fandom() if(attached_accessory.above_suit) - H.update_inv_wear_suit() + H.update_worn_oversuit() ..() /mob/living/carbon/human/update_suit_sensors() @@ -170,8 +170,8 @@ return var/mob/living/carbon/human/holder = loc - holder.update_inv_w_uniform() - holder.update_inv_wear_suit() + holder.update_worn_undersuit() + holder.update_worn_oversuit() holder.fan_hud_set_fandom() /obj/item/clothing/under/proc/remove_accessory(mob/user) @@ -197,8 +197,8 @@ return var/mob/living/carbon/human/holder = loc - holder.update_inv_w_uniform() - holder.update_inv_wear_suit() + holder.update_worn_undersuit() + holder.update_worn_oversuit() holder.fan_hud_set_fandom() @@ -299,7 +299,7 @@ to_chat(usr, span_notice("You adjust the suit back to normal.")) if(ishuman(usr)) var/mob/living/carbon/human/H = usr - H.update_inv_w_uniform() + H.update_worn_undersuit() H.update_body() /obj/item/clothing/under/proc/toggle_jumpsuit_adjust() diff --git a/code/modules/explorer_drone/loot.dm b/code/modules/explorer_drone/loot.dm index 211e3235e62..970431360e1 100644 --- a/code/modules/explorer_drone/loot.dm +++ b/code/modules/explorer_drone/loot.dm @@ -176,7 +176,7 @@ GLOBAL_LIST_INIT(adventure_loot_generator_index,generate_generator_index()) ADD_TRAIT(user,TRAIT_IMMOBILIZED,src) to_chat(user,span_notice("You begin to charge [src]")) inhand_icon_state = "firelance_charging" - user.update_inv_hands() + user.update_held_items() if(do_after(user,windup_time,interaction_key="firelance",extra_checks = CALLBACK(src, .proc/windup_checks))) var/turf/start_turf = get_turf(user) var/turf/last_turf = get_ranged_target_turf(start_turf,user.dir,melt_range) @@ -185,7 +185,7 @@ GLOBAL_LIST_INIT(adventure_loot_generator_index,generate_generator_index()) if(turf_to_melt.density) turf_to_melt.Melt() inhand_icon_state = initial(inhand_icon_state) - user.update_inv_hands() + user.update_held_items() REMOVE_TRAIT(user,TRAIT_IMMOBILIZED,src) /// Additional windup checks diff --git a/code/modules/fishing/fishing_rod.dm b/code/modules/fishing/fishing_rod.dm index 66700957e7a..b82eebc676a 100644 --- a/code/modules/fishing/fishing_rod.dm +++ b/code/modules/fishing/fishing_rod.dm @@ -111,7 +111,7 @@ RegisterSignal(fishing_line_beam, COMSIG_PARENT_QDELETING, .proc/clear_line) fishing_lines += fishing_line_beam INVOKE_ASYNC(fishing_line_beam, /datum/beam/.proc/Start) - user.update_inv_hands() + user.update_held_items() return fishing_line_beam /obj/item/fishing_rod/proc/clear_line(datum/source) @@ -119,7 +119,7 @@ fishing_lines -= source if(ismob(loc)) var/mob/user = loc - user.update_inv_hands() + user.update_held_items() /obj/item/fishing_rod/dropped(mob/user, silent) . = ..() diff --git a/code/modules/forensics/forensics_helpers.dm b/code/modules/forensics/forensics_helpers.dm index 155c6ab6788..558153a3fdc 100644 --- a/code/modules/forensics/forensics_helpers.dm +++ b/code/modules/forensics/forensics_helpers.dm @@ -92,10 +92,10 @@ /mob/living/carbon/human/add_blood_DNA(list/blood_DNA_to_add, list/datum/disease/diseases) if(wear_suit) wear_suit.add_blood_DNA(blood_DNA_to_add) - update_inv_wear_suit() + update_worn_oversuit() else if(w_uniform) w_uniform.add_blood_DNA(blood_DNA_to_add) - update_inv_w_uniform() + update_worn_undersuit() if(gloves) var/obj/item/clothing/gloves/mob_gloves = gloves mob_gloves.add_blood_DNA(blood_DNA_to_add) @@ -104,7 +104,7 @@ forensics = new(src) forensics.inherit_new(blood_DNA = blood_DNA_to_add) blood_in_hands = rand(2, 4) - update_inv_gloves() + update_worn_gloves() return TRUE /* diff --git a/code/modules/hydroponics/grown/flowers.dm b/code/modules/hydroponics/grown/flowers.dm index d3570c2e655..3f1f30a7499 100644 --- a/code/modules/hydroponics/grown/flowers.dm +++ b/code/modules/hydroponics/grown/flowers.dm @@ -294,10 +294,10 @@ . = ..() if(slot == ITEM_SLOT_MASK) worn_icon_state = "[base_icon_state]_mouth" - user.update_inv_wear_mask() + user.update_worn_mask() else worn_icon_state = base_icon_state - user.update_inv_head() + user.update_worn_head() // Carbon Rose /obj/item/seeds/carbon_rose diff --git a/code/modules/jobs/job_types/assistant.dm b/code/modules/jobs/job_types/assistant.dm index ba1f65445dc..3b164594b77 100644 --- a/code/modules/jobs/job_types/assistant.dm +++ b/code/modules/jobs/job_types/assistant.dm @@ -73,7 +73,7 @@ Assistant // This outfit is used by the assets SS, which is ran before the atoms SS if (SSatoms.initialized == INITIALIZATION_INSSATOMS) H.w_uniform?.update_greyscale() - H.update_inv_w_uniform() + H.update_worn_undersuit() /proc/get_configured_colored_assistant_type() return CONFIG_GET(flag/grey_assistants) ? /datum/colored_assistant/grey : /datum/colored_assistant/random diff --git a/code/modules/mining/equipment/mining_tools.dm b/code/modules/mining/equipment/mining_tools.dm index e78f8fef7f1..33ffb701ef0 100644 --- a/code/modules/mining/equipment/mining_tools.dm +++ b/code/modules/mining/equipment/mining_tools.dm @@ -232,7 +232,7 @@ attack_verb_continuous = list("hits", "pierces", "slices", "attacks") attack_verb_simple = list("hit", "pierce", "slice", "attack") playsound(src, 'sound/items/ratchet.ogg', 50, vary = TRUE) - user.update_inv_hands() + user.update_held_items() /obj/item/trench_tool/proc/check_menu(mob/user) if(!istype(user)) diff --git a/code/modules/mob/inventory.dm b/code/modules/mob/inventory.dm index efe4029590a..b9ecd685387 100644 --- a/code/modules/mob/inventory.dm +++ b/code/modules/mob/inventory.dm @@ -169,7 +169,7 @@ return FALSE if(I.pulledby) I.pulledby.stop_pulling() - update_inv_hands() + update_held_items() I.pixel_x = I.base_pixel_x I.pixel_y = I.base_pixel_y return hand_index @@ -317,7 +317,7 @@ var/hand_index = get_held_index_of_item(I) if(hand_index) held_items[hand_index] = null - update_inv_hands() + update_held_items() if(I) if(client) client.screen -= I @@ -403,7 +403,7 @@ /obj/item/proc/equip_to_best_slot(mob/M) if(M.equip_to_appropriate_slot(src)) - M.update_inv_hands() + M.update_held_items() return TRUE else if(equip_delay_self) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm index ff6302b569f..6cef8d716c1 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_update_icons.dm @@ -44,8 +44,8 @@ alt_icon = old_icon pixel_x = base_pixel_x + body_position_pixel_x_offset pixel_y = base_pixel_y + body_position_pixel_y_offset - update_inv_hands() - update_inv_handcuffed() + update_held_items() + update_worn_handcuffs() /mob/living/carbon/alien/humanoid/regenerate_icons() if(!..()) @@ -56,7 +56,7 @@ . = ..() update_icons() -/mob/living/carbon/alien/humanoid/update_inv_handcuffed() +/mob/living/carbon/alien/humanoid/update_worn_handcuffs() remove_overlay(HANDCUFF_LAYER) var/cuff_icon = "aliencuff" var/dmi_file = 'icons/mob/alien.dmi' @@ -74,7 +74,7 @@ apply_overlay(HANDCUFF_LAYER) //Royals have bigger sprites, so inhand things must be handled differently. -/mob/living/carbon/alien/humanoid/royal/update_inv_hands() +/mob/living/carbon/alien/humanoid/royal/update_held_items() ..() remove_overlay(HANDS_LAYER) var/list/hands = list() diff --git a/code/modules/mob/living/carbon/alien/larva/larva_update_icons.dm b/code/modules/mob/living/carbon/alien/larva/larva_update_icons.dm index 01d3615fe88..8e2c75647c5 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_update_icons.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_update_icons.dm @@ -25,7 +25,7 @@ . = ..() update_icons() -/mob/living/carbon/alien/larva/update_inv_handcuffed() +/mob/living/carbon/alien/larva/update_worn_handcuffs() update_icons() //larva icon_state changes if cuffed/uncuffed. diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 523c2ec3116..dc68d46c3b8 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -334,7 +334,7 @@ if (legcuffed) var/obj/item/W = legcuffed legcuffed = null - update_inv_legcuffed() + update_worn_legcuffs() if (client) client.screen -= W if (W) @@ -372,7 +372,7 @@ legcuffed.forceMove(drop_location()) legcuffed = null I.dropped(src) - update_inv_legcuffed() + update_worn_legcuffs() return TRUE /mob/living/carbon/proc/accident(obj/item/I) @@ -839,7 +839,7 @@ clear_alert(ALERT_HANDCUFFED) clear_mood_event("handcuffed") update_action_buttons_icon() //some of our action buttons might be unusable when we're handcuffed. - update_inv_handcuffed() + update_worn_handcuffs() update_hud_handcuffed() /mob/living/carbon/heal_and_revive(heal_to = 75, revive_message) @@ -1149,11 +1149,11 @@ . = TRUE if(back?.wash(clean_types)) - update_inv_back(0) + update_worn_back(0) . = TRUE if(head?.wash(clean_types)) - update_inv_head() + update_worn_head() . = TRUE // Check and wash stuff that can be covered @@ -1161,11 +1161,11 @@ // If the eyes are covered by anything but glasses, that thing will be covering any potential glasses as well. if(glasses && is_eyes_covered(FALSE, TRUE, TRUE) && glasses.wash(clean_types)) - update_inv_glasses() + update_worn_glasses() . = TRUE if(wear_mask && !(obscured & ITEM_SLOT_MASK) && wear_mask.wash(clean_types)) - update_inv_wear_mask() + update_worn_mask() . = TRUE if(ears && !(obscured & ITEM_SLOT_EARS) && ears.wash(clean_types)) @@ -1173,15 +1173,15 @@ . = TRUE if(wear_neck && !(obscured & ITEM_SLOT_NECK) && wear_neck.wash(clean_types)) - update_inv_neck() + update_worn_neck() . = TRUE if(shoes && !(obscured & ITEM_SLOT_FEET) && shoes.wash(clean_types)) - update_inv_shoes() + update_worn_shoes() . = TRUE if(gloves && !(obscured & ITEM_SLOT_GLOVES) && gloves.wash(clean_types)) - update_inv_gloves() + update_worn_gloves() . = TRUE /// if any of our bodyparts are bleeding diff --git a/code/modules/mob/living/carbon/carbon_defense.dm b/code/modules/mob/living/carbon/carbon_defense.dm index 333f2d24d3e..fdd9385c11f 100644 --- a/code/modules/mob/living/carbon/carbon_defense.dm +++ b/code/modules/mob/living/carbon/carbon_defense.dm @@ -96,13 +96,13 @@ if(affecting.body_zone == BODY_ZONE_HEAD) if(wear_mask) wear_mask.add_mob_blood(src) - update_inv_wear_mask() + update_worn_mask() if(wear_neck) wear_neck.add_mob_blood(src) - update_inv_neck() + update_worn_neck() if(head) head.add_mob_blood(src) - update_inv_head() + update_worn_head() return TRUE //successful attack diff --git a/code/modules/mob/living/carbon/carbon_update_icons.dm b/code/modules/mob/living/carbon/carbon_update_icons.dm index cc91b75eef4..f702196d56a 100644 --- a/code/modules/mob/living/carbon/carbon_update_icons.dm +++ b/code/modules/mob/living/carbon/carbon_update_icons.dm @@ -1,3 +1,37 @@ +/mob/living/carbon/human/update_clothing(slot_flags) + if(slot_flags & ITEM_SLOT_BACK) + update_worn_back() + if(slot_flags & ITEM_SLOT_MASK) + update_worn_mask() + if(slot_flags & ITEM_SLOT_NECK) + update_worn_neck() + if(slot_flags & ITEM_SLOT_HANDCUFFED) + update_worn_handcuffs() + if(slot_flags & ITEM_SLOT_LEGCUFFED) + update_worn_legcuffs() + if(slot_flags & ITEM_SLOT_BELT) + update_worn_belt() + if(slot_flags & ITEM_SLOT_ID) + update_worn_id() + if(slot_flags & ITEM_SLOT_EARS) + update_inv_ears() + if(slot_flags & ITEM_SLOT_EYES) + update_worn_glasses() + if(slot_flags & ITEM_SLOT_GLOVES) + update_worn_gloves() + if(slot_flags & ITEM_SLOT_HEAD) + update_worn_head() + if(slot_flags & ITEM_SLOT_FEET) + update_worn_shoes() + if(slot_flags & ITEM_SLOT_OCLOTHING) + update_worn_oversuit() + if(slot_flags & ITEM_SLOT_ICLOTHING) + update_worn_undersuit() + if(slot_flags & ITEM_SLOT_SUITSTORE) + update_suit_storage() + if(slot_flags & ITEM_SLOT_LPOCKET || slot_flags & ITEM_SLOT_RPOCKET) + update_pockets() + //IMPORTANT: Multiple animate() calls do not stack well, so try to do them all at once if you can. /mob/living/carbon/perform_update_transform() var/matrix/ntransform = matrix(transform) //aka transform.Copy() @@ -37,17 +71,26 @@ cut_overlay(I) overlays_standing[cache_index] = null +//used when putting/removing clothes that hide certain mutant body parts to just update those and not update the whole body. +/mob/living/carbon/human/proc/update_mutant_bodyparts() + dna.species.handle_mutant_bodyparts(src) + update_body_parts() + +/mob/living/carbon/update_body(is_creating = FALSE) + dna.species.handle_body(src) //This calls `handle_mutant_bodyparts` which calls `update_mutant_bodyparts()`. Don't double call! + update_body_parts(is_creating) + /mob/living/carbon/regenerate_icons() if(notransform) return 1 icon_render_keys = list() //Clear this bad larry out - update_inv_hands() - update_inv_handcuffed() - update_inv_legcuffed() + update_held_items() + update_worn_handcuffs() + update_worn_legcuffs() update_fire() - update_body_parts() + update_body() -/mob/living/carbon/update_inv_hands() +/mob/living/carbon/update_held_items() remove_overlay(HANDS_LAYER) if (handcuffed) drop_all_held_items() @@ -126,7 +169,7 @@ apply_overlay(WOUND_LAYER) -/mob/living/carbon/update_inv_wear_mask() +/mob/living/carbon/update_worn_mask() remove_overlay(FACEMASK_LAYER) if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated @@ -143,7 +186,7 @@ apply_overlay(FACEMASK_LAYER) -/mob/living/carbon/update_inv_neck() +/mob/living/carbon/update_worn_neck() remove_overlay(NECK_LAYER) if(client && hud_used?.inv_slots[TOBITSHIFT(ITEM_SLOT_NECK) + 1]) @@ -157,7 +200,7 @@ apply_overlay(NECK_LAYER) -/mob/living/carbon/update_inv_back() +/mob/living/carbon/update_worn_back() remove_overlay(BACK_LAYER) if(client && hud_used?.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1]) @@ -170,7 +213,7 @@ apply_overlay(BACK_LAYER) -/mob/living/carbon/update_inv_head() +/mob/living/carbon/update_worn_head() remove_overlay(HEAD_LAYER) if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated @@ -187,7 +230,7 @@ apply_overlay(HEAD_LAYER) -/mob/living/carbon/update_inv_handcuffed() +/mob/living/carbon/update_worn_handcuffs() remove_overlay(HANDCUFF_LAYER) if(handcuffed) var/mutable_appearance/handcuff_overlay = mutable_appearance('icons/mob/mob.dmi', "handcuff1", -HANDCUFF_LAYER) @@ -239,9 +282,6 @@ . += emissive_blocker(standing.icon, standing.icon_state, alpha = standing.alpha) -/mob/living/carbon/update_body(is_creating) - update_body_parts(is_creating) - ///Checks to see if any bodyparts need to be redrawn, then does so. update_limb_data = TRUE redraws the limbs to conform to the owner. /mob/living/carbon/proc/update_body_parts(update_limb_data) update_damage_overlays() diff --git a/code/modules/mob/living/carbon/human/dummy.dm b/code/modules/mob/living/carbon/human/dummy.dm index 9a2cae851cd..a3041ac7633 100644 --- a/code/modules/mob/living/carbon/human/dummy.dm +++ b/code/modules/mob/living/carbon/human/dummy.dm @@ -116,6 +116,7 @@ GLOBAL_LIST_EMPTY(dummy_mob_list) GLOB.dummy_mob_list += D else D.regenerate_icons() //they were cut in wipe_state() + D.update_body_parts(update_limb_data = TRUE) D.in_use = TRUE return D diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index b30c03a483c..16b9d2eff50 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -582,10 +582,10 @@ if(gloves) if(gloves.wash(clean_types)) - update_inv_gloves() + update_worn_gloves() else if((clean_types & CLEAN_TYPE_BLOOD) && blood_in_hands > 0) blood_in_hands = 0 - update_inv_gloves() + update_worn_gloves() return TRUE @@ -623,12 +623,12 @@ . = TRUE if(glasses && is_eyes_covered(FALSE, TRUE, TRUE) && glasses.wash(clean_types)) - update_inv_glasses() + update_worn_glasses() . = TRUE var/obscured = check_obscured_slots() if(wear_mask && !(obscured & ITEM_SLOT_MASK) && wear_mask.wash(clean_types)) - update_inv_wear_mask() + update_worn_mask() . = TRUE /** @@ -639,18 +639,18 @@ // Wash equipped stuff that cannot be covered if(wear_suit?.wash(clean_types)) - update_inv_wear_suit() + update_worn_oversuit() . = TRUE if(belt?.wash(clean_types)) - update_inv_belt() + update_worn_belt() . = TRUE // Check and wash stuff that can be covered var/obscured = check_obscured_slots() if(w_uniform && !(obscured & ITEM_SLOT_ICLOTHING) && w_uniform.wash(clean_types)) - update_inv_w_uniform() + update_worn_undersuit() . = TRUE if(!is_mouth_covered() && clean_lips()) @@ -659,7 +659,7 @@ // Wash hands if exposed if(!gloves && (clean_types & CLEAN_TYPE_BLOOD) && blood_in_hands > 0 && !(obscured & ITEM_SLOT_GLOVES)) blood_in_hands = 0 - update_inv_gloves() + update_worn_gloves() . = TRUE //Turns a mob black, flashes a skeleton overlay diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm index f11e8238092..9f878fa6fe8 100644 --- a/code/modules/mob/living/carbon/human/human_defense.dm +++ b/code/modules/mob/living/carbon/human/human_defense.dm @@ -560,10 +560,10 @@ if(head_clothes) if(!(head_clothes.resistance_flags & UNACIDABLE)) head_clothes.acid_act(acidpwr, acid_volume) - update_inv_glasses() - update_inv_wear_mask() - update_inv_neck() - update_inv_head() + update_worn_glasses() + update_worn_mask() + update_worn_neck() + update_worn_head() else to_chat(src, span_notice("Your [head_clothes.name] protects your head and face from the acid!")) else @@ -583,8 +583,8 @@ if(chest_clothes) if(!(chest_clothes.resistance_flags & UNACIDABLE)) chest_clothes.acid_act(acidpwr, acid_volume) - update_inv_w_uniform() - update_inv_wear_suit() + update_worn_undersuit() + update_worn_oversuit() else to_chat(src, span_notice("Your [chest_clothes.name] protects your body from the acid!")) else @@ -614,9 +614,9 @@ if(arm_clothes) if(!(arm_clothes.resistance_flags & UNACIDABLE)) arm_clothes.acid_act(acidpwr, acid_volume) - update_inv_gloves() - update_inv_w_uniform() - update_inv_wear_suit() + update_worn_gloves() + update_worn_undersuit() + update_worn_oversuit() else to_chat(src, span_notice("Your [arm_clothes.name] protects your arms and hands from the acid!")) else @@ -640,9 +640,9 @@ if(leg_clothes) if(!(leg_clothes.resistance_flags & UNACIDABLE)) leg_clothes.acid_act(acidpwr, acid_volume) - update_inv_shoes() - update_inv_w_uniform() - update_inv_wear_suit() + update_worn_shoes() + update_worn_undersuit() + update_worn_oversuit() else to_chat(src, span_notice("Your [leg_clothes.name] protects your legs and feet from the acid!")) else diff --git a/code/modules/mob/living/carbon/human/human_stripping.dm b/code/modules/mob/living/carbon/human/human_stripping.dm index e20904336f7..35fb3cc60b0 100644 --- a/code/modules/mob/living/carbon/human/human_stripping.dm +++ b/code/modules/mob/living/carbon/human/human_stripping.dm @@ -67,7 +67,7 @@ GLOBAL_LIST_INIT(strippable_human_items, create_strippable_list(list( return var/mob/mob_source = source - mob_source.update_inv_w_uniform() + mob_source.update_worn_undersuit() mob_source.update_body() /datum/strippable_item/mob_item_slot/suit 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 6f2e3b26aa5..0c859e4a500 100644 --- a/code/modules/mob/living/carbon/human/human_update_icons.dm +++ b/code/modules/mob/living/carbon/human/human_update_icons.dm @@ -35,7 +35,7 @@ There are several things that need to be remembered: You will need to call the relevant update_inv_* proc All of these are named after the variable they update from. They are defined at the mob/ level like - update_clothing was, so you won't cause undefined proc runtimes with usr.update_inv_wear_id() if the usr is a + update_clothing was, so you won't cause undefined proc runtimes with usr.update_worn_id() if the usr is a slime etc. Instead, it'll just return without doing any work. So no harm in calling it for slimes and such. @@ -58,81 +58,35 @@ There are several things that need to be remembered: my_head.update_limb(FALSE, is_creating) update_body_parts() - -//used when putting/removing clothes that hide certain mutant body parts to just update those and not update the whole body. -/mob/living/carbon/human/proc/update_mutant_bodyparts() - dna.species.handle_mutant_bodyparts(src) - update_body_parts() - - -/mob/living/carbon/human/update_body(is_creating = FALSE) - dna.species.handle_body(src) - ..() - /* --------------------------------------- */ //For legacy support. /mob/living/carbon/human/regenerate_icons() if(!..()) - update_body(is_creating = TRUE) - update_inv_w_uniform() - update_inv_wear_id() - update_inv_gloves() - update_inv_glasses() + update_worn_undersuit() + update_worn_id() + update_worn_glasses() + update_worn_gloves() update_inv_ears() - update_inv_shoes() - update_inv_s_store() - update_inv_wear_mask() - update_inv_head() - update_inv_belt() - update_inv_back() - update_inv_wear_suit() - update_inv_pockets() - update_inv_neck() + update_worn_shoes() + update_suit_storage() + update_worn_mask() + update_worn_head() + update_worn_belt() + update_worn_back() + update_worn_oversuit() + update_pockets() + update_worn_neck() update_transform() //mutations update_mutations_overlay() //damage overlays update_damage_overlays() -/mob/living/carbon/human/update_clothing(slot_flags) - if(slot_flags & ITEM_SLOT_BACK) - update_inv_back() - if(slot_flags & ITEM_SLOT_MASK) - update_inv_wear_mask() - if(slot_flags & ITEM_SLOT_NECK) - update_inv_neck() - if(slot_flags & ITEM_SLOT_HANDCUFFED) - update_inv_handcuffed() - if(slot_flags & ITEM_SLOT_LEGCUFFED) - update_inv_legcuffed() - if(slot_flags & ITEM_SLOT_BELT) - update_inv_belt() - if(slot_flags & ITEM_SLOT_ID) - update_inv_wear_id() - if(slot_flags & ITEM_SLOT_EARS) - update_inv_ears() - if(slot_flags & ITEM_SLOT_EYES) - update_inv_glasses() - if(slot_flags & ITEM_SLOT_GLOVES) - update_inv_gloves() - if(slot_flags & ITEM_SLOT_HEAD) - update_inv_head() - if(slot_flags & ITEM_SLOT_FEET) - update_inv_shoes() - if(slot_flags & ITEM_SLOT_OCLOTHING) - update_inv_wear_suit() - if(slot_flags & ITEM_SLOT_ICLOTHING) - update_inv_w_uniform() - if(slot_flags & ITEM_SLOT_SUITSTORE) - update_inv_s_store() - if(slot_flags & ITEM_SLOT_LPOCKET || slot_flags & ITEM_SLOT_RPOCKET) - update_inv_pockets() - /* --------------------------------------- */ //vvvvvv UPDATE_INV PROCS vvvvvv -/mob/living/carbon/human/update_inv_w_uniform() +/mob/living/carbon/human/update_worn_undersuit() remove_overlay(UNIFORM_LAYER) if(client && hud_used) @@ -195,7 +149,7 @@ There are several things that need to be remembered: update_mutant_bodyparts() -/mob/living/carbon/human/update_inv_wear_id() +/mob/living/carbon/human/update_worn_id() remove_overlay(ID_LAYER) if(client && hud_used) @@ -224,7 +178,7 @@ There are several things that need to be remembered: apply_overlay(ID_LAYER) -/mob/living/carbon/human/update_inv_gloves() +/mob/living/carbon/human/update_worn_gloves() remove_overlay(GLOVES_LAYER) if(client && hud_used && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_GLOVES) + 1]) @@ -265,7 +219,7 @@ There are several things that need to be remembered: apply_overlay(GLOVES_LAYER) -/mob/living/carbon/human/update_inv_glasses() +/mob/living/carbon/human/update_worn_glasses() remove_overlay(GLASSES_LAYER) if(!get_bodypart(BODY_ZONE_HEAD)) //decapitated @@ -327,7 +281,7 @@ There are several things that need to be remembered: overlays_standing[EARS_LAYER] = ears_overlay apply_overlay(EARS_LAYER) -/mob/living/carbon/human/update_inv_neck() +/mob/living/carbon/human/update_worn_neck() remove_overlay(NECK_LAYER) if(client && hud_used && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_NECK) + 1]) @@ -356,7 +310,7 @@ There are several things that need to be remembered: apply_overlay(NECK_LAYER) -/mob/living/carbon/human/update_inv_shoes() +/mob/living/carbon/human/update_worn_shoes() remove_overlay(SHOES_LAYER) if(num_legs < 2) @@ -395,7 +349,7 @@ There are several things that need to be remembered: update_body_parts() -/mob/living/carbon/human/update_inv_s_store() +/mob/living/carbon/human/update_suit_storage() remove_overlay(SUIT_STORE_LAYER) if(client && hud_used) @@ -417,7 +371,7 @@ There are several things that need to be remembered: overlays_standing[SUIT_STORE_LAYER] = s_store_overlay apply_overlay(SUIT_STORE_LAYER) -/mob/living/carbon/human/update_inv_head() +/mob/living/carbon/human/update_worn_head() remove_overlay(HEAD_LAYER) if(client && hud_used && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1]) var/atom/movable/screen/inventory/inv = hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_HEAD) + 1] @@ -444,7 +398,7 @@ There are several things that need to be remembered: update_mutant_bodyparts() apply_overlay(HEAD_LAYER) -/mob/living/carbon/human/update_inv_belt() +/mob/living/carbon/human/update_worn_belt() remove_overlay(BELT_LAYER) if(client && hud_used) @@ -471,7 +425,7 @@ There are several things that need to be remembered: apply_overlay(BELT_LAYER) -/mob/living/carbon/human/update_inv_wear_suit() +/mob/living/carbon/human/update_worn_oversuit() remove_overlay(SUIT_LAYER) if(client && hud_used) @@ -506,7 +460,7 @@ There are several things that need to be remembered: apply_overlay(SUIT_LAYER) -/mob/living/carbon/human/update_inv_pockets() +/mob/living/carbon/human/update_pockets() if(client && hud_used) var/atom/movable/screen/inventory/inv @@ -527,7 +481,7 @@ There are several things that need to be remembered: client.screen += r_store update_observer_view(r_store) -/mob/living/carbon/human/update_inv_wear_mask() +/mob/living/carbon/human/update_worn_mask() remove_overlay(FACEMASK_LAYER) if(!get_bodypart(BODY_ZONE_HEAD)) //Decapitated @@ -561,7 +515,7 @@ There are several things that need to be remembered: apply_overlay(FACEMASK_LAYER) update_mutant_bodyparts() //e.g. upgate needed because mask now hides lizard snout -/mob/living/carbon/human/update_inv_back() +/mob/living/carbon/human/update_worn_back() remove_overlay(BACK_LAYER) if(client && hud_used && hud_used.inv_slots[TOBITSHIFT(ITEM_SLOT_BACK) + 1]) @@ -587,7 +541,7 @@ There are several things that need to be remembered: overlays_standing[BACK_LAYER] = back_overlay apply_overlay(BACK_LAYER) -/mob/living/carbon/human/update_inv_legcuffed() +/mob/living/carbon/human/update_worn_legcuffs() remove_overlay(LEGCUFF_LAYER) clear_alert("legcuffed") if(legcuffed) @@ -595,7 +549,7 @@ There are several things that need to be remembered: apply_overlay(LEGCUFF_LAYER) throw_alert("legcuffed", /atom/movable/screen/alert/restrained/legcuffed, new_master = src.legcuffed) -/mob/living/carbon/human/update_inv_hands() +/mob/living/carbon/human/update_held_items() remove_overlay(HANDS_LAYER) if (handcuffed) drop_all_held_items() @@ -876,7 +830,7 @@ generate/load female uniform sprites matching all previously decided variables missing_eyes.pixel_y += dna.species.offset_features[OFFSET_FACE][2] add_overlay(missing_eyes) - update_inv_head() - update_inv_wear_mask() + update_worn_head() + update_worn_mask() #undef RESOLVE_ICON_STATE diff --git a/code/modules/mob/living/carbon/human/inventory.dm b/code/modules/mob/living/carbon/human/inventory.dm index 33d10dd2a69..efc546d6823 100644 --- a/code/modules/mob/living/carbon/human/inventory.dm +++ b/code/modules/mob/living/carbon/human/inventory.dm @@ -116,13 +116,13 @@ if(belt) return belt = I - update_inv_belt() + update_worn_belt() if(ITEM_SLOT_ID) if(wear_id) return wear_id = I sec_hud_set_ID() - update_inv_wear_id() + update_worn_id() if(ITEM_SLOT_EARS) if(ears) return @@ -141,17 +141,17 @@ clear_fullscreen("nearsighted") if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) update_sight() - update_inv_glasses() + update_worn_glasses() if(ITEM_SLOT_GLOVES) if(gloves) return gloves = I - update_inv_gloves() + update_worn_gloves() if(ITEM_SLOT_FEET) if(shoes) return shoes = I - update_inv_shoes() + update_worn_shoes() if(ITEM_SLOT_OCLOTHING) if(wear_suit) return @@ -159,29 +159,29 @@ wear_suit = I if(I.flags_inv & HIDEJUMPSUIT) - update_inv_w_uniform() + update_worn_undersuit() if(wear_suit.breakouttime) //when equipping a straightjacket ADD_TRAIT(src, TRAIT_RESTRAINED, SUIT_TRAIT) stop_pulling() //can't pull if restrained update_action_buttons_icon() //certain action buttons will no longer be usable. - update_inv_wear_suit() + update_worn_oversuit() if(ITEM_SLOT_ICLOTHING) if(w_uniform) return w_uniform = I update_suit_sensors() - update_inv_w_uniform() + update_worn_undersuit() if(ITEM_SLOT_LPOCKET) l_store = I - update_inv_pockets() + update_pockets() if(ITEM_SLOT_RPOCKET) r_store = I - update_inv_pockets() + update_pockets() if(ITEM_SLOT_SUITSTORE) if(s_store) return s_store = I - update_inv_s_store() + update_suit_storage() else to_chat(src, span_danger("You are trying to equip this item to an unsupported inventory slot. Report this to a coder!")) @@ -218,8 +218,8 @@ wear_suit = null if(!QDELETED(src)) //no need to update we're getting deleted anyway if(I.flags_inv & HIDEJUMPSUIT) - update_inv_w_uniform() - update_inv_wear_suit() + update_worn_undersuit() + update_worn_oversuit() else if(I == w_uniform) if(invdrop) if(r_store) @@ -233,11 +233,11 @@ w_uniform = null update_suit_sensors() if(!QDELETED(src)) - update_inv_w_uniform() + update_worn_undersuit() else if(I == gloves) gloves = null if(!QDELETED(src)) - update_inv_gloves() + update_worn_gloves() else if(I == glasses) glasses = null var/obj/item/clothing/glasses/G = I @@ -251,7 +251,7 @@ if(G.vision_flags || G.darkness_view || G.invis_override || G.invis_view || !isnull(G.lighting_alpha)) update_sight() if(!QDELETED(src)) - update_inv_glasses() + update_worn_glasses() else if(I == ears) ears = null if(!QDELETED(src)) @@ -259,28 +259,28 @@ else if(I == shoes) shoes = null if(!QDELETED(src)) - update_inv_shoes() + update_worn_shoes() else if(I == belt) belt = null if(!QDELETED(src)) - update_inv_belt() + update_worn_belt() else if(I == wear_id) wear_id = null sec_hud_set_ID() if(!QDELETED(src)) - update_inv_wear_id() + update_worn_id() else if(I == r_store) r_store = null if(!QDELETED(src)) - update_inv_pockets() + update_pockets() else if(I == l_store) l_store = null if(!QDELETED(src)) - update_inv_pockets() + update_pockets() else if(I == s_store) s_store = null if(!QDELETED(src)) - update_inv_s_store() + update_suit_storage() update_equipment_speed_mods() // Send a signal for when we unequip an item that used to cover our feet/shoes. Used for bloody feet @@ -293,7 +293,7 @@ if(toggle_off && internal && !getorganslot(ORGAN_SLOT_BREATHING_TUBE)) internal = null if(I.flags_inv & HIDEEYES) - update_inv_glasses() + update_worn_glasses() sec_hud_set_security_status() ..() @@ -301,7 +301,7 @@ if((I.flags_inv & (HIDEHAIR|HIDEFACIALHAIR)) || forced) update_hair() if(I.flags_inv & HIDEEYES || forced) - update_inv_glasses() + update_worn_glasses() if(I.flags_inv & HIDEEARS || forced) update_body() sec_hud_set_security_status() @@ -341,7 +341,7 @@ to_chat(src, span_warning("You have no [slot_item_name] to take something out of!")) return if(equip_to_slot_if_possible(thing, slot_type)) - update_inv_hands() + update_held_items() return var/datum/storage/storage = equipped_item.atom_storage if(!storage) diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index c4351f054b8..702adbc29f1 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1287,13 +1287,13 @@ GLOBAL_LIST_EMPTY(features_by_species) if(bloody) //Apply blood if(human.wear_mask) human.wear_mask.add_mob_blood(human) - human.update_inv_wear_mask() + human.update_worn_mask() if(human.head) human.head.add_mob_blood(human) - human.update_inv_head() + human.update_worn_head() if(human.glasses && prob(33)) human.glasses.add_mob_blood(human) - human.update_inv_glasses() + human.update_worn_glasses() if(BODY_ZONE_CHEST) if(human.stat == CONSCIOUS && !weapon.get_sharpness() && armor_block < 50) @@ -1305,10 +1305,10 @@ GLOBAL_LIST_EMPTY(features_by_species) if(bloody) if(human.wear_suit) human.wear_suit.add_mob_blood(human) - human.update_inv_wear_suit() + human.update_worn_oversuit() if(human.w_uniform) human.w_uniform.add_mob_blood(human) - human.update_inv_w_uniform() + human.update_worn_undersuit() /// Triggers force say events if(weapon.force > 10 || weapon.force >= 5 && prob(33)) diff --git a/code/modules/mob/living/carbon/inventory.dm b/code/modules/mob/living/carbon/inventory.dm index 64f5336038f..7e9cf93f194 100644 --- a/code/modules/mob/living/carbon/inventory.dm +++ b/code/modules/mob/living/carbon/inventory.dm @@ -89,7 +89,7 @@ if(back) return back = I - update_inv_back() + update_worn_back() if(ITEM_SLOT_MASK) if(wear_mask) return @@ -105,16 +105,16 @@ if(wear_neck) return wear_neck = I - update_inv_neck(I) + update_worn_neck(I) if(ITEM_SLOT_HANDCUFFED) set_handcuffed(I) update_handcuffed() if(ITEM_SLOT_LEGCUFFED) legcuffed = I - update_inv_legcuffed() + update_worn_legcuffs() if(ITEM_SLOT_HANDS) put_in_hands(I) - update_inv_hands() + update_held_items() if(ITEM_SLOT_BACKPACK) if(!back || !back.atom_storage?.attempt_insert(back, I, src, override = TRUE)) not_handled = TRUE @@ -146,7 +146,7 @@ else if(I == back) back = null if(!QDELETED(src)) - update_inv_back() + update_worn_back() else if(I == wear_mask) wear_mask = null if(!QDELETED(src)) @@ -154,7 +154,7 @@ if(I == wear_neck) wear_neck = null if(!QDELETED(src)) - update_inv_neck(I) + update_worn_neck(I) else if(I == handcuffed) set_handcuffed(null) if(buckled?.buckle_requires_restraints) @@ -164,18 +164,18 @@ else if(I == legcuffed) legcuffed = null if(!QDELETED(src)) - update_inv_legcuffed() + update_worn_legcuffs() update_equipment_speed_mods() //handle stuff to update when a mob equips/unequips a mask. /mob/living/proc/wear_mask_update(obj/item/I, toggle_off = 1) - update_inv_wear_mask() + update_worn_mask() /mob/living/carbon/wear_mask_update(obj/item/I, toggle_off = 1) var/obj/item/clothing/C = I if(istype(C) && (C.tint || initial(C.tint))) update_tint() - update_inv_wear_mask() + update_worn_mask() //handle stuff to update when a mob equips/unequips a headgear. /mob/living/carbon/proc/head_update(obj/item/I, forced) @@ -185,8 +185,8 @@ update_tint() update_sight() if(I.flags_inv & HIDEMASK || forced) - update_inv_wear_mask() - update_inv_head() + update_worn_mask() + update_worn_head() /mob/living/carbon/proc/get_holding_bodypart_of_item(obj/item/I) var/index = get_held_index_of_item(I) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index b06c90c3609..2290ec06c44 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -2123,8 +2123,8 @@ GLOBAL_LIST_EMPTY(fire_appearances) REMOVE_TRAIT(src, TRAIT_FAT, OBESITY) remove_movespeed_modifier(/datum/movespeed_modifier/obesity) - update_inv_w_uniform() - update_inv_wear_suit() + update_worn_undersuit() + update_worn_oversuit() // Reset overeat duration. overeatduration = 0 diff --git a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm index ed9e032902d..e3288079472 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/inventory.dm @@ -8,10 +8,10 @@ /mob/living/simple_animal/drone/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) - update_inv_hands() + update_held_items() if(I == head) head = null - update_inv_head() + update_worn_head() if(I == internal_storage) internal_storage = null update_inv_internal_storage() @@ -59,7 +59,7 @@ var/index = get_held_index_of_item(I) if(index) held_items[index] = null - update_inv_hands() + update_held_items() if(I.pulledby) I.pulledby.stop_pulling() @@ -71,7 +71,7 @@ switch(slot) if(ITEM_SLOT_HEAD) head = I - update_inv_head() + update_worn_head() if(ITEM_SLOT_DEX_STORAGE) internal_storage = I update_inv_internal_storage() diff --git a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm index f6cef5d60a1..80ed0b6b0ef 100644 --- a/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm +++ b/code/modules/mob/living/simple_animal/friendly/drone/visuals_icons.dm @@ -18,7 +18,7 @@ drone_overlays[cache_index] = null -/mob/living/simple_animal/drone/update_inv_hands() +/mob/living/simple_animal/drone/update_held_items() remove_overlay(DRONE_HANDS_LAYER) var/list/hands_overlays = list() @@ -63,7 +63,7 @@ client.screen += internal_storage -/mob/living/simple_animal/drone/update_inv_head() +/mob/living/simple_animal/drone/update_worn_head() remove_overlay(DRONE_HEAD_LAYER) if(head) @@ -80,14 +80,14 @@ apply_overlay(DRONE_HEAD_LAYER) -/mob/living/simple_animal/drone/update_inv_wear_mask() - update_inv_head() +/mob/living/simple_animal/drone/update_worn_mask() + update_worn_head() /mob/living/simple_animal/drone/regenerate_icons() // Drones only have 4 slots, which in this specific instance // is a small blessing. - update_inv_hands() - update_inv_head() + update_held_items() + update_worn_head() update_inv_internal_storage() /** diff --git a/code/modules/mob/living/simple_animal/guardian/guardian.dm b/code/modules/mob/living/simple_animal/guardian/guardian.dm index 3fe3e4ab2ee..395a965f517 100644 --- a/code/modules/mob/living/simple_animal/guardian/guardian.dm +++ b/code/modules/mob/living/simple_animal/guardian/guardian.dm @@ -298,7 +298,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians var/index = get_held_index_of_item(I) if(index) held_items[index] = null - update_inv_hands() + update_held_items() if(I.pulledby) I.pulledby.stop_pulling() @@ -318,7 +318,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians cut_overlay(I) guardian_overlays[cache_index] = null -/mob/living/simple_animal/hostile/guardian/update_inv_hands() +/mob/living/simple_animal/hostile/guardian/update_held_items() remove_overlay(GUARDIAN_HANDS_LAYER) var/list/hands_overlays = list() var/obj/item/l_hand = get_item_for_held_index(1) @@ -345,7 +345,7 @@ GLOBAL_LIST_EMPTY(parasites) //all currently existing/living guardians apply_overlay(GUARDIAN_HANDS_LAYER) /mob/living/simple_animal/hostile/guardian/regenerate_icons() - update_inv_hands() + update_held_items() //MANIFEST, RECALL, TOGGLE MODE/LIGHT, SHOW TYPE diff --git a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm index 9da8cd8dd03..adc406894ef 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/dextrous.dm @@ -43,7 +43,7 @@ //SLOT HANDLING BULLSHIT FOR INTERNAL STORAGE /mob/living/simple_animal/hostile/guardian/dextrous/doUnEquip(obj/item/I, force, newloc, no_move, invdrop = TRUE, silent = FALSE) if(..()) - update_inv_hands() + update_held_items() if(I == internal_storage) internal_storage = null update_inv_internal_storage() diff --git a/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm b/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm index 8ab5a0aa0b1..1edbf4f00e1 100644 --- a/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm +++ b/code/modules/mob/living/simple_animal/hostile/gorilla/visuals_icons.dm @@ -9,7 +9,7 @@ cut_overlay(I) gorilla_overlays[cache_index] = null -/mob/living/simple_animal/hostile/gorilla/update_inv_hands() +/mob/living/simple_animal/hostile/gorilla/update_held_items() cut_overlays("standing_overlay") remove_overlay(GORILLA_HANDS_LAYER) @@ -49,5 +49,5 @@ return ..() /mob/living/simple_animal/hostile/gorilla/regenerate_icons() - update_inv_hands() + update_held_items() diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 47003ee7311..fd01a80fe0e 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -607,9 +607,9 @@ /mob/living/simple_animal/put_in_hands(obj/item/I, del_on_fail = FALSE, merge_stacks = TRUE, ignore_animation = TRUE) . = ..() - update_inv_hands() + update_held_items() -/mob/living/simple_animal/update_inv_hands() +/mob/living/simple_animal/update_held_items() if(client && hud_used && hud_used.hud_version != HUD_STYLE_NOHUD) for(var/obj/item/I in held_items) var/index = get_held_index_of_item(I) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 5f64eb862b3..e09be4b750d 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -722,7 +722,7 @@ var/obj/item/I = get_active_held_item() if(I) I.attack_self(src) - update_inv_hands() + update_held_items() return limb_attack_self() diff --git a/code/modules/mob/mob_update_icons.dm b/code/modules/mob/mob_update_icons.dm index 69c3d09c834..5ac1fd3105a 100644 --- a/code/modules/mob/mob_update_icons.dm +++ b/code/modules/mob/mob_update_icons.dm @@ -1,9 +1,11 @@ //Most of these are defined at this level to reduce on checks elsewhere in the code. //Having them here also makes for a nice reference list of the various overlay-updating procs available +///Redraws the entire mob. For carbons, this is rather expensive, please use the individual update_X procs. /mob/proc/regenerate_icons() //TODO: phase this out completely if possible return +///Updates every item slot passed into it. /mob/proc/update_clothing(slot_flags) return @@ -13,59 +15,77 @@ /mob/proc/update_transform() return -/mob/proc/update_inv_handcuffed() +///Updates the handcuff overlay & HUD element. +/mob/proc/update_worn_handcuffs() return -/mob/proc/update_inv_legcuffed() +///Updates the legcuff overlay & HUD element. +/mob/proc/update_worn_legcuffs() return -/mob/proc/update_inv_back() +///Updates the back overlay & HUD element. +/mob/proc/update_worn_back() return -/mob/proc/update_inv_hands() +///Updates the held items overlay(s) & HUD element. +/mob/proc/update_held_items() return -/mob/proc/update_inv_wear_mask() +///Updates the mask overlay & HUD element. +/mob/proc/update_worn_mask() return -/mob/proc/update_inv_neck() +///Updates the neck overlay & HUD element. +/mob/proc/update_worn_neck() return -/mob/proc/update_inv_wear_suit() +///Updates the oversuit overlay & HUD element. +/mob/proc/update_worn_oversuit() return -/mob/proc/update_inv_w_uniform() +///Updates the undersuit/uniform overlay & HUD element. +/mob/proc/update_worn_undersuit() return -/mob/proc/update_inv_belt() +///Updates the belt overlay & HUD element. +/mob/proc/update_worn_belt() return -/mob/proc/update_inv_head() +///Updates the on-head overlay & HUD element. +/mob/proc/update_worn_head() return +///Updates every part of a carbon's body. Including parts, mutant parts, lips, underwear, and socks. /mob/proc/update_body() return /mob/proc/update_hair() return -/mob/proc/update_inv_gloves() +///Updates the glasses overlay & HUD element. +/mob/proc/update_worn_glasses() return -/mob/proc/update_inv_wear_id() +///Updates the id overlay & HUD element. +/mob/proc/update_worn_id() return -/mob/proc/update_inv_shoes() +///Updates the shoes overlay & HUD element. +/mob/proc/update_worn_shoes() return -/mob/proc/update_inv_glasses() +///Updates the glasses overlay & HUD element. +/mob/proc/update_worn_gloves() return -/mob/proc/update_inv_s_store() +///Updates the handcuff overlay & HUD element. +/mob/proc/update_suit_storage() return -/mob/proc/update_inv_pockets() +///Updates the handcuff overlay & HUD element. +/mob/proc/update_pockets() return +///Updates the handcuff overlay & HUD element. /mob/proc/update_inv_ears() return diff --git a/code/modules/mod/mod_activation.dm b/code/modules/mod/mod_activation.dm index 9fbea364319..f439ce85c9d 100644 --- a/code/modules/mod/mod_activation.dm +++ b/code/modules/mod/mod_activation.dm @@ -198,19 +198,19 @@ part.alternate_worn_layer = mod_parts[part] if(part == boots) boots.icon_state = "[skin]-boots[seal ? "-sealed" : ""]" - wearer.update_inv_shoes() + wearer.update_worn_shoes() if(part == gauntlets) gauntlets.icon_state = "[skin]-gauntlets[seal ? "-sealed" : ""]" - wearer.update_inv_gloves() + wearer.update_worn_gloves() if(part == chestplate) chestplate.icon_state = "[skin]-chestplate[seal ? "-sealed" : ""]" - wearer.update_inv_wear_suit() - wearer.update_inv_w_uniform() + wearer.update_worn_oversuit() + wearer.update_worn_undersuit() if(part == helmet) helmet.icon_state = "[skin]-helmet[seal ? "-sealed" : ""]" - wearer.update_inv_head() - wearer.update_inv_wear_mask() - wearer.update_inv_glasses() + wearer.update_worn_head() + wearer.update_worn_mask() + wearer.update_worn_glasses() wearer.update_hair() /// Finishes the suit's activation, starts processing diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index 1676f195bed..aaf03043589 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -393,7 +393,7 @@ addtimer(CALLBACK(src, .proc/reset_semicd), modified_delay) if(user) - user.update_inv_hands() + user.update_held_items() SSblackbox.record_feedback("tally", "gun_fired", 1, type) return TRUE diff --git a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm index e81f9f76a7a..bbaade74ca9 100644 --- a/code/modules/projectiles/guns/energy/kinetic_accelerator.dm +++ b/code/modules/projectiles/guns/energy/kinetic_accelerator.dm @@ -499,7 +499,7 @@ KA.name = chassis_name if(iscarbon(KA.loc)) var/mob/living/carbon/holder = KA.loc - holder.update_inv_hands() + holder.update_held_items() /obj/item/borg/upgrade/modkit/chassis_mod/uninstall(obj/item/gun/energy/recharge/kinetic_accelerator/KA) KA.icon_state = initial(KA.icon_state) @@ -507,7 +507,7 @@ KA.name = initial(KA.name) if(iscarbon(KA.loc)) var/mob/living/carbon/holder = KA.loc - holder.update_inv_hands() + holder.update_held_items() ..() /obj/item/borg/upgrade/modkit/chassis_mod/orange diff --git a/code/modules/projectiles/guns/energy/laser_gatling.dm b/code/modules/projectiles/guns/energy/laser_gatling.dm index 192c6f2e104..be0cfd34078 100644 --- a/code/modules/projectiles/guns/energy/laser_gatling.dm +++ b/code/modules/projectiles/guns/energy/laser_gatling.dm @@ -46,7 +46,7 @@ to_chat(user, span_warning("You need a free hand to hold the gun!")) return update_appearance() - user.update_inv_back() + user.update_worn_back() else to_chat(user, span_warning("You are already holding the gun!")) else @@ -94,7 +94,7 @@ else src.visible_message(span_warning("The [gun.name] snaps back onto the [name]!")) update_appearance() - user.update_inv_back() + user.update_worn_back() /obj/item/gun/energy/minigun diff --git a/code/modules/reagents/reagent_containers/spray.dm b/code/modules/reagents/reagent_containers/spray.dm index ef578b8a39b..963aa725401 100644 --- a/code/modules/reagents/reagent_containers/spray.dm +++ b/code/modules/reagents/reagent_containers/spray.dm @@ -409,7 +409,7 @@ inhand_icon_state = "sprayer_med_yellow" if("sprayer_med_blue") inhand_icon_state = "sprayer_med_blue" - M.update_inv_hands() + M.update_held_items() /obj/item/reagent_containers/spray/hercuri name = "medical spray (hercuri)" diff --git a/code/modules/surgery/bodyparts/dismemberment.dm b/code/modules/surgery/bodyparts/dismemberment.dm index e5190148654..b9275774a79 100644 --- a/code/modules/surgery/bodyparts/dismemberment.dm +++ b/code/modules/surgery/bodyparts/dismemberment.dm @@ -251,7 +251,7 @@ R_hand.update_appearance() if(arm_owner.gloves) arm_owner.dropItemToGround(arm_owner.gloves, TRUE) - arm_owner.update_inv_gloves() //to remove the bloody hands overlay + arm_owner.update_worn_gloves() //to remove the bloody hands overlay /obj/item/bodypart/l_arm/drop_limb(special) @@ -269,7 +269,7 @@ L_hand.update_appearance() if(arm_owner.gloves) arm_owner.dropItemToGround(arm_owner.gloves, TRUE) - arm_owner.update_inv_gloves() //to remove the bloody hands overlay + arm_owner.update_worn_gloves() //to remove the bloody hands overlay /obj/item/bodypart/r_leg/drop_limb(special) @@ -278,7 +278,7 @@ owner.legcuffed.forceMove(owner.drop_location()) //At this point bodypart is still in nullspace owner.legcuffed.dropped(owner) owner.legcuffed = null - owner.update_inv_legcuffed() + owner.update_worn_legcuffs() if(owner.shoes) owner.dropItemToGround(owner.shoes, TRUE) ..() @@ -289,7 +289,7 @@ owner.legcuffed.forceMove(owner.drop_location()) owner.legcuffed.dropped(owner) owner.legcuffed = null - owner.update_inv_legcuffed() + owner.update_worn_legcuffs() if(owner.shoes) owner.dropItemToGround(owner.shoes, TRUE) ..() @@ -345,7 +345,7 @@ var/atom/movable/screen/inventory/hand/hand = new_limb_owner.hud_used.hand_slots["[held_index]"] if(hand) hand.update_appearance() - new_limb_owner.update_inv_gloves() + new_limb_owner.update_worn_gloves() if(special) //non conventional limb attachment for(var/datum/surgery/attach_surgery as anything in new_limb_owner.surgeries) //if we had an ongoing surgery to attach a new limb, we stop it. diff --git a/code/modules/surgery/organs/stomach/_stomach.dm b/code/modules/surgery/organs/stomach/_stomach.dm index df5073dcc37..650cf87f42f 100644 --- a/code/modules/surgery/organs/stomach/_stomach.dm +++ b/code/modules/surgery/organs/stomach/_stomach.dm @@ -126,15 +126,15 @@ to_chat(human, span_notice("You feel fit again!")) REMOVE_TRAIT(human, TRAIT_FAT, OBESITY) human.remove_movespeed_modifier(/datum/movespeed_modifier/obesity) - human.update_inv_w_uniform() - human.update_inv_wear_suit() + human.update_worn_undersuit() + human.update_worn_oversuit() else if(human.overeatduration >= (200 SECONDS)) to_chat(human, span_danger("You suddenly feel blubbery!")) ADD_TRAIT(human, TRAIT_FAT, OBESITY) human.add_movespeed_modifier(/datum/movespeed_modifier/obesity) - human.update_inv_w_uniform() - human.update_inv_wear_suit() + human.update_worn_undersuit() + human.update_worn_oversuit() // nutrition decrease and satiety if (human.nutrition > 0 && human.stat != DEAD)