git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2536 316c924e-a436-60f5-8080-3fe189b3f50e

This commit is contained in:
rockdtben
2011-11-20 15:53:23 +00:00
parent f733c08847
commit 84888d5ec3
57 changed files with 222 additions and 245 deletions

View File

@@ -288,7 +288,7 @@
mob.suiciding = 1 mob.suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(mob) << "\red <b>[mob.name] is attempting to bite off \his tongue. It looks like \he's trying to commit suicide.</b>" viewers(mob) << "\red <b>[mob.name] is attempting to bite off \his tongue. It looks like \he's trying to commit suicide.</b>"
mob.oxyloss = max(175 - mob.getToxLoss() - mob.fireloss - mob.getBruteLoss(), mob.getOxyLoss()) mob.oxyloss = max(175 - mob.getToxLoss() - mob.getFireLoss() - mob.getBruteLoss(), mob.getOxyLoss())
mob.updatehealth() mob.updatehealth()
spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds spawn(200) //in case they get revived by cryo chamber or something stupid like that, let them suicide again in 20 seconds
mob.suiciding = 0 mob.suiciding = 0

View File

@@ -438,45 +438,34 @@ the mob is also allowed to move without any sort of restriction. For instance, i
/mob/proc/getBruteLoss() /mob/proc/getBruteLoss()
return bruteloss return bruteloss
/mob/proc/adjustBruteLoss(var/amount)
bruteloss = max(bruteloss + amount, 0)
/mob/proc/getOxyLoss() /mob/proc/getOxyLoss()
return oxyloss return oxyloss
/mob/proc/adjustOxyLoss(var/amount)
oxyloss = max(oxyloss + amount, 0)
/mob/proc/getToxLoss() /mob/proc/getToxLoss()
return toxloss return toxloss
/mob/proc/adjustToxLoss(var/amount)
toxloss = max(toxloss + amount, 0)
/mob/proc/getFireLoss() /mob/proc/getFireLoss()
return fireloss return fireloss
/mob/proc/adjustFireLoss(var/amount)
fireloss = max(fireloss + amount, 0)
/mob/proc/getCloneLoss() /mob/proc/getCloneLoss()
return cloneloss return cloneloss
/mob/proc/adjustToxLoss(var/amount) /mob/proc/adjustCloneLoss(var/amount)
toxloss = max(toxloss + amount, 0) cloneloss = max(cloneloss + amount, 0)
// Standard for setting hasn't been agreed upon yet.
/*
/mob/proc/setBruteLoss(var/T)
bruteloss = T
/mob/proc/setOxyLoss(var/T)
oxyloss = T
/mob/proc/setFireLoss(var/T)
fireloss = T
/mob/proc/setCloneLoss(var/T)
cloneloss = T
*/
// ++++ROCKDTBEN++++ MOB PROCS //END

View File

@@ -139,13 +139,13 @@ proc/sql_report_death(var/mob/living/carbon/human/H)
lakey = dd_replacetext(H.lastattacker:key, "'", "''") lakey = dd_replacetext(H.lastattacker:key, "'", "''")
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/coord = "[H.x], [H.y], [H.z]" var/coord = "[H.x], [H.y], [H.z]"
//world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, getBruteLoss(), fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.fireloss], [H.brainloss], [H.getOxyLoss()])" //world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
var/DBConnection/dbcon = new() var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected()) if(!dbcon.IsConnected())
log_game("SQL ERROR during death reporting. Failed to connect.") log_game("SQL ERROR during death reporting. Failed to connect.")
else else
var/DBQuery/query = dbcon.NewQuery("INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.fireloss], [H.brainloss], [H.getOxyLoss()], '[coord]')") var/DBQuery/query = dbcon.NewQuery("INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()], '[coord]')")
if(!query.Execute()) if(!query.Execute())
var/err = query.ErrorMsg() var/err = query.ErrorMsg()
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n") log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")
@@ -176,13 +176,13 @@ proc/sql_report_cyborg_death(var/mob/living/silicon/robot/H)
lakey = dd_replacetext(H.lastattacker:key, "'", "''") lakey = dd_replacetext(H.lastattacker:key, "'", "''")
var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss") var/sqltime = time2text(world.realtime, "YYYY-MM-DD hh:mm:ss")
var/coord = "[H.x], [H.y], [H.z]" var/coord = "[H.x], [H.y], [H.z]"
//world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.fireloss], [H.brainloss], [H.getOxyLoss()])" //world << "INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.bruteloss], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()])"
var/DBConnection/dbcon = new() var/DBConnection/dbcon = new()
dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]") dbcon.Connect("dbi:mysql:[sqldb]:[sqladdress]:[sqlport]","[sqllogin]","[sqlpass]")
if(!dbcon.IsConnected()) if(!dbcon.IsConnected())
log_game("SQL ERROR during death reporting. Failed to connect.") log_game("SQL ERROR during death reporting. Failed to connect.")
else else
var/DBQuery/query = dbcon.NewQuery("INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.fireloss], [H.brainloss], [H.getOxyLoss()], '[coord]')") var/DBQuery/query = dbcon.NewQuery("INSERT INTO death (name, byondkey, job, special, pod, tod, laname, lakey, gender, bruteloss, fireloss, brainloss, oxyloss, coord) VALUES ('[sqlname]', '[sqlkey]', '[sqljob]', '[sqlspecial]', '[sqlpod]', '[sqltime]', '[laname]', '[lakey]', '[H.gender]', [H.getBruteLoss()], [H.getFireLoss()], [H.brainloss], [H.getOxyLoss()], '[coord]')")
if(!query.Execute()) if(!query.Execute())
var/err = query.ErrorMsg() var/err = query.ErrorMsg()
log_game("SQL ERROR during death reporting. Error : \[[err]\]\n") log_game("SQL ERROR during death reporting. Error : \[[err]\]\n")

View File

@@ -391,7 +391,7 @@
C.occupant = O C.occupant = O
connected = null connected = null
O.name = text("monkey ([])",copytext(md5(M.real_name), 2, 6)) O.name = text("monkey ([])",copytext(md5(M.real_name), 2, 6))
O.take_overall_damage(M.getBruteLoss() + 40, M.fireloss) O.take_overall_damage(M.getBruteLoss() + 40, M.getFireLoss())
O.adjustToxLoss(M.getToxLoss() + 20) O.adjustToxLoss(M.getToxLoss() + 20)
O.oxyloss += M.getOxyLoss() O.oxyloss += M.getOxyLoss()
O.stat = M.stat O.stat = M.stat
@@ -466,7 +466,7 @@
O.real_name = randomname O.real_name = randomname
i++ i++
updateappearance(O,O.dna.uni_identity) updateappearance(O,O.dna.uni_identity)
O.take_overall_damage(M.getBruteLoss(), M.fireloss) O.take_overall_damage(M.getBruteLoss(), M.getFireLoss())
O.adjustToxLoss(M.getToxLoss()) O.adjustToxLoss(M.getToxLoss())
O.oxyloss += M.getOxyLoss() O.oxyloss += M.getOxyLoss()
O.stat = M.stat O.stat = M.stat

View File

@@ -235,7 +235,7 @@
O.toxloss = usr.getToxLoss() O.toxloss = usr.getToxLoss()
O.bruteloss = usr.getBruteLoss() O.bruteloss = usr.getBruteLoss()
O.oxyloss = usr.getOxyLoss() O.oxyloss = usr.getOxyLoss()
O.fireloss = usr.fireloss O.fireloss = usr.getFireLoss()
O.stat = usr.stat O.stat = usr.stat
O.a_intent = "hurt" O.a_intent = "hurt"
for (var/obj/item/weapon/implant/I in implants) for (var/obj/item/weapon/implant/I in implants)
@@ -330,7 +330,7 @@
O.toxloss = usr.getToxLoss() O.toxloss = usr.getToxLoss()
O.bruteloss = usr.getBruteLoss() O.bruteloss = usr.getBruteLoss()
O.oxyloss = usr.getOxyLoss() O.oxyloss = usr.getOxyLoss()
O.fireloss = usr.fireloss O.fireloss = usr.getFireLoss()
O.stat = usr.stat O.stat = usr.stat
for (var/obj/item/weapon/implant/I in implants) for (var/obj/item/weapon/implant/I in implants)
I.loc = O I.loc = O

View File

