diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index a04e6a03003..b168dc21bc5 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -234,7 +234,7 @@ if (M.health > 0) if (M.getOxyLoss() >= 10) var/amount = max(0.15, 1) - M.oxyloss -= amount + M.adjustOxyLoss(-amount) else M.oxyloss = 0 M.updatehealth() diff --git a/code/game/machinery/computer/aifixer.dm b/code/game/machinery/computer/aifixer.dm index 07504bb65ed..5ab00165803 100644 --- a/code/game/machinery/computer/aifixer.dm +++ b/code/game/machinery/computer/aifixer.dm @@ -122,10 +122,10 @@ src.active = 1 src.overlays += image('computer.dmi', "ai-fixer-on") while (src.occupant.health < 100) - src.occupant.oxyloss = max (src.occupant.getOxyLoss()-1, 0) + src.occupant.adjustOxyLoss(-1) src.occupant.adjustFireLoss(-1) src.occupant.adjustToxLoss(-1) - src.occupant.bruteloss = max (src.occupant.getBruteLoss()-1, 0) + src.occupant.adjustBruteLoss(-1) src.occupant.updatehealth() if (src.occupant.health >= 0 && src.occupant.stat == 2) src.occupant.stat = 0 diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index b54a50b32d6..078d7b5d120 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -600,7 +600,7 @@ About the new airlock wires panel: if (ishuman(user) && prob(40) && src.density) var/mob/living/carbon/human/H = user - if(H.brainloss >= 60) + if(H.getBrainLoss() >= 60) playsound(src.loc, 'bang.ogg', 25, 1) if(!istype(H.head, /obj/item/clothing/head/helmet)) for(var/mob/M in viewers(src, null)) diff --git a/code/game/machinery/doors/airlock_electronics.dm b/code/game/machinery/doors/airlock_electronics.dm index e18b056ca39..11a65dc47dd 100644 --- a/code/game/machinery/doors/airlock_electronics.dm +++ b/code/game/machinery/doors/airlock_electronics.dm @@ -18,7 +18,7 @@ return ..(user) var/mob/living/carbon/human/H = user - if(H.brainloss >= 60) + if(H.getBrainLoss() >= 60) return var/t1 = text("Access control
\n") diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index 1f68a715d82..9bb05f46583 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -458,11 +458,11 @@ /* for(var/mob/M as mob in src.loc) //does not work for some reason. if(istype(M,/mob/living/carbon)) - M.bruteloss += 100 + M.adjustBruteLoss(100) M.updatehealth() M << "\red You feel as the very atoms of your body divide!" else - M.bruteloss += 50 + M.adjustBruteLoss(50) M.updatehealth() M << "\red Strong energy field detected. Damage from field dampened." */ diff --git a/code/game/magic/cultist/ritual.dm b/code/game/magic/cultist/ritual.dm index ec52d6823c3..d9d31643ef6 100644 --- a/code/game/magic/cultist/ritual.dm +++ b/code/game/magic/cultist/ritual.dm @@ -141,7 +141,7 @@ var/engwords = list("travel", "blood", "join", "hell", "destroy", "technology", if(istype(user.wear_mask, /obj/item/clothing/mask/muzzle) || user.ear_deaf) user << "You need to be able to both speak and hear to use runes." return - if(!word1 || !word2 || !word3 || prob(usr.brainloss)) + if(!word1 || !word2 || !word3 || prob(usr.getBrainLoss())) return fizzle() // if(!src.visibility) // src.visibility=1 diff --git a/code/game/mecha/combat/combat.dm b/code/game/mecha/combat/combat.dm index f1a36a3800d..53d0362cfd9 100644 --- a/code/game/mecha/combat/combat.dm +++ b/code/game/mecha/combat/combat.dm @@ -129,7 +129,7 @@ if(istype(target, /mob)) var/mob/M = target M.make_dizzy(3) - M.bruteloss += 1 + M.adjustBruteLoss(1) M.updatehealth() for (var/mob/V in viewers(src)) V.show_message("[src.name] shakes [M] like a rag doll.") diff --git a/code/game/mecha/equipment/tools/tools.dm b/code/game/mecha/equipment/tools/tools.dm index 65f6a29f0ed..74ff340b96f 100644 --- a/code/game/mecha/equipment/tools/tools.dm +++ b/code/game/mecha/equipment/tools/tools.dm @@ -50,7 +50,7 @@ if(M.stat>1) return if(chassis.occupant.a_intent == "hurt") M.take_overall_damage(dam_force) - M.oxyloss += round(dam_force/2) + M.adjustOxyLoss(round(dam_force/2)) M.updatehealth() chassis.occupant_message("\red You squeese [target] with [src.name]. Something cracks.") chassis.visible_message("\red [chassis] squeeses [target].") diff --git a/code/game/objects/devices/aicard.dm b/code/game/objects/devices/aicard.dm index 17fc4235070..11c7f1c7eda 100644 --- a/code/game/objects/devices/aicard.dm +++ b/code/game/objects/devices/aicard.dm @@ -103,7 +103,7 @@ A.suiciding = 1 A << "Your core files are being wiped!" while (A.stat != 2) - A.oxyloss += 2 + A.adjustOxyLoss(2) A.updatehealth() sleep(10) flush = 0 diff --git a/code/game/objects/devices/flashlight.dm b/code/game/objects/devices/flashlight.dm index 9894a4fdaa7..2d723d933ce 100644 --- a/code/game/objects/devices/flashlight.dm +++ b/code/game/objects/devices/flashlight.dm @@ -31,7 +31,7 @@ /obj/item/device/flashlight/attack(mob/M as mob, mob/user as mob) src.add_fingerprint(user) if(src.on && user.zone_sel.selecting == "eyes") - if ((user.mutations & CLUMSY || user.brainloss >= 60) && prob(50))//too dumb to use flashlight properly + if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50))//too dumb to use flashlight properly return ..()//just hit them in the head if (!(istype(usr, /mob/living/carbon/human) || ticker) && ticker.mode.name != "monkey")//don't have dexterity diff --git a/code/game/objects/devices/scanners.dm b/code/game/objects/devices/scanners.dm index 5be6f0dc6f4..e0241beb40d 100644 --- a/code/game/objects/devices/scanners.dm +++ b/code/game/objects/devices/scanners.dm @@ -180,7 +180,7 @@ MASS SPECTROMETER origin_tech = "magnets=1;biotech=1" /obj/item/device/healthanalyzer/attack(mob/M as mob, mob/user as mob) - if ((user.mutations & CLUMSY || user.brainloss >= 60) && prob(50)) + if ((user.mutations & CLUMSY || user.getBrainLoss() >= 60) && prob(50)) user << text("\red You try to analyze the floor's vitals!") for(var/mob/O in viewers(M, null)) O.show_message(text("\red [user] has analyzed the floor's vitals!"), 1) @@ -208,18 +208,18 @@ MASS SPECTROMETER user.show_message(text("\blue [] | [] | [] | []", fake_oxy > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) else user.show_message(text("\blue [] | [] | [] | []", M.getOxyLoss() > 50 ? "\red Severe oxygen deprivation detected\blue" : "Subject bloodstream oxygen level normal", M.getToxLoss() > 50 ? "\red Dangerous amount of toxins detected\blue" : "Subject bloodstream toxin level minimal", M.getFireLoss() > 50 ? "\red Severe burn damage detected\blue" : "Subject burn injury status O.K", M.getBruteLoss() > 50 ? "\red Severe anatomical damage detected\blue" : "Subject brute-force injury status O.K"), 1) - if (M.cloneloss) + if (M.getCloneLoss()) user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1) for(var/datum/disease/D in M.viruses) if(!D.hidden[SCANNER]) user.show_message(text("\red Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]")) if (M.reagents && M.reagents.get_reagent_amount("inaprovaline")) user.show_message(text("\blue Bloodstream Analysis located [M.reagents:get_reagent_amount("inaprovaline")] units of rejuvenation chemicals."), 1) - if (M.brainloss >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) + if (M.getBrainLoss() >= 100 || istype(M, /mob/living/carbon/human) && M:brain_op_stage == 4.0) user.show_message(text("\red Subject is brain dead."), 1) - else if (M.brainloss >= 60) + else if (M.getBrainLoss() >= 60) user.show_message(text("\red Severe brain damage detected. Subject likely to have mental retardation."), 1) - else if (M.brainloss >= 10) + else if (M.getBrainLoss() >= 10) user.show_message(text("\red Significant brain damage detected. Subject may have had a concussion."), 1) src.add_fingerprint(user) return diff --git a/code/game/objects/devices/taperecorder.dm b/code/game/objects/devices/taperecorder.dm index dd5d6029a97..dc9b5b653d8 100644 --- a/code/game/objects/devices/taperecorder.dm +++ b/code/game/objects/devices/taperecorder.dm @@ -22,7 +22,7 @@ if (M.stuttering) src.storedinfo += "[M.name] stammers, \"[msg]\"" return - if (M.brainloss >= 60) + if (M.getBrainLoss() >= 60) src.storedinfo += "[M.name] gibbers, \"[msg]\"" return if (ending == "?") diff --git a/code/game/objects/effect_system.dm b/code/game/objects/effect_system.dm index 4f2e35cc8ba..3e46dde648a 100644 --- a/code/game/objects/effect_system.dm +++ b/code/game/objects/effect_system.dm @@ -307,7 +307,7 @@ steam.start() -- spawns the effect if (M.internal != null && M.wear_mask && (M.wear_mask.flags & MASKINTERNALS)) else M.drop_item() - M.oxyloss += 1 + M.adjustOxyLoss(1) if (M.coughedtime != 1) M.coughedtime = 1 M.emote("cough") @@ -331,7 +331,7 @@ steam.start() -- spawns the effect return else M.drop_item() - M.oxyloss += 1 + M.adjustOxyLoss(1) if (M.coughedtime != 1) M.coughedtime = 1 M.emote("cough") diff --git a/code/game/objects/items/item.dm b/code/game/objects/items/item.dm index a070ca7443c..0067c1f2a91 100644 --- a/code/game/objects/items/item.dm +++ b/code/game/objects/items/item.dm @@ -315,7 +315,7 @@ switch(src.damtype) if("brute") if(istype(src, /mob/living/carbon/metroid)) - M.bruteloss += power + M.adjustBrainLoss(power) else @@ -372,7 +372,7 @@ M << "\red You stab yourself in the eye." M.sdisabilities |= 1 M.weakened += 4 - M.bruteloss += 10 + M.adjustBruteLoss(10) */ if(M != user) for(var/mob/O in (viewers(M) - user - M)) diff --git a/code/game/objects/storage/bible.dm b/code/game/objects/storage/bible.dm index 410684b62a8..4920cfb3e9f 100644 --- a/code/game/objects/storage/bible.dm +++ b/code/game/objects/storage/bible.dm @@ -57,7 +57,7 @@ playsound(src.loc, "punch", 25, 1, -1) else if(ishuman(M) && !istype(M:head, /obj/item/clothing/head/helmet)) - M.brainloss += 10 + M.adjustBrainLoss(10) M << "\red You feel dumber." for(var/mob/O in viewers(M, null)) O.show_message(text("\red [] beats [] over the head with []!", user, M, src), 1) diff --git a/code/game/objects/weapons.dm b/code/game/objects/weapons.dm index 4b0c016d620..57499d809dc 100644 --- a/code/game/objects/weapons.dm +++ b/code/game/objects/weapons.dm @@ -144,7 +144,7 @@ armed = 0 /* else if (ismouse(target)) - target.bruteloss = 100 + target.adjustBruteLoss(100) */ /obj/item/weapon/mousetrap/attack_self(mob/user as mob) @@ -153,7 +153,7 @@ user << "\blue You arm the mousetrap." else icon_state = "mousetrap" - if((user.brainloss >= 60 || user.mutations & CLUMSY) && prob(50)) + if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" @@ -170,7 +170,7 @@ /obj/item/weapon/mousetrap/attack_hand(mob/user as mob) if(armed) - if((user.brainloss >= 60 || user.mutations & CLUMSY) && prob(50)) + if((user.getBrainLoss() >= 60 || user.mutations & CLUMSY) && prob(50)) var/which_hand = "l_hand" if(!user.hand) which_hand = "r_hand" diff --git a/code/modules/chemical/Chemistry-Reagents.dm b/code/modules/chemical/Chemistry-Reagents.dm index 8bce8cc24c4..cb43c803147 100644 --- a/code/modules/chemical/Chemistry-Reagents.dm +++ b/code/modules/chemical/Chemistry-Reagents.dm @@ -351,7 +351,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M:adjustToxLoss(3) - M:oxyloss += 3 + M:adjustOxyLoss(3) M:sleeping += 1 ..() return @@ -1121,7 +1121,7 @@ datum if(!M) M = holder.my_atom if(prob(33)) M.take_organ_damage(1, 0) - M:oxyloss += 3 + M:adjustOxyLoss(3) if(prob(20)) M:emote("gasp") ..() return @@ -1167,7 +1167,7 @@ datum if(M.stat == 2.0) return //See above, down and around. --Agouri if(!M) M = holder.my_atom - M:oxyloss = max(M:getOxyLoss()-2, 0) + M:adjustOxyLoss(-2) if(holder.has_reagent("lexorin")) holder.remove_reagent("lexorin", 2) ..() @@ -1201,7 +1201,7 @@ datum if(M.stat == 2.0) return if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(40)) M:oxyloss-- + if(M:getOxyLoss() && prob(40)) M:adjustOxyLoss(-1) if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0) if(M:getFireLoss() && prob(40)) M:heal_organ_damage(0,1) if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1) @@ -1221,7 +1221,7 @@ datum M:oxyloss = 0 M:radiation = 0 M:heal_organ_damage(5,5) - if(M:getToxLoss()) M:adjustToxLoss(-5) + M:adjustToxLoss(-5) if(holder.has_reagent("toxin")) holder.remove_reagent("toxin", 5) if(holder.has_reagent("stoxin")) @@ -1297,7 +1297,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom M:jitteriness = max(M:jitteriness-5,0) - if(prob(80)) M:brainloss++ + if(prob(80)) M:adjustBrainLoss(1) if(prob(50)) M:drowsyness = max(M:drowsyness, 3) if(prob(10)) M:emote("drool") ..() @@ -1328,7 +1328,7 @@ datum return //See above, down and around. --Agouri if(!M) M = holder.my_atom M:radiation = max(M:radiation-7,0) - if(M:getToxLoss()) M:adjustToxLoss(-1) + M:adjustToxLoss(-1) if(prob(15)) M.take_organ_damage(1, 0) ..() @@ -1343,7 +1343,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:brainloss = max(M:brainloss-3 , 0) + M:adjustBrainLoss(-3) ..() return @@ -1402,10 +1402,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(M.bodytemperature < 170) - if(M:cloneloss) M:cloneloss = max(0, M:cloneloss-1) - if(M:getOxyLoss()) M:oxyloss = max(0, M:getOxyLoss()-3) + M:adjustCloneLoss(-1) + M:adjustOxyLoss(-3) M:heal_organ_damage(3,3) - if(M:getToxLoss()) M:adjustToxLoss(-3) + M:adjustToxLoss(-3) ..() return @@ -1419,10 +1419,10 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom if(M.bodytemperature < 170) - if(M:cloneloss) M:cloneloss = max(0, M:cloneloss-3) - if(M:getOxyLoss()) M:oxyloss = max(0, M:getOxyLoss()-3) + M:adjustCloneLoss(-3) + M:adjustOxyLoss(-3) M:heal_organ_damage(3,3) - if(M:getToxLoss()) M:adjustToxLoss(-3) + M:adjustToxLoss(-3) ..() return @@ -1459,7 +1459,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:oxyloss += 0.5 + M:adjustOxyLoss(0.5) M:adjustToxLoss(0.5) M:weakened = max(M:weakened, 10) M:silent = max(M:silent, 10) @@ -1930,7 +1930,7 @@ datum on_mob_life(var/mob/living/M as mob) M:nutrition += nutriment_factor if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(30)) M:oxyloss-- + if(M:getOxyLoss() && prob(30)) M:adjustOxyLoss(-1) M:nutrition++ ..() return @@ -3032,7 +3032,7 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - if(M:getOxyLoss() && prob(50)) M:oxyloss -= 2 + if(M:getOxyLoss() && prob(50)) M:adjustOxyLoss(-2) if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0) if(M:getFireLoss() && prob(50)) M:heal_organ_damage(0,2) if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2) @@ -3605,7 +3605,7 @@ datum if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) M.make_jittery(5) - if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0) + if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) M:nutrition++ ..() return @@ -3625,7 +3625,7 @@ datum if (M.bodytemperature < 310)//310 is the normal bodytemp. 310.055 M.bodytemperature = min(310, M.bodytemperature+5) M.make_jittery(5) - if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0) + if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0) M:nutrition++ ..() return @@ -3678,8 +3678,8 @@ datum on_mob_life(var/mob/living/M as mob) if(!M) M = holder.my_atom - M:oxyloss += 0.5 - M:getToxLoss() += 0.5 + M:adjustOxyLoss(0.5) + M:adjustOxyLoss(0.5) M:weakened = max(M:weakened, 15) M:silent = max(M:silent, 15) if(!data) data = 1 diff --git a/code/modules/critters/critter_AI.dm b/code/modules/critters/critter_AI.dm index 5448e894dd3..18e0fac6e46 100644 --- a/code/modules/critters/critter_AI.dm +++ b/code/modules/critters/critter_AI.dm @@ -162,7 +162,7 @@ var/datum/organ/external/affecting = H.get_organ(ran_zone(dam_zone)) H.apply_damage(damage, BRUTE, affecting, H.run_armor_check(affecting, "melee")) else - target:bruteloss += damage + target:adjustBruteLoss(damage) if(attack_sound) playsound(loc, attack_sound, 50, 1, -1)