From fac10fb031728d4e247828a17f270bcbb0222cb6 Mon Sep 17 00:00:00 2001 From: rockdtben Date: Sat, 10 Dec 2011 14:36:08 +0000 Subject: [PATCH] TG update: Removed all global modifications of toxloss. Added a setToxLoss() proc. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2653 316c924e-a436-60f5-8080-3fe189b3f50e --- code/defines/mob/mob.dm | 21 ++++++++++++++++-- .../gamemodes/changeling/changeling_powers.dm | 22 +++++++++---------- code/game/magic/cultist/runes.dm | 4 ++-- code/game/verbs/suicide.dm | 8 +++---- code/modules/admin/verbs/randomverbs.dm | 4 ++-- code/modules/mob/living/blob/blob.dm | 8 +++---- .../mob/living/carbon/alien/humanoid/life.dm | 2 -- .../mob/living/carbon/alien/larva/life.dm | 6 ++--- code/modules/mob/living/living.dm | 4 ++-- code/unused/_debug.dm | 8 +++---- code/unused/hivebot/life.dm | 6 ++--- 11 files changed, 54 insertions(+), 39 deletions(-) diff --git a/code/defines/mob/mob.dm b/code/defines/mob/mob.dm index 842dd1c157..a3a4d669c2 100644 --- a/code/defines/mob/mob.dm +++ b/code/defines/mob/mob.dm @@ -440,43 +440,60 @@ the mob is also allowed to move without any sort of restriction. For instance, i // ++++ROCKDTBEN++++ MOB PROCS - - /mob/proc/getBruteLoss() return bruteloss /mob/proc/adjustBruteLoss(var/amount) bruteloss = max(bruteloss + amount, 0) +/mob/proc/setBruteLoss(var/amount) + bruteloss = amount + /mob/proc/getOxyLoss() return oxyloss /mob/proc/adjustOxyLoss(var/amount) oxyloss = max(oxyloss + amount, 0) +/mob/proc/setOxyLoss(var/amount) + oxyloss = amount + /mob/proc/getToxLoss() return toxloss /mob/proc/adjustToxLoss(var/amount) toxloss = max(toxloss + amount, 0) +/mob/proc/setToxLoss(var/amount) + toxloss = amount + /mob/proc/getFireLoss() return fireloss /mob/proc/adjustFireLoss(var/amount) fireloss = max(fireloss + amount, 0) +/mob/proc/setFireLoss(var/amount) + fireloss = amount + + /mob/proc/getCloneLoss() return cloneloss /mob/proc/adjustCloneLoss(var/amount) cloneloss = max(cloneloss + amount, 0) +/mob/proc/setCloneLoss(var/amount) + cloneloss = amount + /mob/proc/getBrainLoss() return brainloss /mob/proc/adjustBrainLoss(var/amount) brainloss = max(brainloss + amount, 0) +/mob/proc/setBrainLoss(var/amount) + brainloss = amount + // ++++ROCKDTBEN++++ MOB PROCS //END diff --git a/code/game/gamemodes/changeling/changeling_powers.dm b/code/game/gamemodes/changeling/changeling_powers.dm index ce1efeb37c..9526c244e7 100644 --- a/code/game/gamemodes/changeling/changeling_powers.dm +++ b/code/game/gamemodes/changeling/changeling_powers.dm @@ -233,10 +233,10 @@ O.loc = usr.loc O.name = text("monkey ([])",copytext(md5(usr.real_name), 2, 6)) - O.toxloss = usr.getToxLoss() - O.bruteloss = usr.getBruteLoss() - O.oxyloss = usr.getOxyLoss() - O.fireloss = usr.getFireLoss() + O.setToxLoss(usr.getToxLoss()) + O.setBruteLoss(usr.getBruteLoss()) + O.setOxyLoss(usr.getOxyLoss()) + O.setFireLoss(usr.getFireLoss()) O.stat = usr.stat O.a_intent = "hurt" for (var/obj/item/weapon/implant/I in implants) @@ -328,10 +328,10 @@ updateappearance(O,O.dna.uni_identity) domutcheck(O, null) - O.toxloss = usr.getToxLoss() - O.bruteloss = usr.getBruteLoss() - O.oxyloss = usr.getOxyLoss() - O.fireloss = usr.getFireLoss() + O.setToxLoss(usr.getToxLoss()) + O.setBruteLoss(usr.getBruteLoss()) + O.setOxyLoss(usr.getOxyLoss()) + O.setFireLoss(usr.getFireLoss()) O.stat = usr.stat for (var/obj/item/weapon/implant/I in implants) I.loc = O @@ -372,10 +372,10 @@ spawn(1200) usr.stat = 0 //usr.fireloss = 0 - usr.toxloss = 0 + usr.setToxLoss(0) //usr.bruteloss = 0 - usr.oxyloss = 0 - usr.cloneloss = 0 + usr.setOxyLoss(0) + usr.setCloneLoss(0) usr.paralysis = 0 usr.stunned = 0 usr.weakened = 0 diff --git a/code/game/magic/cultist/runes.dm b/code/game/magic/cultist/runes.dm index 29414b342a..217a493e1f 100644 --- a/code/game/magic/cultist/runes.dm +++ b/code/game/magic/cultist/runes.dm @@ -273,8 +273,8 @@ var/list/sacrificed = list() del(ghost) for(var/datum/organ/external/affecting in corpse_to_raise.organs) affecting.heal_damage(1000, 1000) - corpse_to_raise.toxloss = 0 - corpse_to_raise.oxyloss = 0 + corpse_to_raise.setToxLoss(0) + corpse_to_raise.setOxyLoss(0) corpse_to_raise.paralysis = 0 corpse_to_raise.stunned = 0 corpse_to_raise.weakened = 0 diff --git a/code/game/verbs/suicide.dm b/code/game/verbs/suicide.dm index 53f79de6f2..4ec0d6dd35 100644 --- a/code/game/verbs/suicide.dm +++ b/code/game/verbs/suicide.dm @@ -167,9 +167,9 @@ if(confirm == "Yes") suiciding = 1 - oxyloss = 100 - bruteloss = 100 - toxloss = 100 - cloneloss = 100 + setOxyLoss(100) + setBruteLoss(100) + setToxLoss(100) + setCloneLoss(100) updatehealth() diff --git a/code/modules/admin/verbs/randomverbs.dm b/code/modules/admin/verbs/randomverbs.dm index 9325e182b2..2310fe32ea 100644 --- a/code/modules/admin/verbs/randomverbs.dm +++ b/code/modules/admin/verbs/randomverbs.dm @@ -481,9 +481,9 @@ Traitors and the like can also be revived with the previous role mostly intact. return if(config.allow_admin_rev) //M.fireloss = 0 - M.toxloss = 0 + M.setToxLoss(0) //M.bruteloss = 0 - M.oxyloss = 0 + M.setOxyLoss(0) M.paralysis = 0 M.stunned = 0 M.weakened = 0 diff --git a/code/modules/mob/living/blob/blob.dm b/code/modules/mob/living/blob/blob.dm index 074f0318c4..0c57cf269f 100644 --- a/code/modules/mob/living/blob/blob.dm +++ b/code/modules/mob/living/blob/blob.dm @@ -40,10 +40,10 @@ paralysis = 0 weakened = 0 sleeping = 0 - bruteloss = max(getBruteLoss(), 0) - toxloss = max(getToxLoss(), 0) - oxyloss = max(getOxyLoss(), 0) - fireloss = max(getFireLoss(), 0) + setBruteLoss(max(getBruteLoss(), 0)) + setToxLoss(max(getToxLoss(), 0)) + setOxyLoss(max(getOxyLoss(), 0)) + setFireLoss(max(getFireLoss(), 0)) if(stat) stat = 0 return diff --git a/code/modules/mob/living/carbon/alien/humanoid/life.dm b/code/modules/mob/living/carbon/alien/humanoid/life.dm index 8624774bf8..ede5bf418f 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/life.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/life.dm @@ -296,8 +296,6 @@ if(locate(/obj/effect/alien/weeds) in loc) if(health >= 100) adjustToxLoss(15) - if(getToxLoss() > max_plasma) - toxloss = max_plasma else adjustBruteLoss(-15) diff --git a/code/modules/mob/living/carbon/alien/larva/life.dm b/code/modules/mob/living/carbon/alien/larva/life.dm index 9be8835e7f..47e23e6f42 100644 --- a/code/modules/mob/living/carbon/alien/larva/life.dm +++ b/code/modules/mob/living/carbon/alien/larva/life.dm @@ -82,9 +82,9 @@ paralysis = max(min(paralysis, 20), 0) weakened = max(min(weakened, 20), 0) sleeping = max(min(sleeping, 20), 0) - bruteloss = max(getBruteLoss(), 0) - toxloss = max(getToxLoss(), 0) - oxyloss = max(getOxyLoss(), 0) + setBruteLoss(max(getBruteLoss(), 0)) + setToxLoss(max(getToxLoss(), 0)) + setOxyLoss(max(getOxyLoss(), 0)) adjustFireLoss(0) handle_mutations_and_radiation() diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 96a05303d8..1587fb990f 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -135,9 +135,9 @@ /mob/living/proc/revive() //src.fireloss = 0 - src.toxloss = 0 + src.setToxLoss(0) //src.bruteloss = 0 - src.oxyloss = 0 + src.setOxyLoss(0) src.paralysis = 0 src.stunned = 0 src.weakened =0 diff --git a/code/unused/_debug.dm b/code/unused/_debug.dm index ba9a81e840..bc4f8f24d6 100644 --- a/code/unused/_debug.dm +++ b/code/unused/_debug.dm @@ -469,10 +469,10 @@ Doing this because FindTurfs() isn't even used /mob/verb/Revive() set category = "Debug" if(Debug) - fireloss = 0 - toxloss = 0 - bruteloss = 0 - oxyloss = 0 + setFireLoss(0) + setToxLoss(0) + setBruteLoss(0) + setOxyLoss(0) paralysis = 0 stunned = 0 weakened = 0 diff --git a/code/unused/hivebot/life.dm b/code/unused/hivebot/life.dm index c7224fde97..a5513f759a 100644 --- a/code/unused/hivebot/life.dm +++ b/code/unused/hivebot/life.dm @@ -32,9 +32,9 @@ paralysis = max(min(paralysis, 1), 0) weakened = max(min(weakened, 15), 0) sleeping = max(min(sleeping, 1), 0) - bruteloss = max(getBruteLoss(), 0) - toxloss = 0 - oxyloss = 0 + setBruteLoss(max(getBruteLoss(), 0)) + setToxLoss(0) + setOxyLoss(0) adjustFireLoss(0) use_power()