@@ -289,7 +289,7 @@ ________________________________________________________________________________
dat += "<h4>Nutrition Status: [U.nutrition]</h4>" dat += "<h4>Nutrition Status: [U.nutrition]</h4>"
dat += "Oxygen loss: [U.getOxyLoss()]" dat += "Oxygen loss: [U.getOxyLoss()]"
dat += " | Toxin levels: [U.getToxLoss()]<br>" dat += " | Toxin levels: [U.getToxLoss()]<br>"
dat += "Burn severity: [U.fireloss]" dat += "Burn severity: [U.getFireLoss()]"
dat += " | Brute trauma: [U.getBruteLoss()]<br>" dat += " | Brute trauma: [U.getBruteLoss()]<br>"
dat += "Radiation Level: [U.radiation] rad<br>" dat += "Radiation Level: [U.radiation] rad<br>"
dat += "Body Temperature: [U.bodytemperature-T0C]&deg;C ([U.bodytemperature*1.8-459.67]&deg;F)<br>" dat += "Body Temperature: [U.bodytemperature-T0C]&deg;C ([U.bodytemperature*1.8-459.67]&deg;F)<br>"

View File

@@ -64,7 +64,7 @@
dat += text("[]\t-Brute Damage %: []</FONT><BR>", (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getBruteLoss()) dat += text("[]\t-Brute Damage %: []</FONT><BR>", (occupant.getBruteLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getBruteLoss())
dat += text("[]\t-Respiratory Damage %: []</FONT><BR>", (occupant.getOxyLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getOxyLoss()) dat += text("[]\t-Respiratory Damage %: []</FONT><BR>", (occupant.getOxyLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getOxyLoss())
dat += text("[]\t-Toxin Content %: []</FONT><BR>", (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getToxLoss()) dat += text("[]\t-Toxin Content %: []</FONT><BR>", (occupant.getToxLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getToxLoss())
dat += text("[]\t-Burn Severity %: []</FONT><BR>", (occupant.fireloss < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.fireloss) dat += text("[]\t-Burn Severity %: []</FONT><BR>", (occupant.getFireLoss() < 60 ? "<font color='blue'>" : "<font color='red'>"), occupant.getFireLoss())
dat += text("<HR>Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4)) dat += text("<HR>Paralysis Summary %: [] ([] seconds left!)<BR>", occupant.paralysis, round(occupant.paralysis / 4))
dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline")) dat += text("Inaprovaline units: [] units<BR>", occupant.reagents.get_reagent_amount("inaprovaline"))
dat += text("Soporific: [] units<BR>", occupant.reagents.get_reagent_amount("stoxin")) dat += text("Soporific: [] units<BR>", occupant.reagents.get_reagent_amount("stoxin"))
@@ -334,7 +334,7 @@
user << text("[]\t -Brute Damage %: []", (src.occupant.getBruteLoss() < 60 ? "\blue " : "\red "), src.occupant.getBruteLoss()) user << text("[]\t -Brute Damage %: []", (src.occupant.getBruteLoss() < 60 ? "\blue " : "\red "), src.occupant.getBruteLoss())
user << text("[]\t -Respiratory Damage %: []", (src.occupant.getOxyLoss() < 60 ? "\blue " : "\red "), src.occupant.getOxyLoss()) user << text("[]\t -Respiratory Damage %: []", (src.occupant.getOxyLoss() < 60 ? "\blue " : "\red "), src.occupant.getOxyLoss())
user << text("[]\t -Toxin Content %: []", (src.occupant.getToxLoss() < 60 ? "\blue " : "\red "), src.occupant.getToxLoss()) user << text("[]\t -Toxin Content %: []", (src.occupant.getToxLoss() < 60 ? "\blue " : "\red "), src.occupant.getToxLoss())
user << text("[]\t -Burn Severity %: []", (src.occupant.fireloss < 60 ? "\blue " : "\red "), src.occupant.fireloss) user << text("[]\t -Burn Severity %: []", (src.occupant.getFireLoss() < 60 ? "\blue " : "\red "), src.occupant.getFireLoss())
user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)" user << "\blue Expected time till occupant can safely awake: (note: If health is below 20% these times are inaccurate)"
user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5) user << text("\blue \t [] second\s (if around 1 or 2 the sleeper is keeping them asleep.)", src.occupant.paralysis / 5)
else else

View File

@@ -339,7 +339,7 @@
if((C.getOxyLoss() >= (15 + heal_threshold)) && (!C.reagents.has_reagent(src.treatment_oxy))) if((C.getOxyLoss() >= (15 + heal_threshold)) && (!C.reagents.has_reagent(src.treatment_oxy)))
return 1 return 1
if((C.fireloss >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_fire))) if((C.getFireLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_fire)))
return 1 return 1
if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox))) if((C.getToxLoss() >= heal_threshold) && (!C.reagents.has_reagent(src.treatment_tox)))
@@ -399,7 +399,7 @@
if(!C.reagents.has_reagent(src.treatment_oxy)) if(!C.reagents.has_reagent(src.treatment_oxy))
reagent_id = src.treatment_oxy reagent_id = src.treatment_oxy
if (!reagent_id && (C.fireloss >= heal_threshold)) if (!reagent_id && (C.getFireLoss() >= heal_threshold))
if(!C.reagents.has_reagent(src.treatment_fire)) if(!C.reagents.has_reagent(src.treatment_fire))
reagent_id = src.treatment_fire reagent_id = src.treatment_fire

View File

@@ -415,7 +415,7 @@
if (!src.implanted) if (!src.implanted)
return "ERROR" return "ERROR"
else else
src.healthstring = "[round(src.implanted:getOxyLoss())] - [round(src.implanted:fireloss)] - [round(src.implanted:getToxLoss())] - [round(src.implanted:getBruteLoss())]" src.healthstring = "[round(src.implanted:getOxyLoss())] - [round(src.implanted:getFireLoss())] - [round(src.implanted:getToxLoss())] - [round(src.implanted:getBruteLoss())]"
if (!src.healthstring) if (!src.healthstring)
src.healthstring = "ERROR" src.healthstring = "ERROR"
return src.healthstring return src.healthstring

View File

@@ -38,7 +38,7 @@
<B>Health:</B> [src.victim.health]<BR> <B>Health:</B> [src.victim.health]<BR>
<B>Brute Damage:</B> [src.victim.getBruteLoss()]<BR> <B>Brute Damage:</B> [src.victim.getBruteLoss()]<BR>
<B>Toxins Damage:</B> [src.victim.getToxLoss()]<BR> <B>Toxins Damage:</B> [src.victim.getToxLoss()]<BR>
<B>Fire Damage:</B> [src.victim.fireloss]<BR> <B>Fire Damage:</B> [src.victim.getFireLoss()]<BR>
<B>Suffocation Damage:</B> [src.victim.getOxyLoss()]<BR> <B>Suffocation Damage:</B> [src.victim.getOxyLoss()]<BR>
<B>Patient Status:</B> [src.victim.stat ? "Non-responsive" : "Stable"]<BR> <B>Patient Status:</B> [src.victim.stat ? "Non-responsive" : "Stable"]<BR>
"} "}

View File

@@ -123,7 +123,7 @@
src.overlays += image('computer.dmi', "ai-fixer-on") src.overlays += image('computer.dmi', "ai-fixer-on")
while (src.occupant.health < 100) while (src.occupant.health < 100)
src.occupant.oxyloss = max (src.occupant.getOxyLoss()-1, 0) src.occupant.oxyloss = max (src.occupant.getOxyLoss()-1, 0)
src.occupant.fireloss = max (src.occupant.fireloss-1, 0) src.occupant.adjustFireLoss(-1)
src.occupant.adjustToxLoss(-1) src.occupant.adjustToxLoss(-1)
src.occupant.bruteloss = max (src.occupant.getBruteLoss()-1, 0) src.occupant.bruteloss = max (src.occupant.getBruteLoss()-1, 0)
src.occupant.updatehealth() src.occupant.updatehealth()

View File

@@ -63,7 +63,7 @@
var/mob/living/carbon/human/H = C.loc var/mob/living/carbon/human/H = C.loc
var/dam1 = round(H.getOxyLoss(),1) var/dam1 = round(H.getOxyLoss(),1)
var/dam2 = round(H.getToxLoss(),1) var/dam2 = round(H.getToxLoss(),1)
var/dam3 = round(H.fireloss,1) var/dam3 = round(H.getFireLoss(),1)
var/dam4 = round(H.getBruteLoss(),1) var/dam4 = round(H.getBruteLoss(),1)
switch(C.sensor_mode) switch(C.sensor_mode)
if(1) if(1)

View File

