Fixed a rounding issue that made it so that organs would sometimes retain very small, unhealable amounts of damage when surgically fixed. (#22039)

Providing a damage value between 0 and 1 to the surgical fixing proc
would make it get rounded, and thus heal 0 damage.

Co-authored-by: Matt Atlas <liermattia@gmail.com>
This commit is contained in:
Matt Atlas
2026-03-14 20:48:45 +01:00
committed by GitHub
parent 8d666e9cac
commit ce8796c12f
2 changed files with 59 additions and 1 deletions
+1 -1
View File
@@ -266,7 +266,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
/obj/item/organ/proc/heal_damage(amount)
if(can_recover())
damage = between(0, damage - round(amount, 0.1), max_damage)
damage = between(0, damage - amount, max_damage)
/obj/item/organ/proc/is_broken()
return (damage >= min_broken_damage || (status & ORGAN_CUT_AWAY) || (status & ORGAN_BROKEN))