Requested changes

- Creates "has_organic_damage" proc and updates cryopod and medibot to
use it.
- For non-human mobs, this proc returns 1 for damaged mobs and 0 for
full-health mobs.
- For human mobs, this proc returns 1 for mobs with damage to organic
parts, and 0 for mobs that are either full health, or have only got
damage to robotic limbs.
This commit is contained in:
Kyep
2016-12-05 14:21:32 -08:00
parent 1980ecf62a
commit d5e3e14dc9
4 changed files with 17 additions and 8 deletions
@@ -201,3 +201,12 @@ I use this to standardize shadowling dethrall code
return null
var/obj/item/organ/internal/O = get_int_organ(organ_name)
return O.parent_organ
/mob/living/carbon/human/has_organic_damage()
var/odmg = 0
for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_ROBOT)
odmg += O.brute_dam
odmg += O.burn_dam
return (health < (100 - odmg))
+4
View File
@@ -287,6 +287,10 @@
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/has_organic_damage()
return (maxHealth - health)
/mob/living/proc/restore_all_organs()
return
@@ -368,6 +368,9 @@
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
declare(C)
if(!C.has_organic_damage())
return 0
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
if((reagent_glass) && (use_beaker) && ((C.getBruteLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getOxyLoss() >= (heal_threshold + 15))))
for(var/datum/reagent/R in reagent_glass.reagents.reagent_list)