@@ -90,7 +90,7 @@
<B>Current cell temperature:</B> [temp_text]K<BR> <B>Current cell temperature:</B> [temp_text]K<BR>
<B>Cryo status:</B> [ src.on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR> <B>Cryo status:</B> [ src.on ? "<A href='?src=\ref[src];start=1'>Off</A> <B>On</B>" : "<B>Off</B> <A href='?src=\ref[src];start=1'>On</A>"]<BR>
[beaker_text]<BR><BR> [beaker_text]<BR><BR>
<B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(src.occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(src.occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(src.occupant.fireloss,0.1)]<BR>Toxin damage: [round(src.occupant.getToxLoss(),0.1)]<BR>Body temperature: [src.occupant.bodytemperature]" : "<FONT color=red>None</FONT>"]<BR> <B>Current occupant:</B> [src.occupant ? "<BR>Name: [src.occupant]<BR>Health: [health_text]<BR>Oxygen deprivation: [round(src.occupant.getOxyLoss(),0.1)]<BR>Brute damage: [round(src.occupant.getBruteLoss(),0.1)]<BR>Fire damage: [round(src.occupant.getFireLoss(),0.1)]<BR>Toxin damage: [round(src.occupant.getToxLoss(),0.1)]<BR>Body temperature: [src.occupant.bodytemperature]" : "<FONT color=red>None</FONT>"]<BR>
"} "}
user.machine = src user.machine = src
@@ -176,7 +176,7 @@
if (occupant.getToxLoss()) if (occupant.getToxLoss())
occupant.adjustToxLoss(max(-1, -20/occupant.getToxLoss())) occupant.adjustToxLoss(max(-1, -20/occupant.getToxLoss()))
var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0 var/heal_brute = occupant.getBruteLoss() ? min(1, 20/occupant.getBruteLoss()) : 0
var/heal_fire = occupant.fireloss ? min(1, 20/occupant.fireloss) : 0 var/heal_fire = occupant.getFireLoss() ? min(1, 20/occupant.getFireLoss()) : 0
occupant.heal_organ_damage(heal_brute,heal_fire) occupant.heal_organ_damage(heal_brute,heal_fire)
if(beaker && (next_trans == 0)) if(beaker && (next_trans == 0))
beaker:reagents.trans_to(occupant, 1, 10) beaker:reagents.trans_to(occupant, 1, 10)

View File

@@ -1295,7 +1295,7 @@
O.laws = AI.laws O.laws = AI.laws
O.stat = AI.stat O.stat = AI.stat
O.oxyloss = AI.getOxyLoss() O.oxyloss = AI.getOxyLoss()
O.fireloss = AI.fireloss O.fireloss = AI.getFireLoss()
O.bruteloss = AI.getBruteLoss() O.bruteloss = AI.getBruteLoss()
O.toxloss = AI.toxloss O.toxloss = AI.toxloss
O.updatehealth() O.updatehealth()
@@ -1313,7 +1313,7 @@
AI.control_disabled = 0 AI.control_disabled = 0
AI.laws = O.laws AI.laws = O.laws
AI.oxyloss = O.getOxyLoss() AI.oxyloss = O.getOxyLoss()
AI.fireloss = O.fireloss AI.fireloss = O.getFireLoss()
AI.bruteloss = O.getBruteLoss() AI.bruteloss = O.getBruteLoss()
AI.toxloss = O.toxloss AI.toxloss = O.toxloss
AI.updatehealth() AI.updatehealth()

View File

@@ -721,7 +721,7 @@
user.show_message("\blue Analyzing Results for [C]:") user.show_message("\blue Analyzing Results for [C]:")
user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]", 1) user.show_message("\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]", 1)
user.show_message("\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.fireloss > 50 ? "\red" : "\blue"][C.fireloss]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]", 1) user.show_message("\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]", 1)
user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\blue \t Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)", 1) user.show_message("\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)", 1)
for(var/datum/disease/D in C.viruses) for(var/datum/disease/D in C.viruses)

View File

@@ -195,19 +195,19 @@ MASS SPECTROMETER
for(var/mob/O in viewers(M, null)) for(var/mob/O in viewers(M, null))
O.show_message(text("\red [] has analyzed []'s vitals!", user, M), 1) O.show_message(text("\red [] has analyzed []'s vitals!", user, M), 1)
//Foreach goto(67) //Foreach goto(67)
var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.fireloss + M.getBruteLoss()))) var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
if((M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath)) if((M.reagents && M.reagents.has_reagent("zombiepowder")) || (M.changeling && M.changeling.changeling_fakedeath))
user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1) user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, "dead"), 1)
user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.fireloss > 50 ? "\red[M.fireloss]" : M.fireloss, M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", fake_oxy < 50 ? "\red [fake_oxy]" : fake_oxy , M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1)
else else
user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, (M.stat > 1 ? "dead" : text("[]% healthy", M.health))), 1) user.show_message(text("\blue Analyzing Results for []:\n\t Overall Status: []", M, (M.stat > 1 ? "dead" : text("[]% healthy", M.health))), 1)
user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.fireloss > 50 ? "\red[M.fireloss]" : M.fireloss, M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1) user.show_message(text("\blue \t Damage Specifics: []-[]-[]-[]", M.getOxyLoss() > 50 ? "\red [M.getOxyLoss()]" : M.getOxyLoss(), M.getToxLoss() > 50 ? "\red [M.getToxLoss()]" : M.getToxLoss(), M.getFireLoss() > 50 ? "\red[M.getFireLoss()]" : M.getFireLoss(), M.getBruteLoss() > 50 ? "\red[M.getBruteLoss()]" : M.getBruteLoss()), 1)
user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1) user.show_message("\blue Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)", 1) user.show_message("\blue Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)", 1)
if((M.changeling && M.changeling.changeling_fakedeath) || (M.reagents && M.reagents.has_reagent("zombiepowder"))) if((M.changeling && M.changeling.changeling_fakedeath) || (M.reagents && M.reagents.has_reagent("zombiepowder")))
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.fireloss > 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) 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 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.fireloss > 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) 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.cloneloss)
user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1) user.show_message(text("\red Subject appears to have been imperfectly cloned."), 1)
for(var/datum/disease/D in M.viruses) for(var/datum/disease/D in M.viruses)

View File

@@ -25,7 +25,7 @@
suiciding = 1 suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>" viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
oxyloss = max(175 - getToxLoss() - fireloss - getBruteLoss(), getOxyLoss()) oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth() updatehealth()
/mob/living/carbon/brain/verb/suicide() /mob/living/carbon/brain/verb/suicide()
@@ -48,7 +48,7 @@
if(confirm == "Yes") if(confirm == "Yes")
suiciding = 1 suiciding = 1
viewers(loc) << "\red <b>[src]'s brain is growing dull and lifeless. It looks like it's trying to commit suicide. Somehow.</b>" viewers(loc) << "\red <b>[src]'s brain is growing dull and lifeless. It looks like it's trying to commit suicide. Somehow.</b>"
oxyloss = max(175 - getToxLoss() - fireloss - getBruteLoss(), getOxyLoss()) oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth() updatehealth()
spawn(200) spawn(200)
suiciding = 0 suiciding = 0
@@ -74,7 +74,7 @@
suiciding = 1 suiciding = 1
//instead of killing them instantly, just put them at -175 health and let 'em gasp for a while //instead of killing them instantly, just put them at -175 health and let 'em gasp for a while
viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>" viewers(src) << "\red <b>[src] is attempting to bite \his tongue. It looks like \he's trying to commit suicide.</b>"
oxyloss = max(175 - getToxLoss() - fireloss - getBruteLoss(), getOxyLoss()) oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth() updatehealth()
/mob/living/silicon/ai/verb/suicide() /mob/living/silicon/ai/verb/suicide()
@@ -94,7 +94,7 @@
suiciding = 1 suiciding = 1
viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>" viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>"
//put em at -175 //put em at -175
oxyloss = max(175 - getToxLoss() - fireloss - getBruteLoss(), getOxyLoss()) oxyloss = max(175 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth() updatehealth()
/mob/living/silicon/robot/verb/suicide() /mob/living/silicon/robot/verb/suicide()
@@ -114,7 +114,7 @@
suiciding = 1 suiciding = 1
viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>" viewers(src) << "\red <b>[src] is powering down. It looks like \he's trying to commit suicide.</b>"
//put em at -175 //put em at -175
oxyloss = max(475 - getToxLoss() - fireloss - getBruteLoss(), getOxyLoss()) oxyloss = max(475 - getToxLoss() - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth() updatehealth()
/mob/living/silicon/pai/verb/suicide() /mob/living/silicon/pai/verb/suicide()
@@ -149,7 +149,7 @@
suiciding = 1 suiciding = 1
viewers(src) << "\red <b>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</b>" viewers(src) << "\red <b>[src] is thrashing wildly! It looks like \he's trying to commit suicide.</b>"
//put em at -175 //put em at -175
oxyloss = max(100 - fireloss - getBruteLoss(), getOxyLoss()) oxyloss = max(100 - getFireLoss() - getBruteLoss(), getOxyLoss())
updatehealth() updatehealth()

View File

@@ -1201,7 +1201,7 @@ datum
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(40)) M:oxyloss-- if(M:getOxyLoss() && prob(40)) M:oxyloss--
if(M:getBruteLoss() && 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:getFireLoss() && prob(40)) M:heal_organ_damage(0,1)
if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1) if(M:getToxLoss() && prob(40)) M:adjustToxLoss(-1)
..() ..()
return return
@@ -1694,7 +1694,7 @@ datum
if(prob(40)) if(prob(40))
M.take_organ_damage(0, 1) M.take_organ_damage(0, 1)
if(prob(80) && istype(M, /mob/living/carbon/metroid)) if(prob(80) && istype(M, /mob/living/carbon/metroid))
M.fireloss += rand(5,20) M.adjustFireLoss(rand(5,20))
M << "\red You feel a terrible chill inside your body!" M << "\red You feel a terrible chill inside your body!"
..() ..()
return return
@@ -1944,7 +1944,7 @@ datum
on_mob_life(var/mob/living/M as mob) on_mob_life(var/mob/living/M as mob)
M:nutrition += nutriment_factor M:nutrition += nutriment_factor
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:fireloss && prob(20)) M:heal_organ_damage(0,1) if(M:getFireLoss() && prob(20)) M:heal_organ_damage(0,1)
M:nutrition++ M:nutrition++
..() ..()
return return
@@ -3032,7 +3032,7 @@ datum
if(!M) M = holder.my_atom if(!M) M = holder.my_atom
if(M:getOxyLoss() && prob(50)) M:oxyloss -= 2 if(M:getOxyLoss() && prob(50)) M:oxyloss -= 2
if(M:getBruteLoss() && 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:getFireLoss() && prob(50)) M:heal_organ_damage(0,2)
if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2) if(M:getToxLoss() && prob(50)) M:adjustToxLoss(-2)
if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15) if(M.dizziness !=0) M.dizziness = max(0,M.dizziness-15)
if(M.confused !=0) M.confused = max(0,M.confused - 5) if(M.confused !=0) M.confused = max(0,M.confused - 5)

