"
- dat += "[F.get_value()]"
+ dat += " | [field.get_value()]"
dat += ""
return dat
//Should only be used for OOC stuff, for player-facing stuff you must go through the network.
/proc/get_crewmember_record(var/name)
- for(var/datum/computer_file/report/crew_record/CR in global.all_crew_records)
- if(CR.get_name() == name)
- return CR
+ for(var/datum/computer_file/report/crew_record/crew_record in global.all_crew_records)
+ if(crew_record.get_name() == name)
+ return crew_record
return null
-/proc/GetAssignment(var/mob/living/human/H)
- if(!H)
+/proc/GetAssignment(var/mob/living/crewmember)
+ if(!crewmember)
return "Unassigned"
- if(!H.mind)
- return H.job
- if(H.mind.role_alt_title)
- return H.mind.role_alt_title
- return H.mind.assigned_role
+ if(!crewmember.mind)
+ return crewmember.job
+ if(crewmember.mind.role_alt_title)
+ return crewmember.mind.role_alt_title
+ return crewmember.mind.assigned_role
#define GETTER_SETTER(PATH, KEY) /datum/computer_file/report/crew_record/proc/get_##KEY(){var/datum/report_field/F = locate(/datum/report_field/##PATH/##KEY) in fields; if(F) return F.get_value()} \
/datum/computer_file/report/crew_record/proc/set_##KEY(given_value){var/datum/report_field/F = locate(/datum/report_field/##PATH/##KEY) in fields; if(F) F.set_value(given_value)}
@@ -279,16 +279,16 @@ FIELD_LONG("Exploitable Information", antag_record, access_hacked, access_hacked
. |= "Unset"
var/list/all_genders = decls_repository.get_decls_of_type(/decl/pronouns)
for(var/thing in all_genders)
- var/decl/pronouns/G = all_genders[thing]
- if(G.bureaucratic_term )
- . |= G.bureaucratic_term
+ var/decl/pronouns/gender = all_genders[thing]
+ if(gender.bureaucratic_term )
+ . |= gender.bureaucratic_term
/datum/report_field/options/crew_record/branch/proc/record_branches()
. = list()
. |= "Unset"
- for(var/B in mil_branches.branches)
- var/datum/mil_branch/BR = mil_branches.branches[B]
- . |= BR.name
+ for(var/branch in mil_branches.branches)
+ var/datum/mil_branch/branch_datum = mil_branches.branches[branch]
+ . |= branch_datum.name
#undef GETTER_SETTER
#undef SETUP_FIELD
diff --git a/code/modules/multiz/hoist.dm b/code/modules/multiz/hoist.dm
index 02c3988c4a6..6a3c80e71fe 100644
--- a/code/modules/multiz/hoist.dm
+++ b/code/modules/multiz/hoist.dm
@@ -48,15 +48,14 @@
/obj/effect/hoist_hook/receive_mouse_drop(atom/dropping, mob/user, params)
// skip the parent buckle logic, handle climbing directly
- 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
// end copypasta'd code
if(istype(dropping, /atom/movable))
- var/atom/movable/AM = dropping
- if(!AM.simulated || AM.anchored)
- to_chat(user, SPAN_WARNING("You can't do that with \the [AM]."))
+ var/atom/movable/dropped_movable = dropping
+ if(!dropped_movable.simulated || dropped_movable.anchored)
+ to_chat(user, SPAN_WARNING("You can't do that with \the [dropped_movable]."))
return TRUE
if(source_hoist.hoistee)
to_chat(user, SPAN_NOTICE("\The [source_hoist.hoistee] is already attached to \the [src]!"))
@@ -66,24 +65,24 @@
return
if (!user.check_dexterity(DEXTERITY_HOLD_ITEM))
return
- source_hoist.attach_hoistee(AM)
+ source_hoist.attach_hoistee(dropped_movable)
user.visible_message(
- SPAN_NOTICE("[user] attaches \the [AM] to \the [src]."),
- SPAN_NOTICE("You attach \the [AM] to \the [src]."),
+ SPAN_NOTICE("[user] attaches \the [dropped_movable] to \the [src]."),
+ SPAN_NOTICE("You attach \the [dropped_movable] to \the [src]."),
"You hear something clamp into place.")
return TRUE
-/obj/structure/hoist/proc/attach_hoistee(atom/movable/AM)
- hoistee = AM
- if(ismob(AM))
- source_hook.buckle_mob(AM)
+/obj/structure/hoist/proc/attach_hoistee(atom/movable/victim)
+ hoistee = victim
+ if(ismob(victim))
+ source_hook.buckle_mob(victim)
else
- AM.anchored = TRUE // can't buckle non-mobs at the moment
- source_hook.layer = AM.layer + 0.1
- if (get_turf(AM) != get_turf(source_hook))
- AM.forceMove(get_turf(source_hook))
+ victim.anchored = TRUE // can't buckle non-mobs at the moment
+ source_hook.layer = victim.layer + 0.1
+ if (get_turf(victim) != get_turf(source_hook))
+ victim.forceMove(get_turf(source_hook))
- events_repository.register(/decl/observ/destroyed, AM, src, PROC_REF(release_hoistee))
+ events_repository.register(/decl/observ/destroyed, victim, src, PROC_REF(release_hoistee))
/obj/effect/hoist_hook/handle_mouse_drop(atom/over, mob/user, params)
if(source_hoist.hoistee && isturf(over) && over.Adjacent(source_hoist.hoistee))
@@ -105,9 +104,9 @@
/obj/effect/hoist_hook/unbuckle_mob()
. = ..()
if (. && !QDELETED(source_hoist))
- var/mob/M = .
+ var/mob/victim = .
source_hoist.hoistee = null
- M.fall(get_turf(src)) // fuck you, you fall now!
+ victim.fall(get_turf(src)) // fuck you, you fall now!
/obj/structure/hoist
name = "hoist"
@@ -210,19 +209,11 @@
check_consistency()
- var/size
- if (ismob(hoistee))
- var/mob/M = hoistee
- size = M.mob_size
- else if (isobj(hoistee))
- var/obj/O = hoistee
- size = O.w_class
-
user.visible_message(
SPAN_NOTICE("[user] begins to [movtext] \the [hoistee]!"),
SPAN_NOTICE("You begin to [movtext] \the [hoistee]!"),
SPAN_NOTICE("You hear the sound of a crank."))
- if (do_after(user, (1 SECONDS) * size / 4, src))
+ if (do_after(user, (1 SECONDS) * get_object_size(hoistee) / 4, src))
move_dir(movedir, 1)
return TRUE
@@ -265,8 +256,8 @@
if (source_hook in get_step(src, dir)) // you don't get to move above the hoist
return FALSE
if (DOWN)
- var/turf/T = get_turf(source_hook)
- if(!istype(T) || !T.is_open()) // can't move down through a solid tile
+ var/turf/current_turf = get_turf(source_hook)
+ if(!current_turf || !current_turf.is_open()) // can't move down through a solid tile or if not on a turf
return FALSE
return TRUE // i thought i could trust myself to write something as simple as this, guess i was wrong
diff --git a/code/modules/organs/external/_external.dm b/code/modules/organs/external/_external.dm
index 39673c2f03e..3d11169ef4a 100644
--- a/code/modules/organs/external/_external.dm
+++ b/code/modules/organs/external/_external.dm
@@ -85,8 +85,8 @@
if((limb_flags & ORGAN_FLAG_FINGERPRINT) && !BP_IS_PROSTHETIC(src))
fingerprint = value
else
- for(var/obj/item/organ/external/E in children)
- E.set_fingerprint(value)
+ for(var/obj/item/organ/external/child in children)
+ child.set_fingerprint(value)
/obj/item/organ/external/proc/get_fingerprint()
@@ -95,19 +95,19 @@
fingerprint = md5(sequential_id(/mob))
return fingerprint
- for(var/obj/item/organ/external/E in children)
- var/print = E.get_fingerprint()
+ for(var/obj/item/organ/external/child in children)
+ var/print = child.get_fingerprint()
if(print)
return print
-/obj/item/organ/external/afterattack(atom/A, mob/user, proximity)
+/obj/item/organ/external/afterattack(atom/target, mob/user, proximity)
..()
if(proximity && get_fingerprint())
var/datum/extension/forensic_evidence/forensics = get_or_create_extension(src, /datum/extension/forensic_evidence)
- var/datum/fingerprint/F = new()
- F.full_print = get_fingerprint()
- F.completeness = rand(10,90)
- forensics.add_data(/datum/forensics/fingerprints, F)
+ var/datum/fingerprint/fingerprint = new()
+ fingerprint.full_print = get_fingerprint()
+ fingerprint.completeness = rand(10,90)
+ forensics.add_data(/datum/forensics/fingerprints, fingerprint)
/obj/item/organ/external/Initialize(mapload, material_key, datum/mob_snapshot/supplied_appearance, decl/bodytype/new_bodytype)
. = ..()
@@ -197,9 +197,9 @@
burn_damage = 7.5
var/power = 4 - severity //stupid reverse severity
- for(var/obj/item/I in implants)
- if(I.obj_flags & OBJ_FLAG_CONDUCTIBLE)
- burn_damage += I.w_class * rand(power, 3*power)
+ for(var/obj/item/implanted_item in implants)
+ if(implanted_item.obj_flags & OBJ_FLAG_CONDUCTIBLE)
+ burn_damage += implanted_item.w_class * rand(power, 3*power)
if(owner && burn_damage)
owner.custom_pain("Something inside your [src] burns a [severity < 2 ? "bit" : "lot"]!", power * 15) //robotic organs won't feel it anyway
@@ -213,32 +213,30 @@
if((owner && loc == owner) || !contents.len)
return ..()
var/list/removable_objects = list()
- for(var/obj/item/organ/external/E in (contents + src))
- if(!istype(E))
- continue
- for(var/obj/item/I in E.contents)
- if(istype(I,/obj/item/organ))
+ for(var/obj/item/organ/external/child_organ in (contents + src))
+ for(var/obj/item/embedded in child_organ.contents)
+ if(istype(embedded, /obj/item/organ))
continue
- removable_objects |= I
+ removable_objects |= embedded
if(removable_objects.len)
- var/obj/item/I = pick(removable_objects)
- I.forceMove(get_turf(user)) //just in case something was embedded that is not an item
- if(istype(I) && user.get_empty_hand_slot())
- user.put_in_hands(I)
- user.visible_message(SPAN_DANGER("\The [user] rips \the [I] out of \the [src]!"))
+ var/obj/item/embedded = pick(removable_objects)
+ embedded.forceMove(get_turf(user)) //just in case something was embedded that is not an item
+ if(istype(embedded) && user.get_empty_hand_slot())
+ user.put_in_hands(embedded)
+ user.visible_message(SPAN_DANGER("\The [user] rips \the [embedded] out of \the [src]!"))
return //no eating the limb until everything's been removed
return ..()
/obj/item/organ/external/examine(mob/user, distance)
. = ..()
if(distance <= 1 || isghost(user))
- for(var/obj/item/I in contents)
- if(istype(I, /obj/item/organ))
+ for(var/obj/item/embedded in contents)
+ if(istype(embedded, /obj/item/organ))
continue
- to_chat(user, "There is \a [I] sticking out of it.")
+ to_chat(user, SPAN_DANGER("There is \a [embedded] sticking out of it."))
var/ouchies = get_wounds_desc()
if(ouchies != "nothing")
- to_chat(user, "There is [ouchies] visible on it.")
+ to_chat(user, SPAN_NOTICE("There is [ouchies] visible on it."))
return
@@ -247,105 +245,105 @@
for(var/obj/item/organ/external/child in children)
child.show_decay_status(user)
-/obj/item/organ/external/attackby(obj/item/W, mob/user)
+/obj/item/organ/external/attackby(obj/item/used_item, mob/user)
- var/obj/item/organ/external/E = W
- if(BP_IS_PROSTHETIC(src) && istype(E) && BP_IS_PROSTHETIC(E))
+ var/obj/item/organ/external/connecting_limb = used_item
+ if(BP_IS_PROSTHETIC(src) && istype(connecting_limb) && BP_IS_PROSTHETIC(connecting_limb))
var/combined = FALSE
- if(E.organ_tag == parent_organ)
+ if(connecting_limb.organ_tag == parent_organ)
- if(length(E.children))
- to_chat(usr, SPAN_WARNING("You cannot connect additional limbs to \the [E]."))
+ if(length(connecting_limb.children))
+ to_chat(usr, SPAN_WARNING("You cannot connect additional limbs to \the [connecting_limb]."))
return
- var/mob/M = loc
- if(istype(M))
- M.try_unequip(src, E)
+ var/mob/holder = loc
+ if(istype(holder))
+ holder.try_unequip(src, connecting_limb)
else
dropInto(loc)
- forceMove(E)
+ forceMove(connecting_limb)
- if(loc != E)
+ if(loc != connecting_limb)
return
- if(istype(E.owner))
- E.owner.add_organ(src, E)
+ if(istype(connecting_limb.owner))
+ connecting_limb.owner.add_organ(src, connecting_limb)
else
- do_install(null, E)
+ do_install(null, connecting_limb)
combined = TRUE
- else if(E.parent_organ == organ_tag)
+ else if(connecting_limb.parent_organ == organ_tag)
if(LAZYLEN(children))
to_chat(usr, SPAN_WARNING("You cannot connect additional limbs to \the [src]."))
return
- if(!user.try_unequip(E, src))
+ if(!user.try_unequip(connecting_limb, src))
return
- if(istype(E.owner))
- E.owner.add_organ(E, src)
+ if(istype(connecting_limb.owner))
+ connecting_limb.owner.add_organ(connecting_limb, src)
else
- E.do_install(null, src)
+ connecting_limb.do_install(null, src)
combined = TRUE
else
- to_chat(user, SPAN_WARNING("\The [E] cannot be connected to \the [src]."))
+ to_chat(user, SPAN_WARNING("\The [connecting_limb] cannot be connected to \the [src]."))
return
if(combined)
- to_chat(user, SPAN_NOTICE("You connect \the [E] to \the [src]."))
+ to_chat(user, SPAN_NOTICE("You connect \the [connecting_limb] to \the [src]."))
compile_icon()
update_icon()
- E.compile_icon()
- E.update_icon()
+ connecting_limb.compile_icon()
+ connecting_limb.update_icon()
return
//Remove sub-limbs
- if(W.get_tool_quality(TOOL_SAW) && LAZYLEN(children) && try_saw_off_child(W, user))
+ if(used_item.get_tool_quality(TOOL_SAW) && LAZYLEN(children) && try_saw_off_child(used_item, user))
return
//Remove internal items/organs/implants
- if(try_remove_internal_item(W, user))
+ if(try_remove_internal_item(used_item, user))
return
..()
//Handles removing internal organs/implants/items still in the detached limb.
-/obj/item/organ/external/proc/try_remove_internal_item(var/obj/item/W, var/mob/user)
+/obj/item/organ/external/proc/try_remove_internal_item(var/obj/item/used_item, var/mob/user)
- if(stage == 0 && W.sharp)
- user.visible_message(SPAN_NOTICE("\The [user] cuts \the [src] open with \the [W]."))
+ if(stage == 0 && used_item.sharp)
+ user.visible_message(SPAN_NOTICE("\The [user] cuts \the [src] open with \the [used_item]."))
stage++
return TRUE
- if(stage == 1 && IS_RETRACTOR(W))
- user.visible_message(SPAN_NOTICE("\The [user] levers \the [src] open with \the [W]."))
+ if(stage == 1 && IS_RETRACTOR(used_item))
+ user.visible_message(SPAN_NOTICE("\The [user] levers \the [src] open with \the [used_item]."))
stage++
return TRUE
- if(stage == 2 && (W.sharp || IS_HEMOSTAT(W) || IS_WIRECUTTER(W)))
+ if(stage == 2 && (used_item.sharp || IS_HEMOSTAT(used_item) || IS_WIRECUTTER(used_item)))
var/list/radial_buttons = make_item_radial_menu_choices(get_contents_recursive())
if(LAZYLEN(radial_buttons))
var/obj/item/removing = show_radial_menu(user, src, radial_buttons, radius = 42, require_near = TRUE, use_labels = TRUE, check_locs = list(src))
if(removing)
if(istype(removing, /obj/item/organ))
- var/obj/item/organ/O = removing
- O.do_uninstall()
+ var/obj/item/organ/removed_organ = removing
+ removed_organ.do_uninstall()
removing.forceMove(get_turf(user))
if(user.get_empty_hand_slot())
user.put_in_hands(removing)
- user.visible_message(SPAN_NOTICE("\The [user] extracts [removing] from \the [src] with \the [W]!"))
+ user.visible_message(SPAN_NOTICE("\The [user] extracts [removing] from \the [src] with \the [used_item]!"))
else
- user.visible_message(SPAN_NOTICE("\The [user] fishes around fruitlessly in \the [src] with \the [W]."))
+ user.visible_message(SPAN_NOTICE("\The [user] fishes around fruitlessly in \the [src] with \the [used_item]."))
return TRUE
return FALSE
//Handles removing child limbs from the detached limb.
-/obj/item/organ/external/proc/try_saw_off_child(var/obj/item/W, var/mob/user)
+/obj/item/organ/external/proc/try_saw_off_child(var/obj/item/used_item, var/mob/user)
//Add icons to radial menu
var/list/radial_buttons = make_item_radial_menu_choices(get_limbs_recursive())
@@ -357,7 +355,7 @@
if(!istype(removing))
return TRUE
- var/cutting_result = !W.do_tool_interaction(TOOL_SAW, user, src, 3 SECONDS, "cutting \the [removing] off")
+ var/cutting_result = !used_item.do_tool_interaction(TOOL_SAW, user, src, 3 SECONDS, "cutting \the [removing] off")
//Check if the limb is still in the hierarchy
if(cutting_result == 1 || !(removing in get_limbs_recursive()))
if(cutting_result != -1)
@@ -373,7 +371,7 @@
removing.update_icon()
if(user.get_empty_hand_slot())
user.put_in_hands(removing)
- user.visible_message(SPAN_DANGER("[user] cuts off \the [removing] from [src] with [W]!"))
+ user.visible_message(SPAN_DANGER("[user] cuts off \the [removing] from [src] with [used_item]!"))
return TRUE
/**
@@ -405,11 +403,11 @@
return (status & ORGAN_DISLOCATED) || is_parent_dislocated() //if any parent is dislocated, we are considered dislocated as well
/obj/item/organ/external/proc/is_parent_dislocated()
- var/obj/item/organ/external/O = parent
- while(O && (O.limb_flags & ORGAN_FLAG_CAN_DISLOCATE))
- if(O.status & ORGAN_DISLOCATED)
+ var/obj/item/organ/external/current_limb = parent
+ while(current_limb && (current_limb.limb_flags & ORGAN_FLAG_CAN_DISLOCATE))
+ if(current_limb.status & ORGAN_DISLOCATED)
return TRUE
- O = O.parent
+ current_limb = current_limb.parent
return FALSE
/obj/item/organ/external/proc/update_internal_organs_cost()
@@ -475,15 +473,15 @@
//
//Add any existing organs in the owner that have us as parent
//
- for(var/obj/item/organ/internal/I in owner.get_internal_organs())
- if(I.parent_organ == organ_tag)
- LAZYDISTINCTADD(internal_organs, I)
+ for(var/obj/item/organ/internal/internal_organ in owner.get_internal_organs())
+ if(internal_organ.parent_organ == organ_tag)
+ LAZYDISTINCTADD(internal_organs, internal_organ)
update_internal_organs_cost()
- for(var/obj/item/organ/external/E in owner.get_external_organs())
- if(E.parent_organ == organ_tag)
- E.parent = src
- LAZYDISTINCTADD(children, E)
+ for(var/obj/item/organ/external/external_organ in owner.get_external_organs())
+ if(external_organ.parent_organ == organ_tag)
+ external_organ.parent = src
+ LAZYDISTINCTADD(children, external_organ)
//Add any existing implants that should be refering us
for(var/obj/implant in implants)
@@ -496,10 +494,10 @@
//Since limbs attached during surgery have their internal organs detached, we want to re-attach them if we're doing the proper install of the parent limb
else if(istype(implant, /obj/item/organ) && !detached)
- var/obj/item/organ/O = implant
- if(O.parent_organ == organ_tag)
+ var/obj/item/organ/detached_organ = implant
+ if(detached_organ.parent_organ == organ_tag)
//The add_organ chain will automatically handle properly removing the detached flag, and moving it to the proper lists
- owner.add_organ(O, src, in_place, update_icon, detached)
+ owner.add_organ(detached_organ, src, in_place, update_icon, detached)
else
//Handle installing into a stand-alone parent limb to keep dropped limbs in some kind of coherent state
if(!affected)
@@ -523,9 +521,9 @@
LAZYDISTINCTADD(parent.children, src) //Even when detached the limb has to be in the children list, because of the way limbs icon are handled
//Remove any stump wound for this slot
- for(var/datum/wound/lost_limb/W in parent.wounds)
- if(W.limb_tag == organ_tag)
- qdel(W) //Removes itself from parent.wounds
+ for(var/datum/wound/lost_limb/stump in parent.wounds)
+ if(stump.limb_tag == organ_tag)
+ qdel(stump) //Removes itself from parent.wounds
break
if(!in_place)
@@ -586,8 +584,8 @@
if(BURN) src.heal_damage(0, repair_amount, 0, 1)
owner.try_refresh_visible_overlays()
if(user == src.owner)
- var/decl/pronouns/G = user.get_pronouns()
- user.visible_message(SPAN_NOTICE("\The [user] patches [damage_desc] on [G.his] [name] with \the [tool]."))
+ var/decl/pronouns/user_pronouns = user.get_pronouns()
+ user.visible_message(SPAN_NOTICE("\The [user] patches [damage_desc] on [user_pronouns.his] [name] with \the [tool]."))
else
user.visible_message(SPAN_NOTICE("\The [user] patches [damage_desc] on \the [owner]'s [name] with \the [tool]."))
return 1
@@ -631,11 +629,11 @@ This function completely restores a damaged organ to perfect condition.
/obj/item/organ/external/remove_rejuv()
if(owner)
owner.remove_organ(src, FALSE, FALSE, TRUE, TRUE, FALSE)
- for(var/obj/item/organ/external/E in children)
- E.remove_rejuv()
+ for(var/obj/item/organ/external/child in children)
+ child.remove_rejuv()
LAZYCLEARLIST(children)
- for(var/obj/item/organ/internal/I in internal_organs)
- I.remove_rejuv()
+ for(var/obj/item/organ/internal/internal_organ in internal_organs)
+ internal_organ.remove_rejuv()
..()
/obj/item/organ/external/proc/createwound(var/type = CUT, var/damage, var/surgical)
@@ -680,44 +678,44 @@ This function completely restores a damaged organ to perfect condition.
if((type == CUT || type == BRUISE) && damage >= 5)
//we need to make sure that the wound we are going to worsen is compatible with the type of damage...
var/list/compatible_wounds = list()
- for (var/datum/wound/W in wounds)
- if (W.can_worsen(type, damage))
- compatible_wounds += W
+ for (var/datum/wound/wound in wounds)
+ if (wound.can_worsen(type, damage))
+ compatible_wounds += wound
if(compatible_wounds.len)
- var/datum/wound/W = pick(compatible_wounds)
- W.open_wound(damage)
+ var/datum/wound/wound = pick(compatible_wounds)
+ wound.open_wound(damage)
if(owner && prob(25))
if(BP_IS_CRYSTAL(src))
- owner.visible_message("The cracks in \the [owner]'s [name] spread.",\
- "The cracks in your [name] spread.",\
- "You hear the cracking of crystal.")
+ owner.visible_message(SPAN_DANGER("The cracks in \the [owner]'s [name] spread."),\
+ SPAN_DANGER("The cracks in your [name] spread."),\
+ SPAN_DANGER("You hear the cracking of crystal."))
else if(BP_IS_PROSTHETIC(src))
- owner.visible_message("The damage to \the [owner]'s [name] worsens.",\
- "The damage to your [name] worsens.",\
- "You hear the screech of abused metal.")
+ owner.visible_message(SPAN_DANGER("The damage to \the [owner]'s [name] worsens."),\
+ SPAN_DANGER("The damage to your [name] worsens."),\
+ SPAN_DANGER("You hear the screech of abused metal."))
else
- owner.visible_message("The wound on \the [owner]'s [name] widens with a nasty ripping noise.",\
- "The wound on your [name] widens with a nasty ripping noise.",\
- "You hear a nasty ripping noise, as if flesh is being torn apart.")
- return W
+ owner.visible_message(SPAN_DANGER("The wound on \the [owner]'s [name] widens with a nasty ripping noise."),\
+ SPAN_DANGER("The wound on your [name] widens with a nasty ripping noise."),\
+ SPAN_DANGER("You hear a nasty ripping noise, as if flesh is being torn apart."))
+ return wound
//Creating wound
var/wound_type = get_wound_type(type, damage)
if(wound_type)
- var/datum/wound/W = new wound_type(damage, src, surgical)
+ var/datum/wound/wound = new wound_type(damage, src, surgical)
//Check whether we can add the wound to an existing wound
if(surgical)
- W.autoheal_cutoff = 0
+ wound.autoheal_cutoff = 0
else
for(var/datum/wound/other in wounds)
- if(other.can_merge_wounds(W))
- other.merge_wound(W)
+ if(other.can_merge_wounds(wound))
+ other.merge_wound(wound)
return
- LAZYADD(wounds, W)
- return W
+ LAZYADD(wounds, wound)
+ return wound
/****************************************************
PROCESSING & UPDATING
@@ -742,8 +740,8 @@ This function completely restores a damaged organ to perfect condition.
if(get_genetic_damage())
return TRUE
- for(var/obj/item/organ/internal/I in internal_organs)
- if(I.getToxLoss())
+ for(var/obj/item/organ/internal/internal_organ in internal_organs)
+ if(internal_organ.getToxLoss())
return TRUE
if(last_dam != brute_dam + burn_dam) // Process when we are fully healed up.
@@ -806,18 +804,18 @@ Note that amputating the affected organ does in fact remove the infection from t
handle_germ_effects()
/obj/item/organ/external/proc/handle_germ_sync()
- var/turf/T = get_turf(owner)
- for(var/datum/wound/W in wounds)
+ var/turf/current_turf = get_turf(owner)
+ for(var/datum/wound/wound in wounds)
//Open wounds can become infected
- // what in the hell is this doing with T?
- if(max(istype(T) && T.simulated && T.get_dirt()*10, 2*owner.germ_level) > W.germ_level && W.infection_check())
- W.germ_level++
+ // what in the hell is this doing with current_turf?
+ if(max(istype(current_turf) && current_turf.simulated && current_turf.get_dirt()*10, 2*owner.germ_level) > wound.germ_level && wound.infection_check())
+ wound.germ_level++
var/antibiotics = GET_CHEMICAL_EFFECT(owner, CE_ANTIBIOTIC)
if (!antibiotics)
- for(var/datum/wound/W in wounds)
+ for(var/datum/wound/wound in wounds)
//Infected wounds raise the organ's germ level
- if (W.germ_level > germ_level || prob(min(W.germ_level, 30)))
+ if (wound.germ_level > germ_level || prob(min(wound.germ_level, 30)))
germ_level++
break //limit increase to a maximum of one per second
@@ -831,17 +829,17 @@ Note that amputating the affected organ does in fact remove the infection from t
if(germ_level >= INFECTION_LEVEL_TWO)
//spread the infection to internal organs
var/obj/item/organ/target_organ = null //make internal organs become infected one at a time instead of all at once
- for (var/obj/item/organ/I in internal_organs)
- if (I.germ_level > 0 && I.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one
- if (!target_organ || I.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level
- target_organ = I
+ for (var/obj/item/organ/internal_organ in internal_organs)
+ if (internal_organ.germ_level > 0 && internal_organ.germ_level < min(germ_level, INFECTION_LEVEL_TWO)) //once the organ reaches whatever we can give it, or level two, switch to a different one
+ if (!target_organ || internal_organ.germ_level > target_organ.germ_level) //choose the organ with the highest germ_level
+ target_organ = internal_organ
if (!target_organ)
//figure out which organs we can spread germs to and pick one at random
var/list/candidate_organs = list()
- for (var/obj/item/organ/I in internal_organs)
- if (I.germ_level < germ_level)
- candidate_organs |= I
+ for (var/obj/item/organ/internal_organ in internal_organs)
+ if (internal_organ.germ_level < germ_level)
+ candidate_organs |= internal_organ
if (candidate_organs.len)
target_organ = pick(candidate_organs)
@@ -862,7 +860,7 @@ Note that amputating the affected organ does in fact remove the infection from t
if(germ_level >= INFECTION_LEVEL_THREE && antibiotics < REAGENTS_OVERDOSE) //overdosing is necessary to stop severe infections
if (!(status & ORGAN_DEAD))
status |= ORGAN_DEAD
- to_chat(owner, "You can't feel your [name] anymore...")
+ to_chat(owner, SPAN_NOTICE("You can't feel your [name] anymore..."))
owner.update_body(1)
germ_level++
@@ -873,18 +871,18 @@ Note that amputating the affected organ does in fact remove the infection from t
var/update_surgery
if(BP_IS_PROSTHETIC(src) || BP_IS_CRYSTAL(src)) //Robotic limbs don't heal or get worse.
- for(var/datum/wound/W in wounds) //Repaired wounds disappear though
- if(W.damage <= 0) //and they disappear right away
- qdel(W) //TODO: robot wounds for robot limbs
+ for(var/datum/wound/wound in wounds) //Repaired wounds disappear though
+ if(wound.damage <= 0) //and they disappear right away
+ qdel(wound) //TODO: robot wounds for robot limbs
update_surgery = TRUE
if(owner && update_surgery)
owner.update_surgery()
return
- for(var/datum/wound/W in wounds)
+ for(var/datum/wound/wound in wounds)
// wounds can disappear after 10 minutes at the earliest
- if(W.damage <= 0 && W.created + (10 MINUTES) <= world.time)
- qdel(W)
+ if(wound.damage <= 0 && wound.created + (10 MINUTES) <= world.time)
+ qdel(wound)
update_surgery = TRUE
continue
// let the GC handle the deletion of the wound
@@ -892,7 +890,7 @@ Note that amputating the affected organ does in fact remove the infection from t
// slow healing
var/heal_amt = 0
// if damage >= 50 AFTER treatment then it's probably too severe to heal within the timeframe of a round.
- if (owner && !GET_CHEMICAL_EFFECT(owner, CE_TOXIN) && W.can_autoheal() && W.wound_damage() && brute_ratio < 0.5 && burn_ratio < 0.5)
+ if (owner && !GET_CHEMICAL_EFFECT(owner, CE_TOXIN) && wound.can_autoheal() && wound.wound_damage() && brute_ratio < 0.5 && burn_ratio < 0.5)
heal_amt += 0.5
// we only update wounds once in [wound_update_accuracy] ticks so have to emulate realtime
@@ -909,10 +907,10 @@ Note that amputating the affected organ does in fact remove the infection from t
// making it look prettier on scanners
heal_amt = round(heal_amt,0.1)
var/dam_type = BRUTE
- if(W.damage_type == BURN)
+ if(wound.damage_type == BURN)
dam_type = BURN
if(owner?.can_autoheal(dam_type))
- W.heal_damage(heal_amt)
+ wound.heal_damage(heal_amt)
// sync the organ's damage with its wounds
update_damages()
@@ -930,29 +928,30 @@ Note that amputating the affected organ does in fact remove the infection from t
status &= ~ORGAN_BLEEDING
var/clamped = 0
- var/mob/living/human/H
+ // This is defined outside of the loop as an optimization for a large number of wounds.
+ var/mob/living/human/human_owner
if(ishuman(owner))
- H = owner
+ human_owner = owner
//update damage counts
var/bleeds = (!BP_IS_PROSTHETIC(src) && !BP_IS_CRYSTAL(src))
- for(var/datum/wound/W in wounds)
+ for(var/datum/wound/wound in wounds)
- if(W.damage <= 0)
- qdel(W)
+ if(wound.damage <= 0)
+ qdel(wound)
continue
- if(W.damage_type == BURN)
- burn_dam += W.damage
+ if(wound.damage_type == BURN)
+ burn_dam += wound.damage
else
- brute_dam += W.damage
+ brute_dam += wound.damage
- if(bleeds && W.bleeding() && (H && H.should_have_organ(BP_HEART)))
- W.bleed_timer--
+ if(bleeds && wound.bleeding() && (human_owner && human_owner.should_have_organ(BP_HEART)))
+ wound.bleed_timer--
status |= ORGAN_BLEEDING
- clamped |= W.clamped
- number_wounds += W.amount
+ clamped |= wound.clamped
+ number_wounds += wound.amount
damage = brute_dam + burn_dam
update_damage_ratios()
@@ -1057,10 +1056,10 @@ Note that amputating the affected organ does in fact remove the infection from t
. = new /obj/effect/decal/cleanable/blood/gibs(dropturf)
if(species && istype(., /obj/effect/decal/cleanable/blood/gibs))
- var/obj/effect/decal/cleanable/blood/gibs/G = .
- G.fleshcolor = species.get_species_flesh_color(owner)
- G.basecolor = species.get_species_blood_color(owner)
- G.update_icon()
+ var/obj/effect/decal/cleanable/blood/gibs/gibs = .
+ gibs.fleshcolor = species.get_species_flesh_color(owner)
+ gibs.basecolor = species.get_species_blood_color(owner)
+ gibs.update_icon()
//Handles dismemberment
/obj/item/organ/external/proc/dismember(var/clean, var/disintegrate = DISMEMBER_METHOD_EDGE, var/ignore_children, var/silent, var/ignore_last_organ)
@@ -1075,9 +1074,9 @@ Note that amputating the affected organ does in fact remove the infection from t
var/list/organ_msgs = get_droplimb_messages_for(disintegrate, clean)
if(LAZYLEN(organ_msgs) >= 3)
- owner.visible_message("[organ_msgs[1]]", \
- "[organ_msgs[2]]", \
- "[organ_msgs[3]]")
+ owner.visible_message(SPAN_DANGER("[organ_msgs[1]]"), \
+ SPAN_MODERATE("[organ_msgs[2]]"), \
+ SPAN_DANGER("[organ_msgs[3]]"))
add_pain(60)
if(!clean)
@@ -1107,9 +1106,9 @@ Note that amputating the affected organ does in fact remove the infection from t
original_parent.sever_artery()
// Leave a big ol hole.
- var/datum/wound/lost_limb/W = new(src, disintegrate, clean)
- W.parent_organ = original_parent
- LAZYADD(original_parent.wounds, W)
+ var/datum/wound/lost_limb/stump = new(src, disintegrate, clean)
+ stump.parent_organ = original_parent
+ LAZYADD(original_parent.wounds, stump)
original_parent.update_damages()
if(QDELETED(src))
@@ -1132,19 +1131,19 @@ Note that amputating the affected organ does in fact remove the infection from t
var/atom/movable/gore = place_remains_from_dismember_method(disintegrate)
if(gore)
if(disintegrate == DISMEMBER_METHOD_BURN || disintegrate == DISMEMBER_METHOD_ACID)
- for(var/obj/item/I in src)
- if(I.w_class > ITEM_SIZE_SMALL && !istype(I,/obj/item/organ))
- I.dropInto(loc)
+ for(var/obj/item/contained_item in src)
+ if(contained_item.w_class > ITEM_SIZE_SMALL && !istype(contained_item, /obj/item/organ))
+ contained_item.dropInto(loc)
else if(disintegrate == DISMEMBER_METHOD_BLUNT)
gore.throw_at(get_edge_target_turf(src,pick(global.alldirs)), rand(1,3), THROWFORCE_GIBS)
- for(var/obj/item/organ/I in internal_organs)
- I.do_uninstall() //No owner so run uninstall directly
- I.dropInto(get_turf(loc))
- if(!QDELETED(I) && isturf(loc))
- I.throw_at(get_edge_target_turf(src,pick(global.alldirs)), rand(1,3), THROWFORCE_GIBS)
- for(var/obj/item/I in src)
- I.dropInto(loc)
- I.throw_at(get_edge_target_turf(src,pick(global.alldirs)), rand(1,3), THROWFORCE_GIBS)
+ for(var/obj/item/organ/internal_organ in internal_organs)
+ internal_organ.do_uninstall() //No owner so run uninstall directly
+ internal_organ.dropInto(get_turf(loc))
+ if(!QDELETED(internal_organ) && isturf(loc))
+ internal_organ.throw_at(get_edge_target_turf(src,pick(global.alldirs)), rand(1,3), THROWFORCE_GIBS)
+ for(var/obj/item/contained_item in src)
+ contained_item.dropInto(loc)
+ contained_item.throw_at(get_edge_target_turf(src,pick(global.alldirs)), rand(1,3), THROWFORCE_GIBS)
if(!QDELETED(src))
qdel(src)
@@ -1166,70 +1165,70 @@ Note that amputating the affected organ does in fact remove the infection from t
// checks if all wounds on the organ are bandaged
/obj/item/organ/external/proc/is_bandaged()
- for(var/datum/wound/W in wounds)
- if(!W.bandaged)
+ for(var/datum/wound/wound in wounds)
+ if(!wound.bandaged)
return 0
return 1
// checks if all wounds on the organ are salved
/obj/item/organ/external/proc/is_salved()
- for(var/datum/wound/W in wounds)
- if(!W.salved)
+ for(var/datum/wound/wound in wounds)
+ if(!wound.salved)
return 0
return 1
// checks if all wounds on the organ are disinfected
/obj/item/organ/external/proc/is_disinfected()
- for(var/datum/wound/W in wounds)
- if(!W.disinfected)
+ for(var/datum/wound/wound in wounds)
+ if(!wound.disinfected)
return 0
return 1
/obj/item/organ/external/proc/salve()
var/rval = 0
- for(var/datum/wound/W in wounds)
- rval |= !W.salved
- W.salved = 1
+ for(var/datum/wound/wound in wounds)
+ rval |= !wound.salved
+ wound.salved = 1
return rval
/obj/item/organ/external/proc/disinfect()
var/rval = 0
- for(var/datum/wound/W in wounds)
- rval |= !W.disinfected
- W.disinfected = 1
- W.germ_level = 0
+ for(var/datum/wound/wound in wounds)
+ rval |= !wound.disinfected
+ wound.disinfected = 1
+ wound.germ_level = 0
return rval
/obj/item/organ/external/proc/clamp_organ()
var/rval = 0
src.status &= ~ORGAN_BLEEDING
- for(var/datum/wound/W in wounds)
- rval |= !W.clamped
- W.clamped = 1
+ for(var/datum/wound/wound in wounds)
+ rval |= !wound.clamped
+ wound.clamped = 1
return rval
/obj/item/organ/external/proc/clamped()
- for(var/datum/wound/W in wounds)
- if(W.clamped)
+ for(var/datum/wound/wound in wounds)
+ if(wound.clamped)
return 1
/obj/item/organ/external/proc/remove_clamps()
var/rval = 0
- for(var/datum/wound/W in wounds)
- rval |= W.clamped
- W.clamped = 0
+ for(var/datum/wound/wound in wounds)
+ rval |= wound.clamped
+ wound.clamped = 0
return rval
// open incisions and expose implants
// this is the retract step of surgery
/obj/item/organ/external/proc/open_incision()
- var/datum/wound/W = get_incision()
- if(!W) return
- W.open_wound(min(W.damage * 2, W.damage_list[1] - W.damage))
+ var/datum/wound/incision = get_incision()
+ if(!incision) return
+ incision.open_wound(min(incision.damage * 2, incision.damage_list[1] - incision.damage))
if(!encased)
- for(var/obj/item/implant/I in implants)
- I.exposed()
+ for(var/obj/item/implant/implant in implants)
+ implant.exposed()
/obj/item/organ/external/proc/fracture()
if(!get_config_value(/decl/config/toggle/on/health_bones_can_break))
@@ -1241,9 +1240,9 @@ Note that amputating the affected organ does in fact remove the infection from t
if(owner)
owner.visible_message(\
- "You hear a loud cracking sound coming from \the [owner].",\
- "Something feels like it shattered in your [name]!",\
- "You hear a sickening crack.")
+ SPAN_DANGER("You hear a loud cracking sound coming from \the [owner]."),\
+ SPAN_DANGER("Something feels like it shattered in your [name]!"),\
+ SPAN_DANGER("You hear a sickening crack."))
jostle_bone()
if(can_feel_pain())
owner.emote(/decl/emote/audible/scream)
@@ -1302,8 +1301,8 @@ Note that amputating the affected organ does in fact remove the infection from t
return (brute_dam+burn_dam) //could use max_damage?
/obj/item/organ/external/proc/has_infected_wound()
- for(var/datum/wound/W in wounds)
- if(W.germ_level > INFECTION_LEVEL_ONE)
+ for(var/datum/wound/wound in wounds)
+ if(wound.germ_level > INFECTION_LEVEL_ONE)
return 1
return 0
@@ -1324,38 +1323,38 @@ Note that amputating the affected organ does in fact remove the infection from t
/obj/item/organ/external/proc/is_malfunctioning()
return (is_robotic() && (brute_dam + burn_dam) >= 10 && prob(brute_dam + burn_dam))
-/obj/item/organ/external/proc/embed_in_organ(var/obj/item/W, var/silent = FALSE, var/supplied_message, var/datum/wound/supplied_wound)
+/obj/item/organ/external/proc/embed_in_organ(var/obj/item/embedding, var/silent = FALSE, var/supplied_message, var/datum/wound/supplied_wound)
if(!owner || loc != owner)
return
if(species.species_flags & SPECIES_FLAG_NO_EMBED)
return
if(!silent)
if(supplied_message)
- owner.visible_message("[supplied_message]")
+ owner.visible_message(SPAN_DANGER("[supplied_message]"))
else
- owner.visible_message("\The [W] sticks in the wound!")
+ owner.visible_message(SPAN_DANGER("\The [embedding] sticks in the wound!"))
if(!supplied_wound)
for(var/datum/wound/wound in wounds)
- if((wound.damage_type == CUT || wound.damage_type == PIERCE) && wound.damage >= W.w_class * 5)
+ if((wound.damage_type == CUT || wound.damage_type == PIERCE) && wound.damage >= embedding.w_class * 5)
supplied_wound = wound
break
if(!supplied_wound)
- supplied_wound = createwound(PIERCE, W.w_class * 5)
+ supplied_wound = createwound(PIERCE, embedding.w_class * 5)
- if(!supplied_wound || (W in supplied_wound.embedded_objects)) // Just in case.
+ if(!supplied_wound || (embedding in supplied_wound.embedded_objects)) // Just in case.
return
- LAZYDISTINCTADD(supplied_wound.embedded_objects, W)
- LAZYDISTINCTADD(implants, W)
+ LAZYDISTINCTADD(supplied_wound.embedded_objects, embedding)
+ LAZYDISTINCTADD(implants, embedding)
owner.embedded_flag = 1
owner.verbs += /mob/proc/yank_out_object
- W.add_blood(owner)
- if(ismob(W.loc))
- var/mob/living/H = W.loc
- H.drop_from_inventory(W)
- W.forceMove(owner)
+ embedding.add_blood(owner)
+ if(ismob(embedding.loc))
+ var/mob/living/holder = embedding.loc
+ holder.drop_from_inventory(embedding)
+ embedding.forceMove(owner)
/obj/item/organ/external/do_uninstall(in_place, detach, ignore_children, update_icon)
@@ -1366,11 +1365,11 @@ Note that amputating the affected organ does in fact remove the infection from t
if(victim)
if(in_place)
//When removing in place, we don't bother with moving child organs and implants, we just clear the refs
- for(var/obj/item/implant/I in implants)
- I.removed()
+ for(var/obj/item/implant/implant in implants)
+ implant.removed()
//Remove the parent ref from all childs limbs until we replace the organ in place
- for(var/obj/item/organ/external/E in children)
- E.parent = null
+ for(var/obj/item/organ/external/child in children)
+ child.parent = null
implants = null
children = null
@@ -1379,28 +1378,28 @@ Note that amputating the affected organ does in fact remove the infection from t
//Move over our implants/items into us, and drop whatever else is too big or not an object(??)
for(var/atom/movable/implant in implants)
//large items and non-item objs fall to the floor, everything else stays
- var/obj/item/I = implant
+ var/obj/item/item_implant = implant
if(QDELETED(implant))
LAZYREMOVE(implants, implant)
continue
- if(istype(I) && I.w_class < ITEM_SIZE_NORMAL)
- if(istype(I, /obj/item/implant))
- var/obj/item/implant/imp = I
+ if(istype(item_implant) && item_implant.w_class < ITEM_SIZE_NORMAL)
+ if(istype(item_implant, /obj/item/implant))
+ var/obj/item/implant/imp = item_implant
imp.removed()
implant.forceMove(src)
- else
- //Dumpt the rest on the turf
+ else // Is this even necessary? What non-items can even get added to implants?
+ //Dump the rest on the turf
LAZYREMOVE(implants, implant)
implant.forceMove(get_turf(src))
if(!ignore_children)
//Move our chilren limb into our contents
- for(var/obj/item/organ/external/O in children)
- victim.remove_organ(O, FALSE, FALSE, FALSE, in_place, update_icon)
- if(QDELETED(O))
- LAZYREMOVE(children, O)
+ for(var/obj/item/organ/external/child in children)
+ victim.remove_organ(child, FALSE, FALSE, FALSE, in_place, update_icon)
+ if(QDELETED(child))
+ LAZYREMOVE(children, child)
continue
- O.do_install(null, src, FALSE, update_icon, FALSE) //Forcemove the organ and properly set it up in our internal data
+ child.do_install(null, src, FALSE, update_icon, FALSE) //Forcemove the organ and properly set it up in our internal data
// Grab all the children internal organs
for(var/obj/item/organ/internal/organ in internal_organs)
@@ -1445,13 +1444,13 @@ Note that amputating the affected organ does in fact remove the infection from t
return
if(owner)
if(type == BRUTE)
- owner.visible_message("You hear a sickening cracking sound coming from \the [owner]'s [name].", \
- "Your [name] becomes a mangled mess!", \
- "You hear a sickening crack.")
+ owner.visible_message(SPAN_DANGER("You hear a sickening cracking sound coming from \the [owner]'s [name]."), \
+ SPAN_DANGER("Your [name] becomes a mangled mess!"), \
+ SPAN_DANGER("You hear a sickening crack."))
else
- owner.visible_message("\The [owner]'s [name] melts away, turning into mangled mess!", \
- "Your [name] melts away!", \
- "You hear a sickening sizzle.")
+ owner.visible_message(SPAN_DANGER("\The [owner]'s [name] melts away, turning into mangled mess!"), \
+ SPAN_DANGER("Your [name] melts away!"), \
+ SPAN_DANGER("You hear a sickening sizzle."))
status |= ORGAN_DISFIGURED
/obj/item/organ/external/proc/get_incision(var/strict)
@@ -1462,20 +1461,20 @@ Note that amputating the affected organ does in fact remove the infection from t
if(!incision || incision.damage < other.damage)
incision = other
else
- for(var/datum/wound/cut/W in wounds)
- if(!W.is_open()) // Shit's unusable
+ for(var/datum/wound/cut/candidate_incision in wounds)
+ if(!candidate_incision.is_open()) // Shit's unusable
continue
- if(strict && !W.is_surgical()) //We don't need dirty ones
+ if(strict && !candidate_incision.is_surgical()) //We don't need dirty ones
continue
if(!incision)
- incision = W
+ incision = candidate_incision
continue
- var/same = W.is_surgical() == incision.is_surgical()
+ var/same = candidate_incision.is_surgical() == incision.is_surgical()
if(same) //If they're both dirty or both are surgical, just get bigger one
- if(W.damage > incision.damage)
- incision = W
- else if(W.is_surgical()) //otherwise surgical one takes priority
- incision = W
+ if(candidate_incision.damage > incision.damage)
+ incision = candidate_incision
+ else if(candidate_incision.is_surgical()) //otherwise surgical one takes priority
+ incision = candidate_incision
return incision
/obj/item/organ/external/proc/how_open()
@@ -1507,8 +1506,8 @@ Note that amputating the affected organ does in fact remove the infection from t
return
if(LAZYLEN(internal_organs) && prob(brute_dam + force))
owner.custom_pain("A piece of bone in your [encased ? encased : name] moves painfully!", 50, affecting = src)
- var/obj/item/organ/internal/I = pick(internal_organs)
- I.take_internal_damage(rand(3,5))
+ var/obj/item/organ/internal/internal_organ = pick(internal_organs)
+ internal_organ.take_internal_damage(rand(3,5))
/obj/item/organ/external/proc/jointlock(mob/attacker)
if(!can_feel_pain())
@@ -1516,7 +1515,7 @@ Note that amputating the affected organ does in fact remove the infection from t
var/armor = 100 * owner.get_blocked_ratio(owner, BRUTE, damage = 30)
if(armor < 70)
- to_chat(owner, "You feel extreme pain!")
+ to_chat(owner, SPAN_DANGER("You feel extreme pain!"))
var/max_halloss = round(owner.species.total_health * 0.8 * ((100 - armor) / 100)) //up to 80% of passing out, further reduced by armour
add_pain(clamp(0, max_halloss - owner.get_damage(PAIN), 30))
@@ -1526,18 +1525,18 @@ Note that amputating the affected organ does in fact remove the infection from t
var/key = used_weapon
var/data = used_weapon
if(istype(used_weapon, /obj/item))
- var/obj/item/I = used_weapon
- key = I.name
- data = english_list(I.get_autopsy_descriptors())
- var/datum/autopsy_data/W = LAZYACCESS(autopsy_data, key)
- if(!W)
- W = new()
- W.weapon = data
- LAZYSET(autopsy_data, key, W)
-
- W.hits += 1
- W.damage += damage
- W.time_inflicted = world.time
+ var/obj/item/used_item = used_weapon
+ key = used_item.name
+ data = english_list(used_item.get_autopsy_descriptors())
+ var/datum/autopsy_data/autopsy_datum = LAZYACCESS(autopsy_data, key)
+ if(!autopsy_datum)
+ autopsy_datum = new()
+ autopsy_datum.weapon = data
+ LAZYSET(autopsy_data, key, autopsy_datum)
+
+ autopsy_datum.hits += 1
+ autopsy_datum.damage += damage
+ autopsy_datum.time_inflicted = world.time
/obj/item/organ/external/proc/has_genitals()
return !BP_IS_PROSTHETIC(src) && bodytype?.get_vulnerable_location() == organ_tag
@@ -1597,8 +1596,8 @@ Note that amputating the affected organ does in fact remove the infection from t
if(isnull(vital_to_owner))
. = ..()
if(!.)
- for(var/obj/item/organ/O in children)
- if(O.is_vital_to_owner())
+ for(var/obj/item/organ/child in children)
+ if(child.is_vital_to_owner())
vital_to_owner = TRUE
break
return vital_to_owner
diff --git a/code/modules/recycling/disposalholder.dm b/code/modules/recycling/disposalholder.dm
index 120782aaff4..4f3546d06a6 100644
--- a/code/modules/recycling/disposalholder.dm
+++ b/code/modules/recycling/disposalholder.dm
@@ -18,9 +18,9 @@
var/partialTag = "" //set by a partial tagger the first time round, then put in destinationTag if it goes through again.
// initialize a holder from the contents of a disposal unit
-/obj/structure/disposalholder/proc/init(var/obj/machinery/disposal/D, var/datum/gas_mixture/flush_gas)
+/obj/structure/disposalholder/proc/init(var/obj/machinery/disposal/disposal_unit, var/datum/gas_mixture/flush_gas)
gas = flush_gas// transfer gas resv. into holder object -- let's be explicit about the data this proc consumes, please.
- var/stuff = D.get_contained_external_atoms()
+ var/stuff = disposal_unit.get_contained_external_atoms()
//Check for any living mobs trigger hasmob.
//hasmob effects whether the package goes to cargo or its tagged destination.
hasmob = length(check_mob(stuff))
@@ -36,20 +36,20 @@
/obj/structure/disposalholder/proc/check_mob(list/stuff, max_depth = 1)
. = list()
if(max_depth > 0)
- for(var/mob/living/M in stuff)
- if (!isdrone(M))
- . += M
- for(var/obj/O in stuff)
- . += check_mob(O.contents, max_depth - 1)
+ for(var/mob/living/victim in stuff)
+ if (!isdrone(victim))
+ . += victim
+ for(var/obj/container in stuff)
+ . += check_mob(container.contents, max_depth - 1)
// start the movement process
// argument is the disposal unit the holder started in
-/obj/structure/disposalholder/proc/start(var/obj/machinery/disposal/D)
- if(!D.trunk)
- D.expel(src) // no trunk connected, so expel immediately
+/obj/structure/disposalholder/proc/start(var/obj/machinery/disposal/disposal_unit)
+ if(!disposal_unit.trunk)
+ disposal_unit.expel(src) // no trunk connected, so expel immediately
return
- forceMove(D.trunk)
+ forceMove(disposal_unit.trunk)
active = 1
set_dir(DOWN)
START_PROCESSING(SSdisposals, src)
@@ -65,8 +65,8 @@
var/obj/structure/disposalpipe/last
if(hasmob && prob(3))
- for(var/mob/living/H in check_mob(src))
- H.apply_damage(30, BRUTE, null, DAM_DISPERSED, "Blunt Trauma", ARMOR_MELEE_MAJOR)//horribly maim any living creature jumping down disposals. c'est la vie
+ for(var/mob/living/victim in check_mob(src))
+ victim.apply_damage(30, BRUTE, null, DAM_DISPERSED, "Blunt Trauma", ARMOR_MELEE_MAJOR)//horribly maim any living creature jumping down disposals. c'est la vie
var/obj/structure/disposalpipe/curr = loc
if(!istype(curr))
@@ -87,26 +87,26 @@
return get_step(loc,dir)
// find a matching pipe on a turf
-/obj/structure/disposalholder/proc/findpipe(var/turf/T)
- if(!T)
+/obj/structure/disposalholder/proc/findpipe(var/turf/containing_turf)
+ if(!containing_turf)
return null
var/fdir = turn(dir, 180) // flip the movement direction
- for(var/obj/structure/disposalpipe/P in T)
- if(fdir & P.dpdir) // find pipe direction mask that matches flipped dir
- return P
+ for(var/obj/structure/disposalpipe/pipe in containing_turf)
+ if(fdir & pipe.dpdir) // find pipe direction mask that matches flipped dir
+ return pipe
// if no matching pipe, return null
return null
// merge two holder objects
// used when a a holder meets a stuck holder
/obj/structure/disposalholder/proc/merge(var/obj/structure/disposalholder/other)
- for(var/atom/movable/AM in other)
- AM.forceMove(src) // move everything in other holder to this one
- if(ismob(AM))
- var/mob/M = AM
- if(M.client) // if a client mob, update eye to follow this holder
- M.client.eye = src
+ for(var/atom/movable/other_movable in other)
+ other_movable.forceMove(src) // move everything in other holder to this one
+ if(ismob(other_movable))
+ var/mob/other_mob = other_movable
+ if(other_mob.client) // if a client mob, update eye to follow this holder
+ other_mob.client.eye = src
qdel(other)
/obj/structure/disposalholder/proc/settag(var/new_tag)
@@ -124,12 +124,12 @@
if(!isliving(user))
return
- var/mob/living/U = user
+ var/mob/living/living_user = user
- if (U.stat || U.is_on_special_ability_cooldown())
+ if (living_user.stat || living_user.is_on_special_ability_cooldown())
return
- U.set_special_ability_cooldown(10 SECONDS)
+ living_user.set_special_ability_cooldown(10 SECONDS)
var/turf/our_turf = get_turf(src)
if (our_turf)
diff --git a/code/modules/sealant_gun/sealant.dm b/code/modules/sealant_gun/sealant.dm
index 33e4b8d4a00..bd3abc985a2 100644
--- a/code/modules/sealant_gun/sealant.dm
+++ b/code/modules/sealant_gun/sealant.dm
@@ -38,7 +38,7 @@
break_apart(user)
return TRUE
-/obj/item/sealant/attackby(obj/item/W, mob/user)
+/obj/item/sealant/attackby(obj/item/used_item, mob/user)
break_apart(user)
return TRUE
@@ -54,9 +54,9 @@
user.setClickCooldown(1 SECOND)
qdel(src)
-/obj/item/sealant/Bump(atom/A, forced)
+/obj/item/sealant/Bump(atom/bumped, forced)
. = ..()
- splat(A)
+ splat(bumped)
/obj/item/sealant/throw_impact(atom/hit_atom)
. = ..()
@@ -66,18 +66,18 @@
if(splatted)
return
splatted = TRUE
- var/turf/T = get_turf(target) || get_turf(src)
- if(T)
- new /obj/effect/sealant(T)
+ var/turf/target_turf = get_turf(target) || get_turf(src)
+ if(target_turf)
+ new /obj/effect/sealant(target_turf)
if(isliving(target))
- var/mob/living/H = target
+ var/mob/living/living_target = target
for(var/slot in shuffle(splat_try_equip_slots))
- if(!H.get_equipped_item(slot))
- H.equip_to_slot_if_possible(src, slot)
- if(H.get_equipped_item(slot) == src)
+ if(!living_target.get_equipped_item(slot))
+ living_target.equip_to_slot_if_possible(src, slot)
+ if(living_target.get_equipped_item(slot) == src)
return
- if(!T.density && !(locate(foam_type) in T))
- new foam_type(T)
+ if(!target_turf.density && !(locate(foam_type) in target_turf))
+ new foam_type(target_turf)
if(!QDELETED(src))
qdel(src)
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
Candidates | "
var/found
- for(var/mob/living/H in range(1, src))
+ for(var/mob/living/subject in range(1, src))
found = TRUE
- dat += "[H.name] | Conduct Assay"
+ dat += " | [subject.name] | Conduct Assay"
if(!found)
dat += " | No candidates found. | "
dat += ""
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 ba2ea206443..3feb93260ed 100644
--- a/mods/mobs/borers/mob/borer/borer.dm
+++ b/mods/mobs/borers/mob/borer/borer.dm
@@ -236,9 +236,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"
|