mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-25 14:08:31 +01:00
Fix runtime caused by organs without owner
#59311 added a check to prevent unconscious people from receiving organ damage messages. However this causes runtimes for organs lying around without an owner: This checks if owner is not null before trying to get stats (?. can't be used because null <= SOFT_CRIT would be true)
This commit is contained in:
@@ -172,7 +172,7 @@
|
||||
damage = clamp(damage + damage_amount, 0, maximum)
|
||||
var/mess = check_damage_thresholds(owner)
|
||||
prev_damage = damage
|
||||
if(mess && owner.stat <= SOFT_CRIT)
|
||||
if(mess && owner && owner.stat <= SOFT_CRIT)
|
||||
to_chat(owner, mess)
|
||||
|
||||
///SETS an organ's damage to the amount "damage_amount", and in doing so clears or sets the failing flag, good for when you have an effect that should fix an organ if broken
|
||||
|
||||
Reference in New Issue
Block a user