View File

@@ -43,14 +43,14 @@
bruteloss = max(getBruteLoss(), 0) bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0) toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0) oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0) fireloss = max(getFireLoss(), 0)
if(stat) if(stat)
stat = 0 stat = 0
return return
proc/UpdateDamage() proc/UpdateDamage()
health = 60 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 60 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + cloneloss)
return return

View File

@@ -20,7 +20,7 @@
if (src.nodamage == 0) if (src.nodamage == 0)
//oxyloss is only used for suicide //oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!! //toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 150 - src.getOxyLoss() - src.fireloss - src.getBruteLoss() src.health = 150 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
else else
src.health = 150 src.health = 150
src.stat = 0 src.stat = 0
@@ -71,12 +71,12 @@
toxloss = max_plasma toxloss = max_plasma
else else
bruteloss -= 5 adjustBruteLoss(-5)
fireloss -= 5 adjustFireLoss(-5)
handle_regular_status_updates() handle_regular_status_updates()
health = 150 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss) health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)

View File

@@ -20,7 +20,7 @@
if (src.nodamage == 0) if (src.nodamage == 0)
//oxyloss is only used for suicide //oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!! //toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 125 - src.getOxyLoss() - src.fireloss - src.getBruteLoss() src.health = 125 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
else else
src.health = 125 src.health = 125
src.stat = 0 src.stat = 0
@@ -71,13 +71,13 @@
toxloss = max_plasma toxloss = max_plasma
else else
bruteloss -= 10 adjustBruteLoss(-10)
fireloss -= 10 adjustFireLoss(-10)
handle_regular_status_updates() handle_regular_status_updates()
health = 150 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss) health = 150 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)

View File

@@ -122,7 +122,7 @@
ear_deaf += 60 ear_deaf += 60
bruteloss += b_loss bruteloss += b_loss
fireloss += f_loss adjustFireLoss(f_loss)
updatehealth() updatehealth()
@@ -140,7 +140,7 @@
show_message("\red The blob attacks!") show_message("\red The blob attacks!")
fireloss += damage adjustFireLoss(damage)
return return
@@ -225,7 +225,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1) M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0) if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25) bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
fireloss += 30 adjustFireLoss(30)
updatehealth() updatehealth()
return return
@@ -553,7 +553,7 @@
s.start() s.start()
if (prob(stunprob) && M.powerlevel >= 8) if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10) adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth() updatehealth()
@@ -755,7 +755,7 @@ In all, this is a lot like the monkey code. /N
if (nodamage == 0) if (nodamage == 0)
//oxyloss is only used for suicide //oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!! //toxloss isn't used for aliens, its actually used as alien powers!!
health = 100 - getOxyLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getFireLoss() - getBruteLoss()
else else
health = 100 health = 100
stat = 0 stat = 0

View File

@@ -84,10 +84,10 @@
paralysis = max(min(paralysis, 20), 0) paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0) weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0) sleeping = max(min(sleeping, 20), 0)
bruteloss = max(getBruteLoss(), 0) adjustBruteLoss(0)
toxloss = max(getToxLoss(), 0) adjustToxLoss(0)
oxyloss = max(getOxyLoss(), 0) adjustOxyLoss(0)
fireloss = max(fireloss, 0) adjustFireLoss(0)
handle_disabilities() handle_disabilities()
@@ -121,13 +121,13 @@
handle_mutations_and_radiation() handle_mutations_and_radiation()
if(src.fireloss) if(src.getFireLoss())
if(src.mutations & COLD_RESISTANCE || prob(50)) if(src.mutations & COLD_RESISTANCE || prob(50))
switch(src.fireloss) switch(src.getFireLoss())
if(1 to 50) if(1 to 50)
src.fireloss-- src.adjustFireLoss(-1)
if(51 to 100) if(51 to 100)
src.fireloss -= 5 src.adjustFireLoss(-5)
if (src.mutations & HULK && src.health <= 25) if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK src.mutations &= ~HULK
@@ -300,8 +300,8 @@
toxloss = max_plasma toxloss = max_plasma
else else
bruteloss -= 15 adjustBruteLoss(-15)
fireloss -= 15 adjustFireLoss(-15)
@@ -396,7 +396,7 @@
handle_regular_status_updates() handle_regular_status_updates()
health = 100 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss) health = 100 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)

View File

@@ -23,7 +23,7 @@
if (src.nodamage == 0) if (src.nodamage == 0)
//oxyloss is only used for suicide //oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!! //toxloss isn't used for aliens, its actually used as alien powers!!
src.health = 250 - src.getOxyLoss() - src.fireloss - src.getBruteLoss() src.health = 250 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
else else
src.health = 250 src.health = 250
src.stat = 0 src.stat = 0
@@ -74,11 +74,11 @@
toxloss = max_plasma toxloss = max_plasma
else else
bruteloss -= 5 bruteloss -= 5
fireloss -= 5 adjustFireLoss(-5)
handle_regular_status_updates() handle_regular_status_updates()
health = 250 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss) health = 250 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)

View File

@@ -110,7 +110,7 @@
ear_deaf += 60 ear_deaf += 60
bruteloss += b_loss bruteloss += b_loss
fireloss += f_loss adjustFireLoss(f_loss)
updatehealth() updatehealth()
@@ -132,7 +132,7 @@
show_message("\red The blob attacks you!") show_message("\red The blob attacks you!")
fireloss += damage adjustFireLoss(damage)
updatehealth() updatehealth()
return return
@@ -151,7 +151,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1) M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0) if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25) bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
fireloss += 30 adjustFireLoss(30)
updatehealth() updatehealth()
return return
@@ -503,7 +503,7 @@
if (nodamage == 0) if (nodamage == 0)
//oxyloss is only used for suicide //oxyloss is only used for suicide
//toxloss isn't used for aliens, its actually used as alien powers!! //toxloss isn't used for aliens, its actually used as alien powers!!
health = 25 - getOxyLoss() - fireloss - getBruteLoss() health = 25 - getOxyLoss() - getFireLoss() - getBruteLoss()
else else
health = 25 health = 25
stat = 0 stat = 0

View File

@@ -85,7 +85,7 @@
bruteloss = max(getBruteLoss(), 0) bruteloss = max(getBruteLoss(), 0)
toxloss = max(getToxLoss(), 0) toxloss = max(getToxLoss(), 0)
oxyloss = max(getOxyLoss(), 0) oxyloss = max(getOxyLoss(), 0)
fireloss = max(fireloss, 0) adjustFireLoss(0)
handle_mutations_and_radiation() handle_mutations_and_radiation()
@@ -279,7 +279,7 @@
adjustToxLoss(5) adjustToxLoss(5)
else else
bruteloss -= 5 bruteloss -= 5
fireloss -= 5 adjustFireLoss(-5)
return return
@@ -323,7 +323,7 @@
handle_regular_status_updates() handle_regular_status_updates()
health = 25 - (getOxyLoss() + fireloss + getBruteLoss() + cloneloss) health = 25 - (getOxyLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)

