Removing more referencing of variables replacing with procs. So make updating the system easier.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2802 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rockdtben
2011-12-24 20:15:30 +00:00
parent ecffb0d985
commit d189f96896
10 changed files with 42 additions and 149 deletions
@@ -121,7 +121,7 @@
ear_damage += 15
ear_deaf += 60
bruteloss += b_loss
adjustBruteLoss(b_loss)
adjustFireLoss(f_loss)
updatehealth()
@@ -224,7 +224,7 @@
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
adjustFireLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
adjustFireLoss(30)
updatehealth()
@@ -464,7 +464,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
bruteloss += rand(1, 3)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
@@ -493,7 +493,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
bruteloss += rand(1, 3)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
@@ -518,7 +518,7 @@
else
damage = rand(5, 35)
bruteloss += damage
adjustBruteLoss(damage)
if(M.powerlevel > 0)
var/stunprob = 10
@@ -649,7 +649,7 @@
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
@@ -714,7 +714,7 @@ In all, this is a lot like the monkey code. /N
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
else
M << "\green <B>[name] is too injured for that.</B>"
@@ -579,5 +579,5 @@
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
M.adjustBruteLoss(5)
src.nutrition += 10
@@ -71,7 +71,7 @@
if(health >= 250)
adjustToxLoss(20)
else
bruteloss -= 5
adjustBruteLoss(-5)
adjustFireLoss(-5)
handle_regular_status_updates()
@@ -109,7 +109,7 @@
ear_damage += 15
ear_deaf += 60
bruteloss += b_loss
adjustBruteLoss(b_loss)
adjustFireLoss(f_loss)
updatehealth()
@@ -150,7 +150,7 @@
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
adjustFireLoss(30)
updatehealth()
@@ -278,7 +278,7 @@
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
var/damage = rand(1, 3)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
@@ -308,7 +308,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
bruteloss += rand(1, 3)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
@@ -333,7 +333,7 @@
else
damage = rand(5, 35)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
@@ -431,7 +431,7 @@
for(var/mob/O in viewers(M, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has weakened []!</B>", M, src), 1, "\red You hear someone fall.", 2)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
@@ -470,7 +470,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit []!</B>", src), 1)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
else
M << "\green <B>[name] is too injured for that.</B>"
@@ -274,7 +274,7 @@
if(health >= 25)
adjustToxLoss(5)
else
bruteloss -= 5
adjustBruteLoss(-5)
adjustFireLoss(-5)
return
@@ -508,5 +508,5 @@
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
M.adjustBruteLoss(5)
nutrition += 10
+1 -1
View File
@@ -1034,7 +1034,7 @@
continue
if(air_master.current_cycle%3==1)
if(!M.nodamage)
M.bruteloss += 5
M.adjustBruteLoss(5)
nutrition += 10
handle_changeling()
@@ -414,11 +414,11 @@
if(src.stat != DEAD) src.stat = UNCONSCIOUS
if(prob(30))
if(getOxyLoss()>0) oxyloss = max(getOxyLoss()-1, 0)
if(getToxLoss()>0) adjustToxLoss(-1)
if(getFireLoss()>0) adjustFireLoss(-1)
if(cloneloss>0) cloneloss = max(cloneloss-1,0)
if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0)
adjustOxyLoss(-1)
adjustToxLoss(-1)
adjustFireLoss(-1)
adjustCloneLoss(-1)
adjustBruteLoss(-1)
if (src.stat == DEAD)
@@ -174,7 +174,7 @@
if(3.0)
b_loss += 30
bruteloss += b_loss
adjustBruteLoss(b_loss)
adjustFireLoss(f_loss)
updatehealth()
@@ -214,7 +214,7 @@
if ((M.client && !( M.blinded )))
M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
adjustBruteLoss((istype(O, /obj/effect/meteor/small) ? 10 : 25))
adjustFireLoss(30)
updatehealth()
@@ -341,7 +341,7 @@
else
damage = rand(1, 3)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
@@ -373,7 +373,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[M.name] has bit [src]!</B>"), 1)
bruteloss += rand(1, 3)
adjustBruteLoss(rand(1, 3))
updatehealth()
return
@@ -515,7 +515,7 @@
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has punched []!</B>", M, src), 1)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'punchmiss.ogg', 25, 1, -1)
@@ -556,7 +556,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has wounded [name]!</B>", M), 1)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
else
playsound(loc, 'slashmiss.ogg', 25, 1, -1)
@@ -619,7 +619,7 @@
for(var/mob/O in viewers(src, null))
if ((O.client && !( O.blinded )))
O.show_message(text("\red <B>[] has disarmed [name]!</B>", M), 1)
bruteloss += damage
adjustBruteLoss(damage)
updatehealth()
return