From 144a6a943bcace6eaf5287dc69c15127137638d0 Mon Sep 17 00:00:00 2001
From: FabianK3 <21039694+FabianK3@users.noreply.github.com>
Date: Fri, 21 Aug 2026 01:25:32 +0000
Subject: [PATCH] Revert "Refactor Get Pain" (#23118)
Reverts Aurorastation/Aurora.3#22847
---
aurorastation.dme | 1 -
code/__DEFINES/fast_getters.dm | 19 ---
code/__DEFINES/organs.dm | 2 +-
.../components/medical/medicalAnalyzer.dm | 10 +-
.../spells/modifier/mend_synthetic.dm | 10 +-
code/game/objects/items/stacks/medical.dm | 2 +-
code/game/objects/items/tools/tools.dm | 6 +-
.../structures/machinery/body_scanner.dm | 4 +-
code/modules/martial_arts/skrell.dm | 2 +-
code/modules/martial_arts/tajara.dm | 2 +-
code/modules/mob/living/carbon/alien/life.dm | 8 +-
code/modules/mob/living/carbon/carbon.dm | 6 +-
.../mob/living/carbon/human/damage_menu.dm | 8 +-
.../mob/living/carbon/human/examine.dm | 6 +-
code/modules/mob/living/carbon/human/human.dm | 2 +-
.../living/carbon/human/human_attackhand.dm | 2 +-
.../mob/living/carbon/human/human_damage.dm | 28 ++--
.../mob/living/carbon/human/human_defense.dm | 2 +-
.../mob/living/carbon/human/human_organs.dm | 2 +-
code/modules/mob/living/carbon/human/life.dm | 8 +-
.../human/species/station/human/human.dm | 2 +-
.../mob/living/silicon/robot/analyzer.dm | 2 +-
code/modules/mob/mob_grab_specials.dm | 2 +-
.../file_system/programs/research/robotics.dm | 4 +-
code/modules/multiz/movement.dm | 18 +--
code/modules/organs/organ_external.dm | 137 +++++-------------
code/modules/organs/organ_icon.dm | 2 +-
code/modules/organs/pain.dm | 2 +-
code/modules/organs/wounds/wound.dm | 10 --
code/modules/power/cable.dm | 6 +-
code/modules/projectiles/projectile.dm | 2 +-
code/modules/psionics/abilities/mend.dm | 2 +-
code/modules/surgery/robotics.dm | 4 +-
code/modules/tgui/modules/ipc_diagnostic.dm | 4 +-
34 files changed, 119 insertions(+), 208 deletions(-)
delete mode 100644 code/__DEFINES/fast_getters.dm
diff --git a/aurorastation.dme b/aurorastation.dme
index 7c11891df1b..bbe37192d6e 100644
--- a/aurorastation.dme
+++ b/aurorastation.dme
@@ -63,7 +63,6 @@
#include "code\__DEFINES\empulse.dm"
#include "code\__DEFINES\evacuation.dm"
#include "code\__DEFINES\fabricators.dm"
-#include "code\__DEFINES\fast_getters.dm"
#include "code\__DEFINES\feedback.dm"
#include "code\__DEFINES\flags.dm"
#include "code\__DEFINES\font_awesome_icons.dm"
diff --git a/code/__DEFINES/fast_getters.dm b/code/__DEFINES/fast_getters.dm
deleted file mode 100644
index 6d9e0286f3c..00000000000
--- a/code/__DEFINES/fast_getters.dm
+++ /dev/null
@@ -1,19 +0,0 @@
-// This file exists because SpacemanDMM doesn't support GET PRIVATE SET vars, only fully PRIVATE vars.
-// And these macro getters allow us to bypass this limitation by simulating an "Aggressively Inlined Public Get"
-// Which kills proc overhead.
-// If you use these to Set the associated vars, I will destroy you.
-
-/// Public Get for /obj/organ/external/VAR_PRIVATE/pain
-#define LIMB_GET_PAIN(limb) UNLINT(limb.pain)
-
-/// Public Get for /obj/organ/external/VAR_PRIVATE/brute_dam
-#define LIMB_GET_BRUTE_DAMAGE(limb) UNLINT(limb.brute_dam)
-
-/// Public Get for /obj/organ/external/VAR_PRIVATE/burn_dam
-#define LIMB_GET_BURN_DAMAGE(limb) UNLINT(limb.burn_dam)
-
-/// Public Get for /obj/organ/external/VAR_PRIVATE/genetic_degradation
-#define LIMB_GET_GENETIC_DAMAGE(limb) UNLINT(limb.genetic_degradation)
-
-/// Public Get for /obj/organ/external/VAR_PRIVATE/dislocated
-#define LIMB_GET_DISLOCATED(limb) UNLINT(limb.dislocated)
diff --git a/code/__DEFINES/organs.dm b/code/__DEFINES/organs.dm
index 5c5db1ad9cb..33aecdde263 100644
--- a/code/__DEFINES/organs.dm
+++ b/code/__DEFINES/organs.dm
@@ -1,5 +1,5 @@
#define ORGAN_CAN_FEEL_PAIN(organ) !BP_IS_ROBOTIC(organ) && (!organ.species || !(organ.species.flags & NO_PAIN))
-#define ORGAN_IS_DISLOCATED(organ) (LIMB_GET_DISLOCATED(organ) > 0)
+#define ORGAN_IS_DISLOCATED(organ) (organ.dislocated > 0)
#define SOCKET_UNSHIELDED 0
#define SOCKET_SHIELDED 1
#define SOCKET_FULLSHIELDED 2
diff --git a/code/datums/components/medical/medicalAnalyzer.dm b/code/datums/components/medical/medicalAnalyzer.dm
index 88cd9121395..b5f84b77e57 100644
--- a/code/datums/components/medical/medicalAnalyzer.dm
+++ b/code/datums/components/medical/medicalAnalyzer.dm
@@ -282,10 +282,10 @@
for(var/obj/item/organ/external/org in damaged)
var/limb_name = "[capitalize(org.name)][BP_IS_ROBOTIC(org) ? " (Cybernetic)" : ""]"
var/limb_result = ""
- if(LIMB_GET_BRUTE_DAMAGE(org) > 0)
- limb_result = " [SPAN_SCAN_DANGER("[get_wound_severity(LIMB_GET_BRUTE_DAMAGE(org), (org.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)] physical trauma")]"
- if(LIMB_GET_BURN_DAMAGE(org) > 0)
- limb_result = "[limb_result][limb_result ? " | " : " "][SPAN_SCAN_ORANGE_DANGER("[get_wound_severity(LIMB_GET_BURN_DAMAGE(org), (org.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)] burns")]"
+ if(org.brute_dam > 0)
+ limb_result = " [SPAN_SCAN_DANGER("[get_wound_severity(org.brute_dam, (org.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)] physical trauma")]"
+ if(org.burn_dam > 0)
+ limb_result = "[limb_result][limb_result ? " | " : " "][SPAN_SCAN_ORANGE_DANGER("[get_wound_severity(org.burn_dam, (org.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)] burns")]"
if(org.status & ORGAN_BLEEDING)
limb_result = "[limb_result][limb_result ? " | " : " "][SPAN_SCAN_DANGER("bleeding")]"
var/is_bandaged = org.is_bandaged()
@@ -330,7 +330,7 @@
var/found_disloc
for(var/obj/item/organ/external/e in H.organs)
if(e)
- if(!found_disloc && LIMB_GET_DISLOCATED(e) == 2)
+ if(!found_disloc && e.dislocated == 2)
dat += SPAN_SCAN_WARNING("Dislocation detected. Advanced scanner required for location.")
found_disloc = TRUE
if(!found_bleed && (e.status & ORGAN_ARTERY_CUT))
diff --git a/code/game/gamemodes/technomancer/spells/modifier/mend_synthetic.dm b/code/game/gamemodes/technomancer/spells/modifier/mend_synthetic.dm
index 8bf1cf76d6a..7b46d393994 100644
--- a/code/game/gamemodes/technomancer/spells/modifier/mend_synthetic.dm
+++ b/code/game/gamemodes/technomancer/spells/modifier/mend_synthetic.dm
@@ -30,7 +30,7 @@
if(ishuman(L))
var/mob/living/carbon/human/H = L
for(var/obj/item/organ/external/O in H.organs)
- if(BP_IS_ROBOTIC(O) && (LIMB_GET_BRUTE_DAMAGE(O) || LIMB_GET_BURN_DAMAGE(O)))
+ if(BP_IS_ROBOTIC(O) && (O.brute_dam || O.burn_dam))
return TRUE
return FALSE
if(L.isSynthetic() && (L.getBruteLoss() || L.getFireLoss()))
@@ -53,12 +53,12 @@
var/mob/living/carbon/human/H = target
for(var/obj/item/organ/external/E in H.organs)
var/obj/item/organ/external/O = E
- if(!BP_IS_ROBOTIC(O) || (!LIMB_GET_BRUTE_DAMAGE(O) && !LIMB_GET_BURN_DAMAGE(O)))
+ if(!BP_IS_ROBOTIC(O) || (!O.brute_dam && !O.burn_dam))
continue
- var/previous_brute = LIMB_GET_BRUTE_DAMAGE(O)
- var/previous_burn = LIMB_GET_BURN_DAMAGE(O)
+ var/previous_brute = O.brute_dam
+ var/previous_burn = O.burn_dam
O.heal_damage(4 * strength, 4 * strength, 0, TRUE)
- if(LIMB_GET_BRUTE_DAMAGE(O) < previous_brute || LIMB_GET_BURN_DAMAGE(O) < previous_burn)
+ if(O.brute_dam < previous_brute || O.burn_dam < previous_burn)
repaired_damage = TRUE
else
if(M.isSynthetic())
diff --git a/code/game/objects/items/stacks/medical.dm b/code/game/objects/items/stacks/medical.dm
index 084d4497fd0..a3afd35476c 100644
--- a/code/game/objects/items/stacks/medical.dm
+++ b/code/game/objects/items/stacks/medical.dm
@@ -53,7 +53,7 @@ Contains:
return 1
if(affecting.status & ORGAN_LIFELIKE)
- if(!(LIMB_GET_BRUTE_DAMAGE(affecting) || LIMB_GET_BURN_DAMAGE(affecting)))
+ if(!(affecting.brute_dam || affecting.burn_dam))
to_chat(user, SPAN_NOTICE("[target_mob] seems healthy, there are no wounds to treat! "))
return 1
diff --git a/code/game/objects/items/tools/tools.dm b/code/game/objects/items/tools/tools.dm
index 14096dd11be..f7886c8a7e1 100644
--- a/code/game/objects/items/tools/tools.dm
+++ b/code/game/objects/items/tools/tools.dm
@@ -445,8 +445,8 @@
to_chat(user, SPAN_WARNING("You need to light the welding tool first!"))
return
- if(LIMB_GET_BRUTE_DAMAGE(S))
- if(LIMB_GET_BRUTE_DAMAGE(S) > ROBOLIMB_SELF_REPAIR_CAP)
+ if(S.brute_dam)
+ if(S.brute_dam > ROBOLIMB_SELF_REPAIR_CAP)
to_chat(user, SPAN_WARNING("The damage is far too severe to patch over externally!"))
return
else
@@ -458,7 +458,7 @@
return ..()
/obj/item/weldingtool/proc/repair_organ(var/mob/living/user, var/mob/living/carbon/human/target, var/obj/item/organ/external/affecting)
- if(!LIMB_GET_BRUTE_DAMAGE(affecting))
+ if(!affecting.brute_dam)
user.visible_message(SPAN_NOTICE("\The [user] finishes repairing the physical damage on \the [target]'s [affecting.name]."))
return
diff --git a/code/game/objects/structures/machinery/body_scanner.dm b/code/game/objects/structures/machinery/body_scanner.dm
index f6d29df970c..dd7f1495dca 100644
--- a/code/game/objects/structures/machinery/body_scanner.dm
+++ b/code/game/objects/structures/machinery/body_scanner.dm
@@ -536,9 +536,9 @@
for(var/obj/item/organ/external/O in H.organs)
var/list/data = list()
data["name"] = capitalize_first_letters(O.name)
- var/burn_damage = get_wound_severity(LIMB_GET_BURN_DAMAGE(O), (O.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)
+ var/burn_damage = get_wound_severity(O.burn_dam, (O.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)
data["burn_damage"] = burn_damage
- var/brute_damage = get_wound_severity(LIMB_GET_BRUTE_DAMAGE(O), (O.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)
+ var/brute_damage = get_wound_severity(O.brute_dam, (O.limb_flags & ORGAN_HEALS_OVERKILL), TRUE)
data["brute_damage"] = brute_damage
var/list/wounds = list()
diff --git a/code/modules/martial_arts/skrell.dm b/code/modules/martial_arts/skrell.dm
index 5b93ad15a36..7eec629c40f 100644
--- a/code/modules/martial_arts/skrell.dm
+++ b/code/modules/martial_arts/skrell.dm
@@ -42,7 +42,7 @@
/datum/martial_art/karak_virul/proc/dislocating_strike(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
A.do_attack_animation(D)
var/obj/item/organ/external/organ = D.get_organ(A.zone_sel.selecting)
- if(!organ || ORGAN_IS_DISLOCATED(organ) || LIMB_GET_DISLOCATED(organ) == -1)
+ if(!organ || ORGAN_IS_DISLOCATED(organ) || organ.dislocated == -1)
return 0
organ.dislocate(1)
A.visible_message(SPAN_WARNING("[A] strikes [D]'s [organ.name] with their closed fist!"))
diff --git a/code/modules/martial_arts/tajara.dm b/code/modules/martial_arts/tajara.dm
index 548888c57de..fb74e9598b0 100644
--- a/code/modules/martial_arts/tajara.dm
+++ b/code/modules/martial_arts/tajara.dm
@@ -68,7 +68,7 @@
A.do_attack_animation(D, ATTACK_EFFECT_CLAW)
var/obj/item/organ/external/organ = D.get_organ(A.zone_sel.selecting)
A.visible_message(SPAN_DANGER("[A] stabs [D]'s [organ.name] with their claws!"))
- D.apply_damage(LIMB_GET_BRUTE_DAMAGE(organ), DAMAGE_BRUTE, organ, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
+ D.apply_damage(organ.brute_dam, DAMAGE_BRUTE, organ, damage_flags = DAMAGE_FLAG_SHARP|DAMAGE_FLAG_EDGE)
return 1
/datum/martial_art/baghrar/harm_act(var/mob/living/carbon/human/A, var/mob/living/carbon/human/D)
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index c7d5d74a574..6c06c8ee14a 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -55,10 +55,10 @@
blinded = 1
set_stat(UNCONSCIOUS)
if(getHalLoss() > 0)
- adjustHalLoss(-0.03)
+ adjustHalLoss(-3)
if(sleeping)
- adjustHalLoss(-0.03)
+ adjustHalLoss(-3)
if (mind)
if(mind.active && client != null)
sleeping = max(sleeping-1, 0)
@@ -66,12 +66,12 @@
set_stat(UNCONSCIOUS)
else if(resting)
if(getHalLoss() > 0)
- adjustHalLoss(-0.03)
+ adjustHalLoss(-3)
else
set_stat(CONSCIOUS)
if(getHalLoss() > 0)
- adjustHalLoss(-0.01)
+ adjustHalLoss(-1)
// Eyes and blindness.
if(!has_eyes())
diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm
index e71e9b131fa..4187ca48a88 100644
--- a/code/modules/mob/living/carbon/carbon.dm
+++ b/code/modules/mob/living/carbon/carbon.dm
@@ -244,8 +244,8 @@
var/painful_check = FALSE
for(var/obj/item/organ/external/org in H.organs)
var/list/status = list()
- var/brutedamage = LIMB_GET_BRUTE_DAMAGE(org)
- var/burndamage = LIMB_GET_BURN_DAMAGE(org)
+ var/brutedamage = org.brute_dam
+ var/burndamage = org.burn_dam
// Basic Anatomy 1: All the obvious stuff
// Damaged and missing limbs
@@ -290,7 +290,7 @@
// Broken limbs
// Regular and arterial bleeding are vague
// Necrotic is vague
- if(LIMB_GET_DISLOCATED(org) == 2)
+ if(org.dislocated == 2)
status += (anatomy >= 2 ? "dislocated" : "hanging oddly")
if(org.status & ORGAN_BROKEN)
status += (anatomy < 3 ? "hurts when touched" : "broken")
diff --git a/code/modules/mob/living/carbon/human/damage_menu.dm b/code/modules/mob/living/carbon/human/damage_menu.dm
index 94b47d50c1f..03ad0221b27 100644
--- a/code/modules/mob/living/carbon/human/damage_menu.dm
+++ b/code/modules/mob/living/carbon/human/damage_menu.dm
@@ -67,12 +67,12 @@
return
switch(params["action"])
if("brute")
- var/damage_dealt = tgui_input_number(usr, "How much brute damage do you want to deal? (Current Brute: [LIMB_GET_BRUTE_DAMAGE(L)] | Current Burn; [LIMB_GET_BURN_DAMAGE(L)])", "Brute Damage")
+ var/damage_dealt = tgui_input_number(usr, "How much brute damage do you want to deal? (Current Brute: [L.brute_dam] | Current Burn; [L.burn_dam])", "Brute Damage")
if(damage_dealt)
L.take_damage(damage_dealt, 0)
log_and_message_admins("used the Damage Menu to deploy deal [damage_dealt] [params["action"]] to [H]'s [params["name"]]", usr, get_turf(H))
if("burn")
- var/damage_dealt = tgui_input_number(usr, "How much burn damage do you want to deal? (Current Brute: [LIMB_GET_BRUTE_DAMAGE(L)] | Current Burn; [LIMB_GET_BURN_DAMAGE(L)])", "Burn Damage")
+ var/damage_dealt = tgui_input_number(usr, "How much burn damage do you want to deal? (Current Brute: [L.brute_dam] | Current Burn; [L.burn_dam])", "Burn Damage")
if(damage_dealt)
L.take_damage(0, damage_dealt)
log_and_message_admins("used the Damage Menu to deploy deal [damage_dealt] [params["action"]] to [H]'s [params["name"]]", usr, get_turf(H))
@@ -85,8 +85,8 @@
L.decrease_germ_level()
log_and_message_admins("used the Damage Menu to decrease the infection level of [H]'s [params["name"]]", usr, get_turf(H))
if("shatter")
- if(LIMB_GET_BRUTE_DAMAGE(L) < L.min_broken_damage * GLOB.config.organ_health_multiplier)
- L.take_damage(LIMB_GET_BRUTE_DAMAGE(L) + ((L.min_broken_damage * GLOB.config.organ_health_multiplier) - LIMB_GET_BRUTE_DAMAGE(L)))
+ if(L.brute_dam < L.min_broken_damage * GLOB.config.organ_health_multiplier)
+ L.take_damage(L.brute_dam + ((L.min_broken_damage * GLOB.config.organ_health_multiplier) - L.brute_dam))
L.fracture()
log_and_message_admins("used the Damage Menu to shatter [H]'s [params["name"]]", usr, get_turf(H))
if("arterial")
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index 60b76b28aaa..76603598123 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -324,7 +324,7 @@
continue
var/thin_covering = (skipbody & body_part) ? TRUE : FALSE
if((temp.status & ORGAN_ASSISTED) && !thin_covering)
- if(!(LIMB_GET_BRUTE_DAMAGE(temp) + LIMB_GET_BURN_DAMAGE(temp)) && !(temp.open))
+ if(!(temp.brute_dam + temp.burn_dam) && !(temp.open))
continue
else
wound_flavor_text["[temp.name]"] = SPAN_WARNING("[get_pronoun("He")] [get_pronoun("has")] [temp.get_wounds_desc()] on [get_pronoun("his")] [temp.name].
")
@@ -339,9 +339,9 @@
is_bleeding["[temp.name]"] = SPAN_DANGER("[get_pronoun("His")] [temp.name] is bleeding")+ "
"
else
wound_flavor_text["[temp.name]"] = ""
- if(LIMB_GET_DISLOCATED(temp) == 2)
+ if(temp.dislocated == 2)
wound_flavor_text["[temp.name]"] += SPAN_WARNING("[get_pronoun("His")] [temp.joint] is dislocated!
")
- if(((temp.status & ORGAN_BROKEN) && LIMB_GET_BRUTE_DAMAGE(temp) > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
+ if(((temp.status & ORGAN_BROKEN) && temp.brute_dam > temp.min_broken_damage) || (temp.status & ORGAN_MUTATED))
wound_flavor_text["[temp.name]"] += SPAN_WARNING("[get_pronoun("His")] [temp.name] is dented and swollen!
")
//Handles the text strings being added to the actual description.
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index 0d3f159d54f..6b165ece3a0 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -1882,7 +1882,7 @@
var/list/limbs = list()
for(var/limb in organs_by_name)
var/obj/item/organ/external/current_limb = organs_by_name[limb]
- if(current_limb && LIMB_GET_DISLOCATED(current_limb) == 2)
+ if(current_limb && current_limb.dislocated == 2)
limbs |= limb
var/choice = tgui_input_list(usr, "Which joint do you wish to relocate?", "Relocate Joint", limbs)
diff --git a/code/modules/mob/living/carbon/human/human_attackhand.dm b/code/modules/mob/living/carbon/human/human_attackhand.dm
index 42bbb419e45..4560ef1e660 100644
--- a/code/modules/mob/living/carbon/human/human_attackhand.dm
+++ b/code/modules/mob/living/carbon/human/human_attackhand.dm
@@ -629,7 +629,7 @@
if(!target_zone)
return 0
var/obj/item/organ/external/organ = get_organ(check_zone(target_zone))
- if(!organ || ORGAN_IS_DISLOCATED(organ) || LIMB_GET_DISLOCATED(organ) == -1)
+ if(!organ || ORGAN_IS_DISLOCATED(organ) || organ.dislocated == -1)
return 0
user.visible_message(SPAN_WARNING("[user] begins to dislocate [src]'s [organ.joint]!"))
diff --git a/code/modules/mob/living/carbon/human/human_damage.dm b/code/modules/mob/living/carbon/human/human_damage.dm
index 4261cc76a95..fa17e459bf8 100644
--- a/code/modules/mob/living/carbon/human/human_damage.dm
+++ b/code/modules/mob/living/carbon/human/human_damage.dm
@@ -72,7 +72,7 @@
/mob/living/carbon/human/getHalLoss()
var/amount = 0
for(var/obj/item/organ/external/E in organs)
- amount += LIMB_GET_PAIN(E)
+ amount += E.get_pain()
return amount
///These procs fetch a cumulative total damage from all organs
@@ -81,7 +81,7 @@
for(var/obj/item/organ/external/O in organs)
if(BP_IS_ROBOTIC(O) && !O.vital)
continue //robot limbs don't count towards shock and crit
- amount += LIMB_GET_BRUTE_DAMAGE(O)
+ amount += O.brute_dam
return amount
/mob/living/carbon/human/getFireLoss()
@@ -89,7 +89,7 @@
for(var/obj/item/organ/external/O in organs)
if(BP_IS_ROBOTIC(O) && !O.vital)
continue //robot limbs don't count towards shock and crit
- amount += LIMB_GET_BURN_DAMAGE(O)
+ amount += O.burn_dam
return amount
/mob/living/carbon/human/adjustBruteLoss(var/amount)
@@ -133,7 +133,7 @@
/mob/living/carbon/human/getCloneLoss()
var/amount = 0
for(var/obj/item/organ/external/E in organs)
- amount += LIMB_GET_GENETIC_DAMAGE(E)
+ amount += E.get_genetic_damage()
return amount
/mob/living/carbon/human/setCloneLoss(var/amount)
@@ -286,7 +286,7 @@
continue
if(heal)
- if(LIMB_GET_PAIN(E) > 0)
+ if(E.get_pain() > 0)
amount -= E.remove_pain(amount)
else
amount -= E.add_pain(amount)
@@ -309,7 +309,7 @@
for(var/obj/item/organ/external/O in organs)
if(!prosthetic && BP_IS_ROBOTIC(O))
continue
- if((brute && LIMB_GET_BRUTE_DAMAGE(O)) || (burn && LIMB_GET_BURN_DAMAGE(O)))
+ if((brute && O.brute_dam) || (burn && O.burn_dam))
parts += O
return parts
@@ -360,13 +360,13 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
while(parts.len && (brute>0 || burn>0) )
var/obj/item/organ/external/picked = pick(parts)
- var/brute_was = LIMB_GET_BRUTE_DAMAGE(picked)
- var/burn_was = LIMB_GET_BURN_DAMAGE(picked)
+ var/brute_was = picked.brute_dam
+ var/burn_was = picked.burn_dam
update |= picked.heal_damage(brute,burn)
- brute -= (brute_was - LIMB_GET_BRUTE_DAMAGE(picked))
- burn -= (burn_was - LIMB_GET_BURN_DAMAGE(picked))
+ brute -= (brute_was-picked.brute_dam)
+ burn -= (burn_was-picked.burn_dam)
parts -= picked
updatehealth()
@@ -383,12 +383,12 @@ In most cases it makes more sense to use apply_damage() instead! And make sure t
while(parts.len && (brute>0 || burn>0) )
var/obj/item/organ/external/picked = pick(parts)
- var/brute_was = LIMB_GET_BRUTE_DAMAGE(picked)
- var/burn_was = LIMB_GET_BURN_DAMAGE(picked)
+ var/brute_was = picked.brute_dam
+ var/burn_was = picked.burn_dam
update = picked.take_damage(brute, burn, damage_flags, used_weapon) ? TRUE : FALSE
- brute -= (LIMB_GET_BRUTE_DAMAGE(picked) - brute_was)
- burn -= (LIMB_GET_BURN_DAMAGE(picked) - burn_was)
+ brute -= (picked.brute_dam - brute_was)
+ burn -= (picked.burn_dam - burn_was)
parts -= picked
updatehealth()
diff --git a/code/modules/mob/living/carbon/human/human_defense.dm b/code/modules/mob/living/carbon/human/human_defense.dm
index 17d65ec78d0..5ed57002b92 100644
--- a/code/modules/mob/living/carbon/human/human_defense.dm
+++ b/code/modules/mob/living/carbon/human/human_defense.dm
@@ -317,7 +317,7 @@ emp_act
return TRUE
/mob/living/carbon/human/proc/attack_joint(var/obj/item/organ/external/organ, var/obj/item/W, var/blocked)
- if(!organ || (LIMB_GET_DISLOCATED(organ) == 2) || (LIMB_GET_DISLOCATED(organ) == -1))
+ if(!organ || (organ.dislocated == 2) || (organ.dislocated == -1))
return 0
var/blocked_ratio = get_blocked_ratio(organ.limb_name, W.damtype, W.damage_flags(), W.armor_penetration, W.force)
diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm
index b9254c9d8e9..11d9d13c3eb 100644
--- a/code/modules/mob/living/carbon/human/human_organs.dm
+++ b/code/modules/mob/living/carbon/human/human_organs.dm
@@ -8,7 +8,7 @@
var/damage_this_tick = getToxLoss()
var/arterial_check = 0
for(var/obj/item/organ/external/O in organs)
- damage_this_tick += LIMB_GET_BURN_DAMAGE(O) + LIMB_GET_BRUTE_DAMAGE(O)
+ damage_this_tick += O.burn_dam + O.brute_dam
if(O.status & ORGAN_ARTERY_CUT)
arterial_check = 1
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index aa92244cb62..3ccd396e42e 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -843,7 +843,7 @@
sleeping_msg_debounce = TRUE
to_chat(src, EXAMINE_BLOCK_BLUE(SPAN_NOTICE(FONT_LARGE("You are now unconscious. You will not remember anything you see, hear, or feel happening around you until you regain consciousness."))))
- adjustHalLoss(-0.03)
+ adjustHalLoss(-3)
if (species.tail)
animate_tail_reset()
if(prob(2) && is_asystole() && isSynthetic())
@@ -883,11 +883,11 @@
dizziness = max(0, dizziness - 15)
jitteriness = max(0, jitteriness - 15)
drowsiness = max(0, drowsiness - 5)
- adjustHalLoss(-0.03)
+ adjustHalLoss(-3)
else
dizziness = max(0, dizziness - 3)
jitteriness = max(0, jitteriness - 3)
- adjustHalLoss(-0.01)
+ adjustHalLoss(-1)
//Other
handle_statuses()
@@ -1013,7 +1013,7 @@
// Collect and apply the images all at once to avoid appearance churn.
var/list/health_images = list()
for(var/obj/item/organ/external/E in organs)
- if(no_damage && (LIMB_GET_BRUTE_DAMAGE(E) || LIMB_GET_BURN_DAMAGE(E)))
+ if(no_damage && (E.brute_dam || E.burn_dam))
no_damage = 0
health_images += E.get_damage_hud_image()
diff --git a/code/modules/mob/living/carbon/human/species/station/human/human.dm b/code/modules/mob/living/carbon/human/species/station/human/human.dm
index e0d9f4d0207..c8813fc7be7 100644
--- a/code/modules/mob/living/carbon/human/species/station/human/human.dm
+++ b/code/modules/mob/living/carbon/human/species/station/human/human.dm
@@ -95,7 +95,7 @@
H.custom_emote(VISIBLE_MESSAGE, "clutches [H.get_pronoun("his")] [damaged_organ.name], trying to stop the blood.")
else if(damaged_organ.status & ORGAN_BROKEN)
H.custom_emote(VISIBLE_MESSAGE, "holds [H.get_pronoun("his")] [damaged_organ.name] carefully.")
- else if(LIMB_GET_BURN_DAMAGE(damaged_organ) > LIMB_GET_BRUTE_DAMAGE(damaged_organ) && damaged_organ.organ_tag != BP_HEAD)
+ else if(damaged_organ.burn_dam > damaged_organ.brute_dam && damaged_organ.organ_tag != BP_HEAD)
H.custom_emote(VISIBLE_MESSAGE, "blows on [H.get_pronoun("his")] [damaged_organ.name] carefully.")
else
H.custom_emote(VISIBLE_MESSAGE, "rubs [H.get_pronoun("his")] [damaged_organ.name] carefully.")
diff --git a/code/modules/mob/living/silicon/robot/analyzer.dm b/code/modules/mob/living/silicon/robot/analyzer.dm
index 6625a5dacf6..8c35ef5c634 100644
--- a/code/modules/mob/living/silicon/robot/analyzer.dm
+++ b/code/modules/mob/living/silicon/robot/analyzer.dm
@@ -84,7 +84,7 @@
if(!(E.status & (ORGAN_ROBOT || ORGAN_ASSISTED)))
continue
organ_found = TRUE
- to_chat(user, "[E.name]: [get_robot_severity(LIMB_GET_BRUTE_DAMAGE(E))] [get_robot_severity(LIMB_GET_BURN_DAMAGE(E))]")
+ to_chat(user, "[E.name]: [get_robot_severity(E.brute_dam)] [get_robot_severity(E.burn_dam)]")
if(!organ_found)
to_chat(user, SPAN_NOTICE("No prosthetics located."))
to_chat(user, "