View File

@@ -20,7 +20,7 @@
handle_regular_status_updates() handle_regular_status_updates()
health = 200 - (getOxyLoss() + fireloss + getBruteLoss()) health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
weakened = 0 weakened = 0
stunned = 0 stunned = 0
@@ -43,7 +43,7 @@
return 1 return 1
updatehealth() updatehealth()
src.health = 200 - src.getOxyLoss() - src.fireloss - src.getBruteLoss() src.health = 200 - src.getOxyLoss() - src.getFireLoss() - src.getBruteLoss()
xcom_attack(mob/living/carbon/human/target as mob) xcom_attack(mob/living/carbon/human/target as mob)
if(!ishuman(target)) if(!ishuman(target))

View File

@@ -45,10 +45,10 @@
stunned = max(stunned,0) stunned = max(stunned,0)
paralysis = max(paralysis, 0) paralysis = max(paralysis, 0)
weakened = max(weakened, 0) weakened = max(weakened, 0)
bruteloss = max(getBruteLoss(), 0) adjustBruteLoss(0)
fireloss = max(fireloss, 0) adjustFireLoss(0)
oxyloss = max(getOxyLoss(), 0) adjustOxyLoss(0)
toxloss = max(getToxLoss(), 0) adjustToxLoss(0)
handle_mutations_and_radiation() handle_mutations_and_radiation()
@@ -117,8 +117,8 @@
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(nodamage) return if(nodamage) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//fireloss += 2.5*discomfort //adjustFireLoss(2.5*discomfort)
fireloss += 5.0*discomfort adjustFireLoss(5.0*discomfort)
handle_chemicals_in_body() handle_chemicals_in_body()
@@ -144,7 +144,7 @@
handle_regular_status_updates() handle_regular_status_updates()
health = 100 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 25) paralysis = max(paralysis, 3) if(getOxyLoss() > 25) paralysis = max(paralysis, 3)

View File

@@ -126,7 +126,7 @@
return 0 return 0
src.take_overall_damage(0,shock_damage) src.take_overall_damage(0,shock_damage)
//src.burn_skin(shock_damage) //src.burn_skin(shock_damage)
//src.fireloss += shock_damage //burn_skin will do this for us //src.adjustFireLoss(shock_damage) //burn_skin will do this for us
//src.updatehealth() //src.updatehealth()
src.visible_message( src.visible_message(
"\red [src] was shocked by the [source]!", \ "\red [src] was shocked by the [source]!", \

View File

@@ -127,8 +127,8 @@
else else
usr << "\red <B>[src.name] looks very... unfinished?</B>" usr << "\red <B>[src.name] looks very... unfinished?</B>"
if (src.fireloss) if (src.getFireLoss())
if (src.fireloss < 30) if (src.getFireLoss() < 30)
usr << "\red [src.name] looks slightly burned!" usr << "\red [src.name] looks slightly burned!"
else else
usr << "\red <B>[src.name] looks severely burned!</B>" usr << "\red <B>[src.name] looks severely burned!</B>"

View File

@@ -1165,7 +1165,7 @@
s.start() s.start()
if (prob(stunprob) && M.powerlevel >= 8) if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10) adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth() updatehealth()
@@ -2190,12 +2190,12 @@ It can still be worn/put on as normal.
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0
return return
bruteloss = 0 adjustBruteLoss(-getBruteLoss())
fireloss = 0 adjustFireLoss(-getFireLoss())
for(var/datum/organ/external/O in organs) for(var/datum/organ/external/O in organs)
src.bruteloss += O.brute_dam src.adjustBruteLoss(O.brute_dam)
src.fireloss += O.burn_dam src.adjustFireLoss(O.burn_dam)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() - src.cloneloss src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.getCloneLoss()
/mob/living/carbon/human/abiotic(var/full_body = 0) /mob/living/carbon/human/abiotic(var/full_body = 0)

View File

@@ -11,12 +11,12 @@
/mob/living/carbon/human/proc/UpdateDamage() /mob/living/carbon/human/proc/UpdateDamage()
bruteloss = 0 adjustBruteLoss(-getBruteLoss())
fireloss = 0 adjustFireLoss(-getFireLoss())
for(var/datum/organ/external/O in organs) for(var/datum/organ/external/O in organs)
if(istype(O, /datum/organ/external)) if(istype(O, /datum/organ/external))
bruteloss += O.brute_dam bruteloss += O.brute_dam
fireloss += O.burn_dam adjustFireLoss(O.burn_dam)
return return
// new damage icon system // new damage icon system

View File

@@ -102,10 +102,10 @@
paralysis = max(min(paralysis, 20), 0) paralysis = max(min(paralysis, 20), 0)
weakened = max(min(weakened, 20), 0) weakened = max(min(weakened, 20), 0)
sleeping = max(min(sleeping, 20), 0) sleeping = max(min(sleeping, 20), 0)
bruteloss = max(getBruteLoss(), 0) adjustBruteLoss(0)
toxloss = max(getToxLoss(), 0) adjustToxLoss(0)
oxyloss = max(getOxyLoss(), 0) adjustOxyLoss(0)
fireloss = max(fireloss, 0) adjustFireLoss(0)
update_mind() update_mind()
@@ -166,7 +166,7 @@
handle_mutations_and_radiation() handle_mutations_and_radiation()
if(fireloss) if(getFireLoss())
if(mutations & COLD_RESISTANCE || (prob(1) && prob(75))) if(mutations & COLD_RESISTANCE || (prob(1) && prob(75)))
heal_organ_damage(0,1) heal_organ_damage(0,1)
@@ -414,7 +414,7 @@
var/thermal_protection = get_thermal_protection() var/thermal_protection = get_thermal_protection()
//world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [fireloss] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)]" //world << "Loc temp: [loc_temp] - Body temp: [bodytemperature] - Fireloss: [getFireLoss()] - Thermal protection: [get_thermal_protection()] - Fire protection: [thermal_protection + add_fire_protection(loc_temp)]"
if(stat != 2 && abs(bodytemperature - 310.15) < 50) if(stat != 2 && abs(bodytemperature - 310.15) < 50)
bodytemperature += adjust_body_temperature(bodytemperature, 310.15, thermal_protection) bodytemperature += adjust_body_temperature(bodytemperature, 310.15, thermal_protection)
@@ -601,7 +601,7 @@
if(nutrition < 500) //so they can't store nutrition to survive without light forever if(nutrition < 500) //so they can't store nutrition to survive without light forever
nutrition += light_amount nutrition += light_amount
if(light_amount > 0) //if there's enough light, heal if(light_amount > 0) //if there's enough light, heal
if(fireloss) if(getFireLoss())
heal_overall_damage(0,1) heal_overall_damage(0,1)
if(getBruteLoss()) if(getBruteLoss())
heal_overall_damage(1,0) heal_overall_damage(1,0)
@@ -656,7 +656,7 @@
handle_regular_status_updates() handle_regular_status_updates()
// health = 100 - (getOxyLoss() + getToxLoss() + fireloss + bruteloss + cloneloss) // health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)
@@ -1069,7 +1069,7 @@ snippets
if(bodytemperature < 282.591 && (!firemut)) if(bodytemperature < 282.591 && (!firemut))
if(bodytemperature < 250) if(bodytemperature < 250)
fireloss += 4 adjustFireLoss(4)
updatehealth() updatehealth()
if(paralysis <= 2) paralysis += 2 if(paralysis <= 2) paralysis += 2
else if(prob(1) && !paralysis) else if(prob(1) && !paralysis)
@@ -1080,7 +1080,7 @@ snippets
if(bodytemperature > 345.444) if(bodytemperature > 345.444)
if(!eye_blurry) src << "\red The heat blurs your vision!" if(!eye_blurry) src << "\red The heat blurs your vision!"
eye_blurry = max(4, eye_blurry) eye_blurry = max(4, eye_blurry)
if(prob(3)) fireloss += rand(1,2) if(prob(3)) adjustFireLoss(rand(1,2))
else if(prob(3) && !paralysis) else if(prob(3) && !paralysis)
paralysis += 2 paralysis += 2
emote("collapse") emote("collapse")

View File

@@ -314,7 +314,7 @@
handle_environment(datum/gas_mixture/environment) handle_environment(datum/gas_mixture/environment)
if(!environment) if(!environment)
fireloss += rand(10,20) adjustFireLoss(rand(10,20))
return return
//var/environment_heat_capacity = environment.heat_capacity() //var/environment_heat_capacity = environment.heat_capacity()
@@ -356,7 +356,7 @@
Tempstun = 1 Tempstun = 1
if(bodytemperature <= (T0C - 50)) // hurt temperature if(bodytemperature <= (T0C - 50)) // hurt temperature
fireloss += round(sqrt(bodytemperature)) * 2 adjustFireLoss(round(sqrt(bodytemperature)) * 2)
else else
Tempstun = 0 Tempstun = 0
@@ -396,9 +396,9 @@
handle_regular_status_updates() handle_regular_status_updates()
if(istype(src, /mob/living/carbon/metroid/adult)) if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else else
health = 150 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
@@ -418,7 +418,7 @@
if(prob(30)) if(prob(30))
if(getOxyLoss()>0) oxyloss = max(getOxyLoss()-1, 0) if(getOxyLoss()>0) oxyloss = max(getOxyLoss()-1, 0)
if(getToxLoss()>0) adjustToxLoss(-1) if(getToxLoss()>0) adjustToxLoss(-1)
if(fireloss>0) fireloss = max(fireloss-1,0) if(getFireLoss()>0) adjustFireLoss(-1)
if(cloneloss>0) cloneloss = max(cloneloss-1,0) if(cloneloss>0) cloneloss = max(cloneloss-1,0)
if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0) if(getBruteLoss()>0) bruteloss = max(getBruteLoss()-1,0)

