Skip to content

Commit

Permalink
Rename miscellaneous mob/living/H variables and parameters
Browse files Browse the repository at this point in the history
  • Loading branch information
out-of-phaze committed Jul 4, 2024
1 parent 02b4baa commit a174990
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 58 deletions.
3 changes: 1 addition & 2 deletions code/_onclick/drag_drop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
8 changes: 4 additions & 4 deletions code/datums/hostility/hostility.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
18 changes: 9 additions & 9 deletions code/modules/admin/admin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
30 changes: 15 additions & 15 deletions code/modules/clothing/spacesuits/rig/modules/combat.dm
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@
return 0

if(!holder.cell.check_charge(use_power_cost * CELLRATE))
to_chat(holder.wearer,"<span class='warning'>Not enough stored power.</span>")
to_chat(holder.wearer,SPAN_WARNING("Not enough stored power."))
return 0

if(!target)
Expand Down Expand Up @@ -123,7 +123,7 @@
return 0

if(accepted_item.charges >= 5)
to_chat(user, "<span class='danger'>Another grenade of that type will not fit into the module.</span>")
to_chat(user, SPAN_DANGER("Another grenade of that type will not fit into the module."))
return 0

to_chat(user, SPAN_BLUE("<b>You slot \the [input_device] into the suit module.</b>"))
Expand All @@ -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, "<span class='danger'>You have not selected a grenade type.</span>")
to_chat(wearer, SPAN_DANGER("You have not selected a grenade type."))
return 0

var/datum/rig_charge/charge = charges[charge_selected]
Expand All @@ -151,14 +151,14 @@
return 0

if(charge.charges <= 0)
to_chat(H, "<span class='danger'>Insufficient grenades!</span>")
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("<span class='danger'>[H] launches \a [new_grenade]!</span>")
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
Expand Down Expand Up @@ -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("<b>You quickly fabricate \a [new_weapon].</b>"))
H.put_in_hands(new_weapon)
new_weapon.forceMove(wearer)
to_chat(wearer, SPAN_BLUE("<b>You quickly fabricate \a [new_weapon].</b>"))
wearer.put_in_hands(new_weapon)

return TRUE

Expand Down
6 changes: 3 additions & 3 deletions code/modules/species/species_bodytype.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions mods/content/psionics/machines/psimeter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
else
dat += "<h2>TELESTO Mark I Psi-Meter</h2><hr><table border = 1 width = 100%><tr><td colspan = 2><b>Candidates</b></td></tr>"
var/found
for(var/mob/living/H in range(1, src))
for(var/mob/living/subject in range(1, src))
found = TRUE
dat += "<tr><td>[H.name]</td><td><a href='byond://?src=\ref[src];assay=\ref[H]'>Conduct Assay</a>"
dat += "<tr><td>[subject.name]</td><td><a href='byond://?src=\ref[src];assay=\ref[subject]'>Conduct Assay</a>"
if(!found)
dat += "<tr><td colspan = 2>No candidates found.</td></tr>"
dat += "<table>"
Expand Down
14 changes: 7 additions & 7 deletions mods/gamemodes/deity/spells/open_gateway.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
4 changes: 1 addition & 3 deletions mods/mobs/borers/mob/borer/borer.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions mods/species/ascent/items/id_control.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down
20 changes: 10 additions & 10 deletions mods/species/ascent/mobs/bodyparts_insectoid.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit a174990

Please sign in to comment.