[MIRROR] Proper MaxHealth checks and Crit Point (#10881)

Co-authored-by: Cameron Lennox <killer65311@gmail.com>
This commit is contained in:
CHOMPStation2StaffMirrorBot
2025-05-16 00:25:21 -07:00
committed by GitHub
parent 901dc552fc
commit 4ce45f8cc4
46 changed files with 92 additions and 94 deletions

View File

@@ -97,7 +97,7 @@
H.dna.digitigrade = R.dna.digitigrade // ensure cloned DNA is set appropriately from record??? for some reason it doesn't get set right despite the override to datum/dna/Clone()
//Apply damage
H.adjustCloneLoss((H.getMaxHealth() - CONFIG_GET(number/health_threshold_dead))*-0.75)
H.adjustCloneLoss((H.getMaxHealth() - (H.getMaxHealth()))*-0.75)
H.Paralyse(4)
H.updatehealth()
@@ -181,7 +181,7 @@
use_power(7500) //This might need tweaking.
return
else if(((occupant.health == occupant.maxHealth)) && (!eject_wait))
else if(((occupant.health == occupant.getMaxHealth())) && (!eject_wait))
playsound(src, 'sound/machines/ding.ogg', 50, 1)
audible_message("\The [src] signals that the growing process is complete.", runemessage = "ding")
connected_message("Growing Process Complete.")
@@ -200,7 +200,7 @@
/obj/machinery/clonepod/transhuman/get_completion()
if(occupant)
return 100 * ((occupant.health + abs(CONFIG_GET(number/health_threshold_dead))) / (occupant.maxHealth + abs(CONFIG_GET(number/health_threshold_dead))))
return 100 * ((occupant.health + (occupant.getMaxHealth()))) / (occupant.getMaxHealth() + abs(occupant.getMaxHealth()))
return 0
/obj/machinery/clonepod/transhuman/examine(mob/user, infix, suffix)
@@ -517,7 +517,7 @@
if(occupant)
data["name"] = occupant.name
data["health"] = occupant.health
data["maxHealth"] = occupant.maxHealth
data["maxHealth"] = occupant.getMaxHealth()
data["stat"] = occupant.stat
data["mindStatus"] = !!occupant.mind
data["mindName"] = occupant.mind?.name