Another set of brainmed adjustment & miscellaneous things. (#11354)

This commit is contained in:
Matt Atlas
2021-03-05 23:35:58 +01:00
committed by GitHub
parent 607fe6680f
commit 80be3d88e1
10 changed files with 87 additions and 26 deletions
+4 -1
View File
@@ -13,6 +13,7 @@
var/vital //Lose a vital limb, die immediately.
var/rejecting // Is this organ already being rejected?
var/is_augment = FALSE
var/death_time
//Organ damage stats.
var/damage = 0 // amount of damage to the organ
@@ -128,6 +129,7 @@
return
damage = max_damage
status |= ORGAN_DEAD
death_time = world.time
STOP_PROCESSING(SSprocessing, src)
if(owner && vital)
owner.death()
@@ -141,8 +143,9 @@
/obj/item/organ/proc/can_feel_pain()
return (!BP_IS_ROBOTIC(src) && (!species || !(species.flags & NO_PAIN)))
#define ORGAN_RECOVERY_THRESHOLD (5 MINUTES)
/obj/item/organ/proc/can_recover()
return max_damage > 0
return (max_damage > 0) && !(status & ORGAN_DEAD) || death_time >= world.time - ORGAN_RECOVERY_THRESHOLD
/obj/item/organ/process()
if(loc != owner)