View File

@@ -175,7 +175,7 @@
b_loss += 30 b_loss += 30
bruteloss += b_loss bruteloss += b_loss
fireloss += f_loss adjustFireLoss(f_loss)
updatehealth() updatehealth()
@@ -196,7 +196,7 @@
show_message("\red The blob attacks you!") show_message("\red The blob attacks you!")
fireloss += damage adjustFireLoss(damage)
updatehealth() updatehealth()
return return
@@ -215,7 +215,7 @@
M.show_message(text("\red [] has been hit by []", src, O), 1) M.show_message(text("\red [] has been hit by []", src, O), 1)
if (health > 0) if (health > 0)
bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25) bruteloss += (istype(O, /obj/effect/meteor/small) ? 10 : 25)
fireloss += 30 adjustFireLoss(30)
updatehealth() updatehealth()
return return
@@ -648,9 +648,9 @@ mob/living/carbon/metroid/var/temperature_resistance = T0C+75
if (nodamage == 0) if (nodamage == 0)
// metroids can't suffocate unless they suicide. They are also not harmed by fire // metroids can't suffocate unless they suicide. They are also not harmed by fire
if(istype(src, /mob/living/carbon/metroid/adult)) if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 200 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else else
health = 150 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 150 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
else else
if(istype(src, /mob/living/carbon/metroid/adult)) if(istype(src, /mob/living/carbon/metroid/adult))
health = 200 health = 200

View File

@@ -85,22 +85,22 @@
if(getBruteLoss() > 0) if(getBruteLoss() > 0)
bruteloss = max(0, getBruteLoss()-10) bruteloss = max(0, getBruteLoss()-10)
if(fireloss > 0) if(getFireLoss() > 0)
fireloss = max(0, fireloss-10) adjustFireLoss(-10)
if(cloneloss > 0) if(getCloneLoss() > 0)
cloneloss = max(0, cloneloss-10) adjustCloneLoss(-10)
if(Victim) if(Victim)
for(var/mob/living/carbon/metroid/Metroid in view(1,M)) for(var/mob/living/carbon/metroid/Metroid in view(1,M))
if(Metroid.Victim == M && Metroid != src) if(Metroid.Victim == M && Metroid != src)
Metroid.Feedstop() Metroid.Feedstop()
if(getToxLoss()<0) toxloss = 0 if(getToxLoss()<0) adjustToxLoss(0)
if(getOxyLoss()<0) oxyloss = 0 if(getOxyLoss()<0) adjustOxyLoss(0)
if(getBruteLoss()<0) bruteloss = 0 if(getBruteLoss()<0) adjustBruteLoss(0)
if(fireloss<0) fireloss = 0 if(getFireLoss()<0) adjustFireLoss(0)
if(cloneloss<0) cloneloss = 0 if(getCloneLoss()<0) adjustCloneLoss(0)
nutrition += rand(10,25) nutrition += rand(10,25)
if(nutrition >= lastnut + 50) if(nutrition >= lastnut + 50)

View File

@@ -21,8 +21,8 @@
usr << text("\red [] looks slightly bruised!", src.name) usr << text("\red [] looks slightly bruised!", src.name)
else else
usr << text("\red <B>[] looks severely bruised!</B>", src.name) usr << text("\red <B>[] looks severely bruised!</B>", src.name)
if (src.fireloss) if (src.getFireLoss())
if (src.fireloss < 30) if (src.getFireLoss() < 30)
usr << text("\red [] looks slightly burnt!", src.name) usr << text("\red [] looks slightly burnt!", src.name)
else else
usr << text("\red <B>[] looks severely burnt!</B>", src.name) usr << text("\red <B>[] looks severely burnt!</B>", src.name)

View File

@@ -124,13 +124,13 @@
handle_mutations_and_radiation() handle_mutations_and_radiation()
if(src.fireloss) if(src.getFireLoss())
if(src.mutations & COLD_RESISTANCE || prob(50)) if(src.mutations & COLD_RESISTANCE || prob(50))
switch(src.fireloss) switch(src.getFireLoss())
if(1 to 50) if(1 to 50)
src.fireloss-- src.adjustFireLoss(-1)
if(51 to 100) if(51 to 100)
src.fireloss -= 5 src.adjustFireLoss(-5)
if (src.mutations & HULK && src.health <= 25) if (src.mutations & HULK && src.health <= 25)
src.mutations &= ~HULK src.mutations &= ~HULK
@@ -370,8 +370,8 @@
handle_temperature_damage(body_part, exposed_temperature, exposed_intensity) handle_temperature_damage(body_part, exposed_temperature, exposed_intensity)
if(src.nodamage) return if(src.nodamage) return
var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0) var/discomfort = min( abs(exposed_temperature - bodytemperature)*(exposed_intensity)/2000000, 1.0)
//fireloss += 2.5*discomfort //adjustFireLoss(2.5*discomfort)
fireloss += 5.0*discomfort adjustFireLoss(5.0*discomfort)
handle_chemicals_in_body() handle_chemicals_in_body()
@@ -397,7 +397,7 @@
handle_regular_status_updates() handle_regular_status_updates()
health = 100 - (getOxyLoss() + getToxLoss() + fireloss + getBruteLoss() + cloneloss) health = 100 - (getOxyLoss() + getToxLoss() + getFireLoss() + getBruteLoss() + getCloneLoss())
if(getOxyLoss() > 25) paralysis = max(paralysis, 3) if(getOxyLoss() > 25) paralysis = max(paralysis, 3)

View File

@@ -102,8 +102,8 @@
var/shielded = 0 var/shielded = 0
bruteloss += 30 bruteloss += 30
if ((O.icon_state == "flaming" && !( shielded ))) if ((O.icon_state == "flaming" && !( shielded )))
fireloss += 40 adjustFireLoss(40)
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
return return
//mob/living/carbon/monkey/bullet_act(var/obj/item/projectile/Proj)taken care of in living //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) O.show_message("\red <B>[M.name] has bit [name]!</B>", 1)
var/damage = rand(1, 5) var/damage = rand(1, 5)
bruteloss += damage bruteloss += damage
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
for(var/datum/disease/D in M.viruses) for(var/datum/disease/D in M.viruses)
if(istype(D, /datum/disease/jungle_fever)) if(istype(D, /datum/disease/jungle_fever))
contract_disease(D,1,0) contract_disease(D,1,0)
@@ -371,7 +371,7 @@
s.start() s.start()
if (prob(stunprob) && M.powerlevel >= 8) if (prob(stunprob) && M.powerlevel >= 8)
fireloss += M.powerlevel * rand(6,10) adjustFireLoss(M.powerlevel * rand(6,10))
updatehealth() updatehealth()
@@ -535,17 +535,17 @@
switch(severity) switch(severity)
if(1.0) if(1.0)
if (stat != 2) if (stat != 2)
bruteloss += 200 adjustBruteLoss(200)
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if(2.0) if(2.0)
if (stat != 2) if (stat != 2)
bruteloss += 60 bruteloss += 60
fireloss += 60 adjustFireLoss(60)
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if(3.0) if(3.0)
if (stat != 2) if (stat != 2)
bruteloss += 30 adjustBruteLoss(30)
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (prob(50)) if (prob(50))
paralysis += 10 paralysis += 10
else else
@@ -553,8 +553,8 @@
/mob/living/carbon/monkey/blob_act() /mob/living/carbon/monkey/blob_act()
if (stat != 2) if (stat != 2)
fireloss += 60 adjustFireLoss(60)
health = 100 - getOxyLoss() - getToxLoss() - fireloss - getBruteLoss() health = 100 - getOxyLoss() - getToxLoss() - getFireLoss() - getBruteLoss()
if (prob(50)) if (prob(50))
paralysis += 10 paralysis += 10

