From a174990d81400dcfa3b55726ed7d5dcd835f866e Mon Sep 17 00:00:00 2001 From: Penelope Haze Date: Thu, 4 Jul 2024 18:43:46 -0400 Subject: [PATCH] Rename miscellaneous mob/living/H variables and parameters --- code/_onclick/drag_drop.dm | 3 +- code/datums/hostility/hostility.dm | 8 ++--- code/modules/admin/admin.dm | 18 +++++------ .../clothing/spacesuits/rig/modules/combat.dm | 30 +++++++++---------- code/modules/species/species_bodytype.dm | 6 ++-- mods/content/psionics/machines/psimeter.dm | 4 +-- mods/gamemodes/deity/spells/open_gateway.dm | 14 ++++----- mods/mobs/borers/mob/borer/borer.dm | 4 +-- mods/species/ascent/items/id_control.dm | 6 ++-- .../ascent/mobs/bodyparts_insectoid.dm | 20 ++++++------- 10 files changed, 55 insertions(+), 58 deletions(-) diff --git a/code/_onclick/drag_drop.dm b/code/_onclick/drag_drop.dm index 9d4437eac49..ec0965a969f 100644 --- a/code/_onclick/drag_drop.dm +++ b/code/_onclick/drag_drop.dm @@ -39,8 +39,7 @@ // Receive a mouse drop. // Returns false if the atom is valid for dropping further up the chain, true if the drop has been handled. /atom/proc/receive_mouse_drop(atom/dropping, mob/user, params) - var/mob/living/H = user - if(istype(H) && !H.anchored && can_climb(H) && dropping == user) + if(isliving(user) && !user.anchored && can_climb(user) && dropping == user) do_climb(dropping) return TRUE return FALSE diff --git a/code/datums/hostility/hostility.dm b/code/datums/hostility/hostility.dm index 2af98770ec3..b17ad114bd7 100644 --- a/code/datums/hostility/hostility.dm +++ b/code/datums/hostility/hostility.dm @@ -12,13 +12,13 @@ return FALSE if(isliving(target)) - var/mob/living/L = target - if(L.stat) + var/mob/living/target_mob = target + if(target_mob.stat) return FALSE if(isliving(holder)) - var/mob/living/H = holder - if(L.faction == H.faction) + var/mob/holder_mob = holder + if(target_mob.faction == holder_mob.faction) return FALSE return can_special_target(holder, target) diff --git a/code/modules/admin/admin.dm b/code/modules/admin/admin.dm index 000078e5a79..42aa0a029b9 100644 --- a/code/modules/admin/admin.dm +++ b/code/modules/admin/admin.dm @@ -961,24 +961,24 @@ var/global/BSACooldown = 0 /proc/is_special_character(var/character) // returns 1 for special characters and 2 for heroes of gamemode if(!SSticker.mode) return 0 - var/datum/mind/M + var/datum/mind/mind if (ismob(character)) - var/mob/C = character - M = C.mind + var/mob/character_mob = character + mind = character_mob.mind else if(istype(character, /datum/mind)) - M = character + mind = character - if(M) + if(mind) if(SSticker.mode.antag_templates && SSticker.mode.antag_templates.len) for(var/decl/special_role/antag in SSticker.mode.antag_templates) - if(antag.is_antagonist(M)) + if(antag.is_antagonist(mind)) return 2 - if(M.assigned_special_role) + if(mind.assigned_special_role) return 1 if(isrobot(character)) - var/mob/living/silicon/robot/R = character - if(R.emagged) + var/mob/living/silicon/robot/robot = character + if(robot.emagged) return 1 return 0 diff --git a/code/modules/clothing/spacesuits/rig/modules/combat.dm b/code/modules/clothing/spacesuits/rig/modules/combat.dm index e359be5afd3..a06b83ab8f6 100644 --- a/code/modules/clothing/spacesuits/rig/modules/combat.dm +++ b/code/modules/clothing/spacesuits/rig/modules/combat.dm @@ -62,7 +62,7 @@ return 0 if(!holder.cell.check_charge(use_power_cost * CELLRATE)) - to_chat(holder.wearer,"Not enough stored power.") + to_chat(holder.wearer,SPAN_WARNING("Not enough stored power.")) return 0 if(!target) @@ -123,7 +123,7 @@ return 0 if(accepted_item.charges >= 5) - to_chat(user, "Another grenade of that type will not fit into the module.") + to_chat(user, SPAN_DANGER("Another grenade of that type will not fit into the module.")) return 0 to_chat(user, SPAN_BLUE("You slot \the [input_device] into the suit module.")) @@ -139,10 +139,10 @@ if(!target) return 0 - var/mob/living/human/H = holder.wearer + var/mob/living/human/wearer = holder.wearer if(!charge_selected) - to_chat(H, "You have not selected a grenade type.") + to_chat(wearer, SPAN_DANGER("You have not selected a grenade type.")) return 0 var/datum/rig_charge/charge = charges[charge_selected] @@ -151,14 +151,14 @@ return 0 if(charge.charges <= 0) - to_chat(H, "Insufficient grenades!") + to_chat(wearer, SPAN_DANGER("Insufficient grenades!")) return 0 charge.charges-- - var/obj/item/grenade/new_grenade = new charge.product_type(get_turf(H)) - H.visible_message("[H] launches \a [new_grenade]!") + var/obj/item/grenade/new_grenade = new charge.product_type(get_turf(wearer)) + wearer.visible_message(SPAN_DANGER("[wearer] launches \a [new_grenade]!"), SPAN_DANGER("You launch \a [new_grenade]!")) log_and_message_admins("fired a grenade ([new_grenade.name]) from a rigsuit grenade launcher.") - new_grenade.activate(H) + new_grenade.activate(wearer) new_grenade.throw_at(target,fire_force,fire_distance) /obj/item/rig_module/grenade_launcher/cleaner @@ -402,21 +402,21 @@ if(!..()) return FALSE - var/mob/living/H = holder.wearer + var/mob/living/wearer = holder.wearer if(target) var/obj/item/firing = new fabrication_type() firing.dropInto(loc) - H.visible_message(SPAN_DANGER("\The [H] launches \a [firing]!")) + wearer.visible_message(SPAN_DANGER("\The [wearer] launches \a [firing]!"), SPAN_DANGER("You launch \a [firing]!")) firing.throw_at(target,fire_force,fire_distance) else - if(!H.get_empty_hand_slot()) - to_chat(H, SPAN_WARNING("Your hands are full.")) + if(!wearer.get_empty_hand_slot()) + to_chat(wearer, SPAN_WARNING("Your hands are full.")) else var/obj/item/new_weapon = new fabrication_type() - new_weapon.forceMove(H) - to_chat(H, SPAN_BLUE("You quickly fabricate \a [new_weapon].")) - H.put_in_hands(new_weapon) + new_weapon.forceMove(wearer) + to_chat(wearer, SPAN_BLUE("You quickly fabricate \a [new_weapon].")) + wearer.put_in_hands(new_weapon) return TRUE diff --git a/code/modules/species/species_bodytype.dm b/code/modules/species/species_bodytype.dm index 8169aa70bbb..2601b22ef1e 100644 --- a/code/modules/species/species_bodytype.dm +++ b/code/modules/species/species_bodytype.dm @@ -614,11 +614,11 @@ var/global/list/bodytypes_by_category = list() /decl/bodytype/proc/get_limb_from_zone(limb) . = length(LAZYACCESS(limb_mapping, limb)) ? pick(limb_mapping[limb]) : limb -/decl/bodytype/proc/check_vital_organ_missing(mob/living/H) +/decl/bodytype/proc/check_vital_organ_missing(mob/living/patient) if(length(vital_organs)) for(var/organ_tag in vital_organs) - var/obj/item/organ/O = H.get_organ(organ_tag, /obj/item/organ) - if(!O || (O.status & ORGAN_DEAD)) + var/obj/item/organ/vital_organ = patient.get_organ(organ_tag, /obj/item/organ) + if(!vital_organ || (vital_organ.status & ORGAN_DEAD)) return TRUE return FALSE diff --git a/mods/content/psionics/machines/psimeter.dm b/mods/content/psionics/machines/psimeter.dm index 22b1de43259..b3abc2cb9c5 100644 --- a/mods/content/psionics/machines/psimeter.dm +++ b/mods/content/psionics/machines/psimeter.dm @@ -31,9 +31,9 @@ else dat += "

