mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-26 14:39:58 +01:00
[MIRROR] Fix organ damage being uncapped [MDB IGNORE] (#22161)
* Fix organ damage being uncapped * Update damage_procs.dm --------- Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com> Co-authored-by: Bloop <vinylspiders@gmail.com>
This commit is contained in:
co-authored by
MrMelbert
Bloop
parent
3fd2f8134b
commit
b262fa48ce
@@ -240,6 +240,7 @@ INITIALIZE_IMMEDIATE(/obj/item/organ)
|
||||
/obj/item/organ/proc/apply_organ_damage(damage_amount, maximum = maxHealth, required_organ_flag = NONE) //use for damaging effects
|
||||
if(!damage_amount) //Micro-optimization.
|
||||
return
|
||||
maximum = clamp(maximum, 0, maxHealth) // the logical max is, our max
|
||||
if(maximum < damage)
|
||||
return
|
||||
if(required_organ_flag && !(organ_flags & required_organ_flag))
|
||||
|
||||
Reference in New Issue
Block a user