View File

@@ -15,7 +15,7 @@
bruteloss += (damage/(blocked+1)) bruteloss += (damage/(blocked+1))
if(BURN) if(BURN)
if(mutations & COLD_RESISTANCE) damage = 0 if(mutations & COLD_RESISTANCE) damage = 0
fireloss += (damage/(blocked+1)) adjustFireLoss(damage/(blocked+1))
if(TOX) if(TOX)
adjustToxLoss(damage/(blocked+1)) adjustToxLoss(damage/(blocked+1))
if(OXY) if(OXY)

View File

@@ -2,13 +2,13 @@
set hidden = 1 set hidden = 1
if ((src.health < 0 && src.health > -95.0)) if ((src.health < 0 && src.health > -95.0))
src.oxyloss += src.health + 200 src.oxyloss += src.health + 200
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
src << "\blue You have given up life and succumbed to death." src << "\blue You have given up life and succumbed to death."
/mob/living/proc/updatehealth() /mob/living/proc/updatehealth()
if(!src.nodamage) if(!src.nodamage)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() - src.cloneloss src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss() - src.cloneloss
else else
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0
@@ -36,7 +36,7 @@
if (src.mutations & COLD_RESISTANCE) //fireproof if (src.mutations & COLD_RESISTANCE) //fireproof
return 0 return 0
var/mob/living/carbon/monkey/M = src var/mob/living/carbon/monkey/M = src
M.fireloss += burn_amount M.adjustFireLoss(burn_amount)
M.updatehealth() M.updatehealth()
return 1 return 1
else if(istype(src, /mob/living/silicon/ai)) else if(istype(src, /mob/living/silicon/ai))
@@ -112,25 +112,25 @@
// heal ONE external organ, organ gets randomly selected from damaged ones. // heal ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/heal_organ_damage(var/brute, var/burn) /mob/living/proc/heal_organ_damage(var/brute, var/burn)
bruteloss = max(0, getBruteLoss()-brute) bruteloss = max(0, getBruteLoss()-brute)
fireloss = max(0, fireloss-burn) adjustFireLoss(-burn)
src.updatehealth() src.updatehealth()
// damage ONE external organ, organ gets randomly selected from damaged ones. // damage ONE external organ, organ gets randomly selected from damaged ones.
/mob/living/proc/take_organ_damage(var/brute, var/burn) /mob/living/proc/take_organ_damage(var/brute, var/burn)
bruteloss += brute bruteloss += brute
fireloss += burn adjustFireLoss(burn)
src.updatehealth() src.updatehealth()
// heal MANY external organs, in random order // heal MANY external organs, in random order
/mob/living/proc/heal_overall_damage(var/brute, var/burn) /mob/living/proc/heal_overall_damage(var/brute, var/burn)
bruteloss = max(0, getBruteLoss()-brute) bruteloss = max(0, getBruteLoss()-brute)
fireloss = max(0, fireloss-burn) adjustFireLoss(-burn)
src.updatehealth() src.updatehealth()
// damage MANY external organs, in random order // damage MANY external organs, in random order
/mob/living/proc/take_overall_damage(var/brute, var/burn) /mob/living/proc/take_overall_damage(var/brute, var/burn)
bruteloss += brute bruteloss += brute
fireloss += burn adjustFireLoss(burn)
src.updatehealth() src.updatehealth()
/mob/living/proc/revive() /mob/living/proc/revive()

View File

@@ -210,22 +210,19 @@
/mob/living/silicon/ai/ex_act(severity) /mob/living/silicon/ai/ex_act(severity)
flick("flash", flash) flick("flash", flash)
var/b_loss = getBruteLoss()
var/f_loss = fireloss
switch(severity) switch(severity)
if(1.0) if(1.0)
if (stat != 2) if (stat != 2)
b_loss += 100 adjustBruteLoss(100)
f_loss += 100 adjustFireLoss(100)
if(2.0) if(2.0)
if (stat != 2) if (stat != 2)
b_loss += 60 adjustBruteLoss(60)
f_loss += 60 adjustFireLoss(60)
if(3.0) if(3.0)
if (stat != 2) if (stat != 2)
b_loss += 30 adjustBruteLoss(30)
bruteloss = b_loss
fireloss = f_loss
updatehealth() updatehealth()
@@ -271,7 +268,7 @@
if (health > 0) if (health > 0)
bruteloss += 30 bruteloss += 30
if ((O.icon_state == "flaming")) if ((O.icon_state == "flaming"))
fireloss += 40 adjustFireLoss(40)
updatehealth() updatehealth()
return return

View File

@@ -11,8 +11,8 @@
usr << text("\red [] looks slightly dented", src.name) usr << text("\red [] looks slightly dented", src.name)
else else
usr << text("\red <B>[] looks severely dented!</B>", src.name) usr << text("\red <B>[] looks severely dented!</B>", src.name)
if (src.fireloss) if (src.getFireLoss())
if (src.fireloss < 30) if (src.getFireLoss() < 30)
usr << text("\red [] looks slightly burnt!", src.name) usr << text("\red [] looks slightly burnt!", src.name)
else else
usr << text("\red <B>[] looks severely burnt!</B>", src.name) usr << text("\red <B>[] looks severely burnt!</B>", src.name)

View File

