Added a getBruteLoss() proc to mob.dm and then replaced all calls of bruteloss with it. Except for the ones commented out.

git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2505 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
rockdtben
2011-11-10 14:45:25 +00:00
parent e3320d9cb1
commit ff84314ce6
58 changed files with 640 additions and 269 deletions
+6 -6
View File
@@ -1200,7 +1200,7 @@ datum
return
if(!M) M = holder.my_atom
if(M:oxyloss && prob(40)) M:oxyloss--
if(M:bruteloss && prob(40)) M:heal_organ_damage(1,0)
if(M:getBruteLoss() && prob(40)) M:heal_organ_damage(1,0)
if(M:fireloss && prob(40)) M:heal_organ_damage(0,1)
if(M:toxloss && prob(40)) M:toxloss--
..()
@@ -2103,7 +2103,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
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
@@ -2117,7 +2117,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
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
@@ -2132,7 +2132,7 @@ datum
on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor
if(M:bruteloss && prob(20)) M:heal_organ_damage(1,0)
if(M:getBruteLoss() && prob(20)) M:heal_organ_damage(1,0)
..()
return
@@ -2656,7 +2656,7 @@ datum
color = "#895C4C" // rgb: 137, 92, 76
on_mob_life(var/mob/living/M as mob)
if(M:bruteloss && prob(10)) M:heal_organ_damage(1,0)
if(M:getBruteLoss() && prob(10)) M:heal_organ_damage(1,0)
M:nutrition += 2
if(!data) data = 1
data++
@@ -3031,7 +3031,7 @@ datum
on_mob_life(var/mob/living/M as mob)
if(!M) M = holder.my_atom
if(M:oxyloss && prob(50)) M:oxyloss -= 2
if(M:bruteloss && prob(60)) M:heal_organ_damage(2,0)
if(M:getBruteLoss() && prob(60)) M:heal_organ_damage(2,0)
if(M:fireloss && prob(50)) M:heal_organ_damage(0,2)
if(M:toxloss && prob(50)) M:toxloss -= 2
if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15)
+2 -2
View File
@@ -40,7 +40,7 @@
paralysis = 0
weakened = 0
sleeping = 0
bruteloss = max(bruteloss, 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
@@ -50,7 +50,7 @@
proc/UpdateDamage()
health = 60 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 60 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
return
@@ -20,7 +20,7 @@
if (src.nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 150 - src.oxyloss - src.fireloss - src.bruteloss
src.health = 150 - src.oxyloss - src.fireloss - src.getBruteLoss()
else
src.health = 150
src.stat = 0
@@ -76,7 +76,7 @@
handle_regular_status_updates()
health = 150 - (oxyloss + fireloss + bruteloss + cloneloss)
health = 150 - (oxyloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -20,7 +20,7 @@
if (src.nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 125 - src.oxyloss - src.fireloss - src.bruteloss
src.health = 125 - src.oxyloss - src.fireloss - src.getBruteLoss()
else
src.health = 125
src.stat = 0
@@ -77,7 +77,7 @@
handle_regular_status_updates()
health = 150 - (oxyloss + fireloss + bruteloss + cloneloss)
health = 150 - (oxyloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -755,7 +755,7 @@ In all, this is a lot like the monkey code. /N
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 100 - oxyloss - fireloss - bruteloss
health = 100 - oxyloss - fireloss - getBruteLoss()
else
health = 100
stat = 0
@@ -84,7 +84,7 @@
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(bruteloss, 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
@@ -396,7 +396,7 @@
handle_regular_status_updates()
health = 100 - (oxyloss + fireloss + bruteloss + cloneloss)
health = 100 - (oxyloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -23,7 +23,7 @@
if (src.nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 250 - src.oxyloss - src.fireloss - src.bruteloss
src.health = 250 - src.oxyloss - src.fireloss - src.getBruteLoss()
else
src.health = 250
src.stat = 0
@@ -78,7 +78,7 @@
handle_regular_status_updates()
health = 250 - (oxyloss + fireloss + bruteloss + cloneloss)
health = 250 - (oxyloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -503,7 +503,7 @@
if (nodamage == 0)
//oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!!
health = 25 - oxyloss - fireloss - bruteloss
health = 25 - oxyloss - fireloss - getBruteLoss()
else
health = 25
stat = 0
@@ -82,7 +82,7 @@
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(bruteloss, 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
@@ -323,7 +323,7 @@
handle_regular_status_updates()
health = 25 - (oxyloss + fireloss + bruteloss + cloneloss)
health = 25 - (oxyloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -20,7 +20,7 @@
handle_regular_status_updates()
health = 200 - (oxyloss + fireloss + bruteloss)
health = 200 - (oxyloss + fireloss + getBruteLoss())
weakened = 0
stunned = 0
@@ -43,7 +43,7 @@
return 1
updatehealth()
src.health = 200 - src.oxyloss - src.fireloss - src.bruteloss
src.health = 200 - src.oxyloss - src.fireloss - src.getBruteLoss()
xcom_attack(mob/living/carbon/human/target as mob)
if(!ishuman(target))
+2 -2
View File
@@ -45,7 +45,7 @@
stunned = max(stunned,0)
paralysis = max(paralysis, 0)
weakened = max(weakened, 0)
bruteloss = max(bruteloss, 0)
bruteloss = max(getBruteLoss(), 0)
fireloss = max(fireloss, 0)
oxyloss = max(oxyloss, 0)
toxloss = max(toxloss, 0)
@@ -144,7 +144,7 @@
handle_regular_status_updates()
health = 100 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 100 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 25) paralysis = max(paralysis, 3)
+1 -1
View File
@@ -32,7 +32,7 @@
M.show_message(text("\red <B>[user] attacks [src]'s stomach wall with the [I.name]!"), 2)
playsound(user.loc, 'attackblob.ogg', 50, 1)
if(prob(src.bruteloss - 50))
if(prob(src.getBruteLoss() - 50))
src.gib()
/mob/living/carbon/gib(give_medal)
@@ -115,8 +115,8 @@
if (src.stat == 2 || (changeling && changeling.changeling_fakedeath == 1))
usr << "\red [src] is limp and unresponsive, a dull lifeless look in [t_his] eyes."
else
if (src.bruteloss)
if (src.bruteloss < 30)
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
usr << "\red [src.name] looks slightly injured!"
else
usr << "\red <B>[src.name] looks severely injured!</B>"
@@ -688,7 +688,7 @@
M.pulling = null
//this is the gay blood on floor shit -- Added back -- Skie
if (M.lying && (prob(M.bruteloss / 6)))
if (M.lying && (prob(M.getBruteLoss() / 6)))
var/turf/location = M.loc
if (istype(location, /turf/simulated))
location.add_blood(M)
@@ -2195,7 +2195,7 @@ It can still be worn/put on as normal.
for(var/datum/organ/external/O in organs)
src.bruteloss += O.brute_dam
src.fireloss += O.burn_dam
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss - src.cloneloss
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.getBruteLoss() - src.cloneloss
/mob/living/carbon/human/abiotic(var/full_body = 0)
+2 -2
View File
@@ -102,7 +102,7 @@
paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0)
bruteloss = max(bruteloss, 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
@@ -603,7 +603,7 @@
if(light_amount > 0) //if there's enough light, heal
if(fireloss)
heal_overall_damage(0,1)
if(bruteloss)
if(getBruteLoss())
heal_overall_damage(1,0)
if(toxloss)
toxloss--
@@ -6,8 +6,8 @@
if (src.stat == 2)
usr << text("\red [] is limp and unresponsive.", src.name)
else
if (src.bruteloss)
if (src.bruteloss < 40)
if (src.getBruteLoss())
if (src.getBruteLoss() < 40)
usr << text("\red [] has some punctures in its flesh!", src.name)
else
usr << text("\red <B>[] has a lot of punctures and tears in its flesh!</B>", src.name)
@@ -396,9 +396,9 @@
handle_regular_status_updates()
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 200 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
else
health = 150 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 150 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
@@ -420,7 +420,7 @@
if(toxloss>0) toxloss = max(toxloss-1, 0)
if(fireloss>0) fireloss = max(fireloss-1,0)
if(cloneloss>0) cloneloss = max(cloneloss-1,0)
if(bruteloss>0) bruteloss = max(bruteloss-1,0)
if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0)
if (src.stat == 2)
@@ -648,9 +648,9 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
if (nodamage == 0)
// metroids can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 200 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
else
health = 150 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 150 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
else
if(istype(src, /mob/living/carbon/metroid/adult))
health = 200
@@ -82,8 +82,8 @@
if(oxyloss > 0)
oxyloss = max(0, oxyloss-10)
if(bruteloss > 0)
bruteloss = max(0, bruteloss-10)
if(getBruteLoss() > 0)
bruteloss = max(0, getBruteLoss()-10)
if(fireloss > 0)
fireloss = max(0, fireloss-10)
@@ -98,7 +98,7 @@
if(toxloss<0) toxloss = 0
if(oxyloss<0) oxyloss = 0
if(bruteloss<0) bruteloss = 0
if(getBruteLoss()<0) bruteloss = 0
if(fireloss<0) fireloss = 0
if(cloneloss<0) cloneloss = 0
@@ -16,8 +16,8 @@
if (src.stat == 2)
usr << text("\red [] is limp and unresponsive, a dull lifeless look in their eyes.", src.name)
else
if (src.bruteloss)
if (src.bruteloss < 30)
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
usr << text("\red [] looks slightly bruised!", src.name)
else
usr << text("\red <B>[] looks severely bruised!</B>", src.name)
@@ -397,7 +397,7 @@
handle_regular_status_updates()
health = 100 - (oxyloss + toxloss + fireloss + bruteloss + cloneloss)
health = 100 - (oxyloss + toxloss + fireloss + getBruteLoss() + cloneloss)
if(oxyloss > 25) paralysis = max(paralysis, 3)
@@ -103,7 +103,7 @@
bruteloss += 30
if ((O.icon_state == "flaming" && !( shielded )))
fireloss += 40
health = 100 - oxyloss - toxloss - fireloss - bruteloss
health = 100 - oxyloss - toxloss - fireloss - getBruteLoss()
return
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living
@@ -139,7 +139,7 @@
O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
var/damage = rand(1, 5)
bruteloss += damage
health = 100 - oxyloss - toxloss - fireloss - bruteloss
health = 100 - oxyloss - toxloss - fireloss - getBruteLoss()
for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever))
contract_disease(D,1,0)
@@ -536,16 +536,16 @@
if(1.0)
if (stat != 2)
bruteloss += 200
health = 100 - oxyloss - toxloss - fireloss - bruteloss
health = 100 - oxyloss - toxloss - fireloss - getBruteLoss()
if(2.0)
if (stat != 2)
bruteloss += 60
fireloss += 60
health = 100 - oxyloss - toxloss - fireloss - bruteloss
health = 100 - oxyloss - toxloss - fireloss - getBruteLoss()
if(3.0)
if (stat != 2)
bruteloss += 30
health = 100 - oxyloss - toxloss - fireloss - bruteloss
health = 100 - oxyloss - toxloss - fireloss - getBruteLoss()
if (prob(50))
paralysis += 10
else
@@ -554,7 +554,7 @@
/mob/living/carbon/monkey/blob_act()
if (stat != 2)
fireloss += 60
health = 100 - oxyloss - toxloss - fireloss - bruteloss
health = 100 - oxyloss - toxloss - fireloss - getBruteLoss()
if (prob(50))
paralysis += 10
+4 -4
View File
@@ -2,13 +2,13 @@
set hidden = 1
if ((src.health < 0 && src.health > -95.0))
src.oxyloss += src.health + 200
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death."
/mob/living/proc/updatehealth()
if(!src.nodamage)
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss - src.cloneloss
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.getBruteLoss() - src.cloneloss
else
src.health = 100
src.stat = 0
@@ -111,7 +111,7 @@
// heal ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/heal_organ_damage(var/brute, var/burn)
bruteloss = max(0, bruteloss-brute)
bruteloss = max(0, getBruteLoss()-brute)
fireloss = max(0, fireloss-burn)
src.updatehealth()
@@ -123,7 +123,7 @@
// heal MANY external organs, in random order
/mob/living/proc/heal_overall_damage(var/brute, var/burn)
bruteloss = max(0, bruteloss-brute)
bruteloss = max(0, getBruteLoss()-brute)
fireloss = max(0, fireloss-burn)
src.updatehealth()
+1 -1
View File
@@ -210,7 +210,7 @@
/mob/living/silicon/ai/ex_act(severity)
flick("flash", flash)
var/b_loss = bruteloss
var/b_loss = getBruteLoss()
var/f_loss = fireloss
switch(severity)
if(1.0)
@@ -6,8 +6,8 @@
if (src.stat == 2)
usr << text("\red [] is powered-down.", src.name)
else
if (src.bruteloss)
if (src.bruteloss < 30)
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
usr << text("\red [] looks slightly dented", src.name)
else
usr << text("\red <B>[] looks severely dented!</B>", src.name)
+2 -2
View File
@@ -239,9 +239,9 @@
/mob/living/silicon/ai/updatehealth()
if (src.nodamage == 0)
if(src.fire_res_on_core)
src.health = 100 - src.oxyloss - src.toxloss - src.bruteloss
src.health = 100 - src.oxyloss - src.toxloss - src.getBruteLoss()
else
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.getBruteLoss()
else
src.health = 100
src.stat = 0
@@ -9,7 +9,7 @@
/mob/living/silicon/decoy/updatehealth()
if (src.nodamage == 0)
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.bruteloss
src.health = 100 - src.oxyloss - src.toxloss - src.fireloss - src.getBruteLoss()
else
src.health = 100
src.stat = 0
@@ -6,8 +6,8 @@
if (src.stat == 2)
usr << text("\red [] appears disabled.", src.name)
else
if (src.bruteloss)
if (src.bruteloss < 30)
if (src.getBruteLoss())
if (src.getBruteLoss() < 30)
usr << text("\red [] looks slightly dented", src.name)
else
usr << text("\red <B>[]'s casing appears cracked and broken!</B>", src.name)
+1 -1
View File
@@ -23,4 +23,4 @@
src.health = 100
src.stat = 0
else
src.health = 100 - src.bruteloss - src.fireloss
src.health = 100 - src.getBruteLoss() - src.fireloss
+1 -1
View File
@@ -83,7 +83,7 @@
/mob/living/silicon/pai/ex_act(severity)
flick("flash", src.flash)
var/b_loss = src.bruteloss
var/b_loss = src.getBruteLoss()
var/f_loss = src.fireloss
switch(severity)
if(1.0)
@@ -472,7 +472,7 @@
Respiratory: [M.oxyloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.oxyloss]</font><br>
Toxicology: [M.toxloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.toxloss]</font><br>
Burns: [M.fireloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.fireloss]</font><br>
Structural Integrity: [M.bruteloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.bruteloss]</font><br>
Structural Integrity: [M.getBruteLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getBruteLoss()]</font><br>
Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)<br>
"}
for(var/datum/disease/D in M.viruses)
@@ -5,8 +5,8 @@
usr << text("\blue This is \icon[src] <B>[src.name]</B>!")
if (src.stat == 2)
usr << text("\red [src.name] is powered-down.")
if (src.bruteloss)
if (src.bruteloss < 75)
if (src.getBruteLoss())
if (src.getBruteLoss() < 75)
usr << text("\red [src.name] looks slightly dented")
else
usr << text("\red <B>[src.name] looks severely dented!</B>")
@@ -34,7 +34,7 @@
paralysis = max(min(paralysis, 30), 0)
weakened = max(min(weakened, 20), 0)
sleeping = 0
bruteloss = max(bruteloss, 0)
bruteloss = max(getBruteLoss(), 0)
toxloss = max(toxloss, 0)
oxyloss = max(oxyloss, 0)
fireloss = max(fireloss, 0)
@@ -87,7 +87,7 @@
if(src.stat)
src.camera.status = 0
health = 200 - (oxyloss + fireloss + bruteloss)
health = 200 - (oxyloss + fireloss + getBruteLoss())
if(oxyloss > 50) paralysis = max(paralysis, 3)
@@ -217,7 +217,7 @@
del(src)
return
var/b_loss = bruteloss
var/b_loss = getBruteLoss()
var/f_loss = fireloss
switch(severity)
if(1.0)
@@ -338,7 +338,7 @@
if (istype(W, /obj/item/weapon/weldingtool) && W:welding)
if (W:remove_fuel(0))
bruteloss -= 30
if(bruteloss < 0) bruteloss = 0
if(getBruteLoss() < 0) bruteloss = 0
updatehealth()
add_fingerprint(user)
for(var/mob/O in viewers(user, null))