mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-07-19 20:06:28 +01:00
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:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user