@@ -20,7 +20,7 @@
/*if (istype(T, /turf)) /*if (istype(T, /turf))
var/ficheck = src.firecheck(T) var/ficheck = src.firecheck(T)
if (ficheck) if (ficheck)
src.fireloss += ficheck * 10 src.adjustFireLoss(ficheck * 10)
src.updatehealth() src.updatehealth()
if (src.fire) if (src.fire)
src.fire.icon_state = "fire1" src.fire.icon_state = "fire1"
@@ -241,7 +241,7 @@
if(src.fire_res_on_core) if(src.fire_res_on_core)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getBruteLoss() src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getBruteLoss()
else else
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
else else
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0

View File

@@ -9,7 +9,7 @@
/mob/living/silicon/decoy/updatehealth() /mob/living/silicon/decoy/updatehealth()
if (src.nodamage == 0) if (src.nodamage == 0)
src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.fireloss - src.getBruteLoss() src.health = 100 - src.getOxyLoss() - src.getToxLoss() - src.getFireLoss() - src.getBruteLoss()
else else
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0

View File

@@ -11,8 +11,8 @@
usr << text("\red [] looks slightly dented", src.name) usr << text("\red [] looks slightly dented", src.name)
else else
usr << text("\red <B>[]'s casing appears cracked and broken!</B>", src.name) usr << text("\red <B>[]'s casing appears cracked and broken!</B>", src.name)
if (src.fireloss) if (src.getFireLoss())
if (src.fireloss < 30) if (src.getFireLoss() < 30)
usr << text("\red [] looks slightly charred!", src.name) usr << text("\red [] looks slightly charred!", src.name)
else else
usr << text("\red <B>[]'s casing is melted and heat-warped!</B>", src.name) usr << text("\red <B>[]'s casing is melted and heat-warped!</B>", src.name)

View File

@@ -23,4 +23,4 @@
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0
else else
src.health = 100 - src.getBruteLoss() - src.fireloss src.health = 100 - src.getBruteLoss() - src.getFireLoss()

View File

@@ -83,22 +83,19 @@
/mob/living/silicon/pai/ex_act(severity) /mob/living/silicon/pai/ex_act(severity)
flick("flash", src.flash) flick("flash", src.flash)
var/b_loss = src.getBruteLoss()
var/f_loss = src.fireloss
switch(severity) switch(severity)
if(1.0) if(1.0)
if (src.stat != 2) if (src.stat != 2)
b_loss += 100 adjustBruteLoss(100)
f_loss += 100 adjustFireLoss(100)
if(2.0) if(2.0)
if (src.stat != 2) if (src.stat != 2)
b_loss += 60 adjustBruteLoss(60)
f_loss += 60 adjustFireLoss(60)
if(3.0) if(3.0)
if (src.stat != 2) if (src.stat != 2)
b_loss += 30 adjustBruteLoss(30)
src.bruteloss = b_loss
src.fireloss = f_loss
src.updatehealth() src.updatehealth()
@@ -108,9 +105,9 @@
for(var/mob/M in viewers(src, null)) for(var/mob/M in viewers(src, null))
M.show_message(text("\red [] has been hit by []", src, O), 1) M.show_message(text("\red [] has been hit by []", src, O), 1)
if (src.health > 0) if (src.health > 0)
src.bruteloss += 30 src.adjustBruteLoss(30)
if ((O.icon_state == "flaming")) if ((O.icon_state == "flaming"))
src.fireloss += 40 src.adjustFireLoss(40)
src.updatehealth() src.updatehealth()
return return

View File

@@ -471,7 +471,7 @@
Scan Breakdown: <br> Scan Breakdown: <br>
Respiratory: [M.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getOxyLoss()]</font><br> Respiratory: [M.getOxyLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getOxyLoss()]</font><br>
Toxicology: [M.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getToxLoss()]</font><br> Toxicology: [M.getToxLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getToxLoss()]</font><br>
Burns: [M.fireloss > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.fireloss]</font><br> Burns: [M.getFireLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getFireLoss()]</font><br>
Structural Integrity: [M.getBruteLoss() > 50 ? "<font color=#FF5555>" : "<font color=#55FF55>"][M.getBruteLoss()]</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> Body Temperature: [M.bodytemperature-T0C]&deg;C ([M.bodytemperature*1.8-459.67]&deg;F)<br>
"} "}

View File

@@ -10,8 +10,8 @@
usr << text("\red [src.name] looks slightly dented") usr << text("\red [src.name] looks slightly dented")
else else
usr << text("\red <B>[src.name] looks severely dented!</B>") usr << text("\red <B>[src.name] looks severely dented!</B>")
if (src.fireloss) if (src.getFireLoss())
if (src.fireloss < 75) if (src.getFireLoss() < 75)
usr << text("\red [src.name] looks slightly burnt!") usr << text("\red [src.name] looks slightly burnt!")
else else
usr << text("\red <B>[src.name] looks severely burnt!</B>") usr << text("\red <B>[src.name] looks severely burnt!</B>")

View File

@@ -34,10 +34,10 @@
paralysis = max(min(paralysis, 30), 0) paralysis = max(min(paralysis, 30), 0)
weakened = max(min(weakened, 20), 0) weakened = max(min(weakened, 20), 0)
sleeping = 0 sleeping = 0
bruteloss = max(getBruteLoss(), 0) adjustBruteLoss(0)
toxloss = max(getToxLoss(), 0) adjustToxLoss(0)
oxyloss = max(getOxyLoss(), 0) adjustOxyLoss(0)
fireloss = max(fireloss, 0) adjustFireLoss(0)
use_power() use_power()
@@ -87,7 +87,7 @@
if(src.stat) if(src.stat)
src.camera.status = 0 src.camera.status = 0
health = 200 - (getOxyLoss() + fireloss + getBruteLoss()) health = 200 - (getOxyLoss() + getFireLoss() + getBruteLoss())
if(getOxyLoss() > 50) paralysis = max(paralysis, 3) if(getOxyLoss() > 50) paralysis = max(paralysis, 3)

View File

@@ -196,24 +196,21 @@
del(src) del(src)
return return
var/b_loss = getBruteLoss()
var/f_loss = fireloss
switch(severity) switch(severity)
if(1.0) if(1.0)
if (stat != 2) if (stat != 2)
b_loss += 100 adjustBruteLoss(100)
f_loss += 100 adjustFireLoss(100)
gib(1) gib(1)
return return
if(2.0) if(2.0)
if (stat != 2) if (stat != 2)
b_loss += 60 adjustBruteLoss(60)
f_loss += 60 adjustFireLoss(60)
if(3.0) if(3.0)
if (stat != 2) if (stat != 2)
b_loss += 30 adjustBruteLoss(30)
bruteloss = b_loss
fireloss = f_loss
updatehealth() updatehealth()
@@ -224,7 +221,7 @@
if (health > 0) if (health > 0)
bruteloss += 30 bruteloss += 30
if ((O.icon_state == "flaming")) if ((O.icon_state == "flaming"))
fireloss += 40 adjustFireLoss(40)
updatehealth() updatehealth()
return return
@@ -328,8 +325,8 @@
else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed) else if(istype(W, /obj/item/weapon/cable_coil) && wiresexposed)
var/obj/item/weapon/cable_coil/coil = W var/obj/item/weapon/cable_coil/coil = W
fireloss -= 30 adjustFireLoss(-30)
if(fireloss < 0) fireloss = 0 if(getFireLoss() < 0) adjustFireLoss(0)
updatehealth() updatehealth()
coil.use(1) coil.use(1)
for(var/mob/O in viewers(user, null)) for(var/mob/O in viewers(user, null))

View File

@@ -10,8 +10,8 @@
usr << text("\red [src.name] looks slightly dented") usr << text("\red [src.name] looks slightly dented")
else else
usr << text("\red <B>[src.name] looks severely dented!</B>") usr << text("\red <B>[src.name] looks severely dented!</B>")
if (src.fireloss) if (src.getFireLoss())
if (src.fireloss < 75) if (src.getFireLoss() < 75)
usr << text("\red [src.name] looks slightly burnt!") usr << text("\red [src.name] looks slightly burnt!")
else else
usr << text("\red <B>[src.name] looks severely burnt!</B>") usr << text("\red <B>[src.name] looks severely burnt!</B>")

View File

@@ -68,24 +68,21 @@
del(src) del(src)
return return
var/b_loss = src.getBruteLoss()
var/f_loss = src.fireloss
switch(severity) switch(severity)
if(1.0) if(1.0)
if (src.stat != 2) if (src.stat != 2)
b_loss += 100 adjustBruteLoss(100)
f_loss += 100 adjustFireLoss(100)
src.gib(1) src.gib(1)
return return
if(2.0) if(2.0)
if (src.stat != 2) if (src.stat != 2)
b_loss += 60 adjustBruteLoss(60)
f_loss += 60 adjustFireLoss(60)
if(3.0) if(3.0)
if (src.stat != 2) if (src.stat != 2)
b_loss += 30 adjustBruteLoss(30)
src.bruteloss = b_loss
src.fireloss = f_loss
src.updatehealth() src.updatehealth()
/mob/living/silicon/hivebot/meteorhit(obj/O as obj) /mob/living/silicon/hivebot/meteorhit(obj/O as obj)
@@ -93,9 +90,9 @@
M.show_message(text("\red [src] has been hit by [O]"), 1) M.show_message(text("\red [src] has been hit by [O]"), 1)
//Foreach goto(19) //Foreach goto(19)
if (src.health > 0) if (src.health > 0)
src.bruteloss += 30 src.adjustBruteLoss(30)
if ((O.icon_state == "flaming")) if ((O.icon_state == "flaming"))
src.fireloss += 40 src.adjustFireLoss(40)
src.updatehealth() src.updatehealth()
return return

View File

@@ -35,7 +35,7 @@
bruteloss = max(getBruteLoss(), 0) bruteloss = max(getBruteLoss(), 0)
toxloss = 0 toxloss = 0
oxyloss = 0 oxyloss = 0
fireloss = max(fireloss, 0) adjustFireLoss(0)
use_power() use_power()
@@ -70,7 +70,7 @@
handle_regular_status_updates() handle_regular_status_updates()
health = src.health_max - (fireloss + getBruteLoss()) health = src.health_max - (getFireLoss() + getBruteLoss())
if(health <= 0) if(health <= 0)
death() death()

View File

@@ -34,7 +34,7 @@
/mob/living/silicon/hive_mainframe/updatehealth() /mob/living/silicon/hive_mainframe/updatehealth()
if (src.nodamage == 0) if (src.nodamage == 0)
src.health = 100 - src.fireloss - src.getBruteLoss() src.health = 100 - src.getFireLoss() - src.getBruteLoss()
else else
src.health = 100 src.health = 100
src.stat = 0 src.stat = 0

View File

@@ -38,7 +38,7 @@
var/dat = "\blue Analyzing Results for [C]:\n" var/dat = "\blue Analyzing Results for [C]:\n"
dat += "\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]\n" dat += "\blue \t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]\n"
dat += "\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.fireloss > 50 ? "\red" : "\blue"][C.fireloss]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]\n" dat += "\blue \t Damage Specifics: [C.getOxyLoss() > 50 ? "\red" : "\blue"][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "\red" : "\blue"][C.getToxLoss()]-[C.getFireLoss() > 50 ? "\red" : "\blue"][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "\red" : "\blue"][C.getBruteLoss()]\n"
dat += "\blue \t Key: Suffocation/Toxin/Burns/Brute\n" dat += "\blue \t Key: Suffocation/Toxin/Burns/Brute\n"
dat += "\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)" dat += "\blue \t Body Temperature: [C.bodytemperature-T0C]&deg;C ([C.bodytemperature*1.8-459.67]&deg;F)"
if(C.virus) if(C.virus)