mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-20 19:44:09 +01:00
Health and Stack Fixes
This commit is contained in:
@@ -213,7 +213,7 @@
|
||||
distance = 1
|
||||
if (src.stat)
|
||||
msg += "<span class='warning'>[t_He] [t_is]n't responding to anything around [t_him] and seems to be asleep.</span>\n"
|
||||
if((stat == 2 || src.health < config.health_threshold_crit) && distance <= 3)
|
||||
if((stat == 2 || src.health <= config.health_threshold_crit) && distance <= 3)
|
||||
msg += "<span class='warning'>[t_He] does not appear to be breathing.</span>\n"
|
||||
if(istype(usr, /mob/living/carbon/human) && !usr.stat && distance <= 1)
|
||||
for(var/mob/O in viewers(usr.loc, null))
|
||||
|
||||
@@ -1680,3 +1680,6 @@
|
||||
|
||||
/mob/living/carbon/human/canBeHandcuffed()
|
||||
return 1
|
||||
|
||||
/mob/living/carbon/human/InCritical()
|
||||
return (health <= config.health_threshold_crit && stat == UNCONSCIOUS)
|
||||
@@ -735,7 +735,7 @@ It can still be worn/put on as normal.
|
||||
W.layer = initial(W.layer)
|
||||
W.add_fingerprint(source)
|
||||
if("CPR")
|
||||
if ((target.health > config.health_threshold_dead && target.health < config.health_threshold_crit))
|
||||
if ((target.health > config.health_threshold_dead && target.health <= config.health_threshold_crit))
|
||||
var/suff = min(target.getOxyLoss(), 7)
|
||||
target.adjustOxyLoss(-suff)
|
||||
target.updatehealth()
|
||||
|
||||
@@ -397,7 +397,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
var/datum/gas_mixture/breath
|
||||
|
||||
// HACK NEED CHANGING LATER
|
||||
if(health < config.health_threshold_crit)
|
||||
if(health <= config.health_threshold_crit)
|
||||
losebreath++
|
||||
|
||||
if(losebreath>0) //Suffocating so do not take a breath
|
||||
@@ -1051,7 +1051,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
analgesic = max(0, analgesic - 1)
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit > health) )
|
||||
if( (getOxyLoss() > 50) || (config.health_threshold_crit >= health) )
|
||||
Paralyse(3)
|
||||
|
||||
/* Done by handle_breath()
|
||||
@@ -1638,7 +1638,7 @@ var/global/list/brutefireloss_overlays = list("1" = image("icon" = 'icons/mob/sc
|
||||
if(status_flags & GODMODE) return 0 //godmode
|
||||
if(analgesic || (species && species.flags & NO_PAIN)) return // analgesic avoids all traumatic shock temporarily
|
||||
|
||||
if(health < 0)// health 0 makes you immediately collapse
|
||||
if(health <= config.health_threshold_softcrit)// health 0 makes you immediately collapse
|
||||
shock_stage = max(shock_stage, 61)
|
||||
|
||||
if(traumatic_shock >= 100)
|
||||
|
||||
@@ -203,7 +203,7 @@
|
||||
death()
|
||||
return
|
||||
|
||||
else if(src.health < config.health_threshold_crit)
|
||||
else if(src.health <= config.health_threshold_crit)
|
||||
|
||||
if(!src.reagents.has_reagent("inaprovaline"))
|
||||
src.adjustOxyLoss(10)
|
||||
|
||||
@@ -499,7 +499,7 @@
|
||||
return 1
|
||||
|
||||
//UNCONSCIOUS. NO-ONE IS HOME
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit > health) )
|
||||
if( (getOxyLoss() > 25) || (config.health_threshold_crit >= health) )
|
||||
if( health <= 20 && prob(1) )
|
||||
spawn(0)
|
||||
emote("gasp")
|
||||
|
||||
@@ -23,11 +23,15 @@
|
||||
*/
|
||||
/mob/living/verb/succumb()
|
||||
set hidden = 1
|
||||
if ((src.health < 0 && src.health > -95.0))
|
||||
src.adjustOxyLoss(src.health + 200)
|
||||
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
|
||||
src << "\blue You have given up life and succumbed to death."
|
||||
if (InCritical())
|
||||
src.attack_log += "[src] has ["succumbed to death"] with [round(health, 0.1)] points of health!"
|
||||
src.adjustOxyLoss(src.health - config.health_threshold_dead)
|
||||
updatehealth()
|
||||
src << "<span class='notice'>You have given up life and succumbed to death.</span>"
|
||||
death()
|
||||
|
||||
/mob/living/proc/InCritical()
|
||||
return (src.health < 0 && src.health > -95.0 && stat == UNCONSCIOUS)
|
||||
|
||||
/mob/living/proc/updatehealth()
|
||||
if(status_flags & GODMODE)
|
||||
|
||||
@@ -757,12 +757,13 @@ var/list/slot_equipment_priority = list( \
|
||||
/mob/proc/pull_damage()
|
||||
if(ishuman(src))
|
||||
var/mob/living/carbon/human/H = src
|
||||
if(H.health - H.halloss <= config.health_threshold_crit)
|
||||
if(H.health - H.halloss <= config.health_threshold_softcrit)
|
||||
for(var/name in H.organs_by_name)
|
||||
var/datum/organ/external/e = H.organs_by_name[name]
|
||||
if((H.lying) && ((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
|
||||
return 1
|
||||
break
|
||||
if(H.lying)
|
||||
if(((e.status & ORGAN_BROKEN && !(e.status & ORGAN_SPLINTED)) || e.status & ORGAN_BLEEDING) && (H.getBruteLoss() + H.getFireLoss() >= 100))
|
||||
return 1
|
||||
break
|
||||
return 0
|
||||
|
||||
/mob/MouseDrop(mob/M as mob)
|
||||
@@ -902,7 +903,7 @@ var/list/slot_equipment_priority = list( \
|
||||
|
||||
process = processScheduler.getProcess("obj")
|
||||
stat(null, "OBJ([processing_objects.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
|
||||
process = processScheduler.getProcess("bot")
|
||||
stat(null, "BOT([aibots.len])\t - #[process.getTicks()]\t - [process.getLastRunTime()]")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user