diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index 85a350d8571..dd2b623ad1a 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -236,7 +236,7 @@ var/amount = max(0.15, 1) M.adjustOxyLoss(-amount) else - M.oxyloss = 0 + M.adjustOxyLoss(-12) M.updatehealth() M.AdjustParalysis(-4) M.AdjustWeakened(-4) diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 9de662a62d6..93069bf64cb 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -25,7 +25,7 @@ suiciding = 1 //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while viewers(src) << "\red [src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide." - oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss()) + adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() /mob/living/carbon/brain/verb/suicide() @@ -48,7 +48,7 @@ if(confirm == "Yes") suiciding = 1 viewers(loc) << "\red [src]'s brain is growing dull and lifeless. It looks like it's trying to commit suicide. Somehow." - oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss()) + adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() spawn(200) suiciding = 0 @@ -74,7 +74,7 @@ suiciding = 1 //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while viewers(src) << "\red [src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide." - oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss()) + adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() /mob/living/silicon/ai/verb/suicide() @@ -94,7 +94,7 @@ suiciding = 1 viewers(src) << "\red [src] is powering down. It looks like \he's trying to commit suicide." //put em at -175 - oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss()) + adjustOxyLoss(max(175 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() /mob/living/silicon/robot/verb/suicide() @@ -114,7 +114,7 @@ suiciding = 1 viewers(src) << "\red [src] is powering down. It looks like \he's trying to commit suicide." //put em at -175 - oxyloss = max(475 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss()) + adjustOxyLoss(max(475 - getToxLoss() - getFireLoss() - getBruteLoss() - getOxyLoss(), 0)) updatehealth() /mob/living/silicon/pai/verb/suicide() @@ -149,7 +149,7 @@ suiciding = 1 viewers(src) << "\red [src] is thrashing wildly! It looks like \he's trying to commit suicide." //put em at -175 - oxyloss = max(100 - getFireLoss() - getBruteLoss(), getOxyLoss()) + adjustOxyLoss(max(100 - getFireLoss() - getBruteLoss() - getOxyLoss())) updatehealth() diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 7b020d9456b..f55e08e3e00 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -422,7 +422,7 @@ datum M:drowsyness = max(M:drowsyness, 20) if(25 to INFINITY) M.sleeping = 1 - M.oxyloss = 0 + M.adjustOxyLoss(-M.getOxyLoss()) M.SetWeakened(0) M.SetStunned(0) M.SetParalysis(0) @@ -1206,7 +1206,7 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom - M:oxyloss = 0 + M.adjustOxyLoss(-M.getOxyLoss()) if(holder.has_reagent("lexorin")) holder.remove_reagent("lexorin", 2) ..() diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm index acf23ee4ef0..cb94c28359f 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/hunter.dm @@ -92,7 +92,7 @@ if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++ + if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1) if(src.stat != 2) src.stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm index ec631e76990..e5aac55ed0c 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/caste/sentinel.dm @@ -93,7 +93,7 @@ if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++ + if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1) if(src.stat != 2) src.stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 81785a9c13a..5dd33441b70 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -412,7 +412,7 @@ if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++ + if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1) if(src.stat != 2) src.stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/alien/humanoid/queen.dm b/code/modules/mob/living/carbon/alien/humanoid/queen.dm index 6df3e018bd3..1b03a997a92 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/queen.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/queen.dm @@ -94,7 +94,7 @@ if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++ + if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1) if(src.stat != 2) src.stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 7d9e39336d2..71b0d5b3d13 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -337,7 +337,7 @@ if(health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!rejuv) oxyloss++ - if(!reagents.has_reagent("inaprovaline")) oxyloss++ + if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1) if(stat != 2) stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm index 67ed50b1702..cc1db1a797c 100644 --- a/code/modules/mob/living/carbon/brain/life.dm +++ b/code/modules/mob/living/carbon/brain/life.dm @@ -171,7 +171,7 @@ if(health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!rejuv) oxyloss++ - if(!reagents.has_reagent("inaprovaline")) oxyloss++ + if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1) if(stat != 2) stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index 1d2ae102207..bd47c91ae4b 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -1886,7 +1886,7 @@ It can still be worn/put on as normal. if ((target.health >= -99.0 && target.health < 0)) target.cpr_time = world.time var/suff = min(target.getOxyLoss(), 7) - target.oxyloss -= suff + target.adjustOxyLoss(-suff) target.updatehealth() for(var/mob/O in viewers(source, null)) O.show_message(text("\red [] performs CPR on []!", source, target), 1) diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index 9669d97642c..4090131872f 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -305,7 +305,7 @@ if(!breath || (breath.total_moles() == 0)) if(reagents.has_reagent("inaprovaline")) return - oxyloss += HUMAN_MAX_OXYLOSS + adjustOxyLoss(HUMAN_MAX_OXYLOSS) oxygen_alert = max(oxygen_alert, 1) @@ -333,10 +333,10 @@ spawn(0) emote("gasp") if(O2_pp > 0) var/ratio = safe_oxygen_min/O2_pp - oxyloss += min(5*ratio, HUMAN_MAX_OXYLOSS) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!) + adjustOxyLoss(min(5*ratio, HUMAN_MAX_OXYLOSS)) // Don't fuck them up too fast (space only does HUMAN_MAX_OXYLOSS after all!) oxygen_used = breath.oxygen*ratio/6 else - oxyloss += HUMAN_MAX_OXYLOSS + adjustOxyLoss(HUMAN_MAX_OXYLOSS) oxygen_alert = max(oxygen_alert, 1) /*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose) spawn(0) emote("cough") @@ -345,7 +345,7 @@ oxygen_used = breath.oxygen*ratio/6 oxygen_alert = max(oxygen_alert, 1)*/ else // We're in safe limits - oxyloss = max(getOxyLoss()-5, 0) + adjustOxyLoss(max(getOxyLoss()-5, 0)) oxygen_used = breath.oxygen/6 oxygen_alert = 0 @@ -357,9 +357,9 @@ co2overloadtime = world.time else if(world.time - co2overloadtime > 120) Paralyse(3) - oxyloss += 3 // Lets hurt em a little, let them know we mean business + adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good! - oxyloss += 8 + adjustOxyLoss(8) if(prob(20)) // Lets give them some chance to know somethings not right though I guess. spawn(0) emote("cough") @@ -604,14 +604,9 @@ if(nutrition < 500) //so they can't store nutrition to survive without light forever nutrition += light_amount if(light_amount > 0) //if there's enough light, heal - if(getFireLoss()) - heal_overall_damage(0,1) - if(getBruteLoss()) - heal_overall_damage(1,0) + heal_overall_damage(1,1) adjustToxLoss(-1) - - if(getOxyLoss()) - oxyloss-- + adjustOxyLoss(-1) if(overeatduration > 500 && !(mutations & FAT)) src << "\red You suddenly feel blubbery!" @@ -677,7 +672,7 @@ if(health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!rejuv) oxyloss++ - if(!reagents.has_reagent("inaprovaline")) oxyloss++ + if(!reagents.has_reagent("inaprovaline")) adjustOxyLoss(1) if(stat != 2) stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/carbon/metroid/life.dm b/code/modules/mob/living/carbon/metroid/life.dm index e69e343ad8a..441db3f4970 100644 --- a/code/modules/mob/living/carbon/metroid/life.dm +++ b/code/modules/mob/living/carbon/metroid/life.dm @@ -409,7 +409,7 @@ // if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss+=10 + if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(10) if(src.stat != DEAD) src.stat = UNCONSCIOUS diff --git a/code/modules/mob/living/carbon/monkey/life.dm b/code/modules/mob/living/carbon/monkey/life.dm index 1b8330d45d6..fc5040a9319 100644 --- a/code/modules/mob/living/carbon/monkey/life.dm +++ b/code/modules/mob/living/carbon/monkey/life.dm @@ -254,7 +254,7 @@ return if(!breath || (breath.total_moles() == 0)) - oxyloss += 7 + adjustOxyLoss(7) oxygen_alert = max(oxygen_alert, 1) @@ -282,7 +282,7 @@ if (O2_pp == 0) O2_pp = 0.01 var/ratio = safe_oxygen_min/O2_pp - oxyloss += min(5*ratio, 7) // Don't fuck them up too fast (space only does 7 after all!) + adjustOxyLoss(min(5*ratio, 7)) // Don't fuck them up too fast (space only does 7 after all!) oxygen_used = breath.oxygen*ratio/6 oxygen_alert = max(oxygen_alert, 1) /*else if (O2_pp > safe_oxygen_max) // Too much oxygen (commented this out for now, I'll deal with pressure damage elsewhere I suppose) @@ -292,7 +292,7 @@ oxygen_used = breath.oxygen*ratio/6 oxygen_alert = max(oxygen_alert, 1)*/ else // We're in safe limits - oxyloss = max(getOxyLoss()-5, 0) + adjustOxyLoss(-5) oxygen_used = breath.oxygen/6 oxygen_alert = 0 @@ -304,9 +304,9 @@ co2overloadtime = world.time else if(world.time - co2overloadtime > 120) Paralyse(3) - oxyloss += 3 // Lets hurt em a little, let them know we mean business + adjustOxyLoss(3) // Lets hurt em a little, let them know we mean business if(world.time - co2overloadtime > 300) // They've been in here 30s now, lets start to kill them for their own good! - oxyloss += 8 + adjustOxyLoss(8) if(prob(20)) // Lets give them some chance to know somethings not right though I guess. spawn(0) emote("cough") @@ -418,7 +418,7 @@ if(src.health <= 20 && prob(1)) spawn(0) emote("gasp") //if(!src.rejuv) src.oxyloss++ - if(!src.reagents.has_reagent("inaprovaline")) src.oxyloss++ + if(!src.reagents.has_reagent("inaprovaline")) src.adjustOxyLoss(1) if(src.stat != 2) src.stat = 1 Paralyse(5) diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 02360e44401..2c64b511dbe 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -1,7 +1,7 @@ /mob/living/verb/succumb() set hidden = 1 if ((src.health < 0 && src.health > -95.0)) - src.oxyloss += src.health + 200 + 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."