TELESTO Mark I Psi-Meter


" var/found - for(var/mob/living/H in range(1, src)) + for(var/mob/living/subject in range(1, src)) found = TRUE - dat += "" dat += "
Candidates
[H.name]Conduct Assay" + dat += "
[subject.name]Conduct Assay" if(!found) dat += "
No candidates found.
" diff --git a/mods/gamemodes/deity/spells/open_gateway.dm b/mods/gamemodes/deity/spells/open_gateway.dm index 1038d03c6a1..db83a05c891 100644 --- a/mods/gamemodes/deity/spells/open_gateway.dm +++ b/mods/gamemodes/deity/spells/open_gateway.dm @@ -13,14 +13,14 @@ cast_sound = 'sound/effects/meteorimpact.ogg' /spell/open_gateway/choose_targets() - var/mob/living/H = holder - var/turf/T = get_turf(H) - holder.visible_message(SPAN_NOTICE("A gateway opens up underneath \the [H]!")) - var/g + var/mob/living/spellcaster = holder + var/turf/source_turf = get_turf(spellcaster) + holder.visible_message(SPAN_NOTICE("A gateway opens up underneath \the [spellcaster]!")) + var/deity var/decl/special_role/godcultist/godcult = GET_DECL(/decl/special_role/godcultist) - if(H.mind && (H.mind in godcult.current_antagonists)) - g = godcult.get_deity(H.mind) - return list(new /obj/structure/deity/gateway(T,g)) + if(spellcaster.mind && (spellcaster.mind in godcult.current_antagonists)) + deity = godcult.get_deity(spellcaster.mind) + return list(new /obj/structure/deity/gateway(source_turf, deity)) /spell/open_gateway/cast(var/list/targets, var/mob/holder, var/channel_count) if(prob((channel_count / 5) * 100)) diff --git a/mods/mobs/borers/mob/borer/borer.dm b/mods/mobs/borers/mob/borer/borer.dm index 41ace823dc9..1e467e1b889 100644 --- a/mods/mobs/borers/mob/borer/borer.dm +++ b/mods/mobs/borers/mob/borer/borer.dm @@ -235,9 +235,7 @@ host.reset_view(null) host.machine = null - - var/mob/living/H = host - H.status_flags &= ~PASSEMOTES + host.status_flags &= ~PASSEMOTES host = null return diff --git a/mods/species/ascent/items/id_control.dm b/mods/species/ascent/items/id_control.dm index ac465c63b3d..a3fb7a4b25f 100644 --- a/mods/species/ascent/items/id_control.dm +++ b/mods/species/ascent/items/id_control.dm @@ -51,10 +51,10 @@ if(owner) var/datum/extension/access_provider/owner_access = get_extension(owner, /datum/extension/access_provider) owner_access?.unregister_id(src) - var/mob/living/H = owner + var/mob/living/old_owner = owner . = ..() - if(H && !(locate(type) in H.get_internal_organs())) - H.remove_language(/decl/language/mantid/worldnet) + if(old_owner && !(locate(type) in old_owner.get_internal_organs())) + old_owner.remove_language(/decl/language/mantid/worldnet) /obj/item/organ/internal/controller/Initialize() if(ispath(id_card)) diff --git a/mods/species/ascent/mobs/bodyparts_insectoid.dm b/mods/species/ascent/mobs/bodyparts_insectoid.dm index 1b88459a1f1..d0053d8587e 100644 --- a/mods/species/ascent/mobs/bodyparts_insectoid.dm +++ b/mods/species/ascent/mobs/bodyparts_insectoid.dm @@ -12,19 +12,19 @@ /obj/item/organ/internal/egg_sac/insectoid/attack_self(var/mob/user) . = ..() - var/mob/living/H = user + var/mob/living/living_user = user if(.) - if(H.incapacitated()) - to_chat(H, SPAN_WARNING("You can't produce eggs in your current state.")) + if(living_user.incapacitated()) + to_chat(living_user, SPAN_WARNING("You can't produce eggs in your current state.")) return - if(H.nutrition < egg_metabolic_cost) - to_chat(H, SPAN_WARNING("You are too ravenously hungry to produce more eggs.")) + if(living_user.nutrition < egg_metabolic_cost) + to_chat(living_user, SPAN_WARNING("You are too ravenously hungry to produce more eggs.")) return - if(do_after(H, 5 SECONDS, H, FALSE)) - H.adjust_nutrition(-1 * egg_metabolic_cost) - H.visible_message(SPAN_NOTICE("\icon[H] [H] carelessly deposits an egg on \the [get_turf(src)].")) - var/obj/structure/insectoid_egg/egg = new(get_turf(H)) // splorp - egg.lineage = H.get_gyne_lineage() + if(do_after(living_user, 5 SECONDS, living_user, FALSE)) + living_user.adjust_nutrition(-1 * egg_metabolic_cost) + living_user.visible_message(SPAN_NOTICE("\icon[living_user] [living_user] carelessly deposits an egg on \the [get_turf(src)].")) + var/obj/structure/insectoid_egg/egg = new(get_turf(living_user)) // splorp + egg.lineage = living_user.get_gyne_lineage() /obj/item/organ/external/foot/insectoid/mantid name = "left tail tip"