Refactor Get Pain (#22847)

This PR refactors get_pain() to be essentially performance free.
Previously it was a member of the top 5 most expensive procs.
I had to touch a metric shitton of files to make this happen. Notably
get_pain() was also 1/3rd of the entire processing cost for Mobs - Life
This commit is contained in:
VMSolidus
2026-08-19 22:50:40 +00:00
committed by GitHub
parent db385f9710
commit 40e88e0d2d
35 changed files with 212 additions and 119 deletions
@@ -87,8 +87,8 @@
data["robolimb_self_repair_cap"] = ROBOLIMB_SELF_REPAIR_CAP
data["limbs"] = list()
for(var/obj/item/organ/external/limb in ipc.organs)
if(limb.brute_dam || limb.burn_dam)
data["limbs"] += list(list("name" = limb.name, "brute_damage" = limb.brute_dam, "burn_damage" = limb.burn_dam, "max_damage" = limb.max_damage))
if(LIMB_GET_BRUTE_DAMAGE(limb) || LIMB_GET_BURN_DAMAGE(limb))
data["limbs"] += list(list("name" = limb.name, "brute_damage" = LIMB_GET_BRUTE_DAMAGE(limb), "burn_damage" = LIMB_GET_BURN_DAMAGE(limb), "max_damage" = limb.max_damage))
var/obj/item/organ/internal/machine/power_core/C = ipc.internal_organs_by_name[BP_CELL]
if(C)