diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm
index 37819f2e2d..f55c1036d5 100644
--- a/code/game/machinery/adv_med.dm
+++ b/code/game/machinery/adv_med.dm
@@ -197,14 +197,27 @@
has_withdrawl = TRUE
break
- occupantData["stat"] = H.stat
- occupantData["health"] = H.health
+ //Vars used if we have FAKEDEATH status.
+ var/occupant_stat
+ var/occupant_health
+ var/oxygen_damage
+ if(H.status_flags & FAKEDEATH)
+ occupant_stat = DEAD
+ occupant_health = -200
+ oxygen_damage = max(H.getOxyLoss(), (300 - (H.getToxLoss() + H.getFireLoss() + H.getBruteLoss())))
+ else
+ occupant_stat = H.stat
+ occupant_health = H.health
+ oxygen_damage = H.getOxyLoss()
+
+ occupantData["stat"] = occupant_stat
+ occupantData["health"] = occupant_health
occupantData["maxHealth"] = H.getMaxHealth()
occupantData["hasVirus"] = H.isInfective()
occupantData["bruteLoss"] = H.getBruteLoss()
- occupantData["oxyLoss"] = H.getOxyLoss()
+ occupantData["oxyLoss"] = oxygen_damage
occupantData["toxLoss"] = H.getToxLoss()
occupantData["fireLoss"] = H.getFireLoss()
@@ -409,7 +422,7 @@
var/mob/living/carbon/human/H = occupant
var/speciestext = H.species.name
if(H.custom_species)
- if(H.species.name == SPECIES_CUSTOM )
+ if(H.species.name == SPECIES_CUSTOM)
// Fully custom species
speciestext = "[H.custom_species]"
dat += span_blue("Sapient Species: [speciestext]") + "
"
@@ -430,8 +443,17 @@
else
t1 = "*dead*"
var/health_text = "\tHealth %: [(occupant.health / occupant.getMaxHealth())*100], ([t1])"
- dat += (occupant.health > (occupant.getMaxHealth() / 2) ? span_blue(health_text) : span_red(health_text))
- dat += "
"
+ var/fake_oxy = max(occupant.getOxyLoss(), (300 - (occupant.getFireLoss() + occupant.getBruteLoss())))
+ var/fake_death = FALSE
+ if(occupant.status_flags & FAKEDEATH)
+ t1 = "*dead*"
+ health_text = "\tHealth %: -100, ([t1])"
+ fake_death = TRUE
+ dat += (span_red(health_text))
+ dat += "
"
+ else
+ dat += (occupant.health > (occupant.getMaxHealth() / 2) ? span_blue(health_text) : span_red(health_text))
+ dat += "
"
if(occupant.IsInfected())
for(var/datum/disease/D in occupant.GetViruses())
@@ -444,9 +466,15 @@
damage_string = "\t-Brute Damage %: [occupant.getBruteLoss()]"
dat += (occupant.getBruteLoss() < 60 ? span_blue(damage_string) : span_red(damage_string)) + "
"
damage_string = "\t-Respiratory Damage %: [occupant.getOxyLoss()]"
- dat += (occupant.getOxyLoss() < 60 ? span_blue(damage_string) : span_red(damage_string)) + "
"
+ if(fake_death)
+ damage_string = "\t-Respiratory Damage %: [fake_oxy]"
+ dat += (span_red(damage_string)) + "
"
+ else
+ dat += (occupant.getOxyLoss() < 60 ? span_blue(damage_string) : span_red(damage_string)) + "
"
damage_string = "\t-Toxin Content %: [occupant.getToxLoss()]"
+ if(fake_death)
+ damage_string = "\t-Toxin Content %: 0"
dat += (occupant.getToxLoss() < 60 ? span_blue(damage_string) : span_red(damage_string)) + "
"
damage_string = "\t-Burn Severity %: [occupant.getFireLoss()]"
@@ -677,18 +705,7 @@
return attack_hand(user)
/obj/machinery/body_scanconsole/power_change()
- /* VOREStation Removal
- if(stat & BROKEN)
- icon_state = "body_scannerconsole-p"
- else if(powered() && !panel_open)
- icon_state = initial(icon_state)
- stat &= ~NOPOWER
- else
- spawn(rand(0, 15))
- icon_state = "body_scannerconsole-p"
- stat |= NOPOWER
- */
- update_icon() //icon_state = "body_scanner_1" //VOREStation Edit - Health display for consoles with light and such.
+ update_icon()
/obj/machinery/body_scanconsole/ex_act(severity)
switch(severity)
diff --git a/code/game/machinery/adv_med_vr.dm b/code/game/machinery/adv_med_vr.dm
index dffd6806c3..7759da93a3 100644
--- a/code/game/machinery/adv_med_vr.dm
+++ b/code/game/machinery/adv_med_vr.dm
@@ -45,6 +45,8 @@
var/state
var/scan = TRUE
var/h_ratio = occupant.health / occupant.getMaxHealth()
+ if(occupant.status_flags & FAKEDEATH)
+ h_ratio = -1 //shows up dead
if(console)
console.update_icon(h_ratio)
diff --git a/code/game/objects/items/devices/hacktool.dm b/code/game/objects/items/devices/hacktool.dm
index 2847023a8c..2cd96d8506 100644
--- a/code/game/objects/items/devices/hacktool.dm
+++ b/code/game/objects/items/devices/hacktool.dm
@@ -114,7 +114,7 @@
is_hacking = 1
// On average hackin takes ~15 seconds. Fairly small random span to discourage people from simply aborting and trying again
// Reduced hack duration to compensate for the reduced functionality, multiplied by door sec level
- var/hack_result = do_after(user, (((10 SECONDS + rand(0, 10 SECONDS) + rand(0, 10 SECONDS))*hackspeed)*D.security_level))
+ var/hack_result = do_after(user, (((10 SECONDS + rand(0, 10 SECONDS) + rand(0, 10 SECONDS))*hackspeed)*D.security_level), target = src)
is_hacking = 0
if(hack_result && in_hack_mode)
diff --git a/code/game/objects/items/devices/scanners/health.dm b/code/game/objects/items/devices/scanners/health.dm
index d67fcc7ec8..d8599c43ea 100644
--- a/code/game/objects/items/devices/scanners/health.dm
+++ b/code/game/objects/items/devices/scanners/health.dm
@@ -72,7 +72,7 @@
user.show_message(dat, 1)
return
- var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
+ var/fake_oxy = max(M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
var/OX = M.getOxyLoss() > 50 ? span_bold("[M.getOxyLoss()]") : M.getOxyLoss()
var/TX = M.getToxLoss() > 50 ? span_bold("[M.getToxLoss()]") : M.getToxLoss()
var/BU = M.getFireLoss() > 50 ? span_bold("[M.getFireLoss()]") : M.getFireLoss()
diff --git a/code/game/objects/items/devices/scanners/sleevemate.dm b/code/game/objects/items/devices/scanners/sleevemate.dm
index 449ae0ab3f..d3b29d94c1 100644
--- a/code/game/objects/items/devices/scanners/sleevemate.dm
+++ b/code/game/objects/items/devices/scanners/sleevemate.dm
@@ -140,7 +140,7 @@ var/global/mob/living/carbon/human/dummy/mannequin/sleevemate_mob
//Body status
output += span_bold("Sleeve Status:") + " "
- if(H.status_flags |= FAKEDEATH)
+ if(H.status_flags & FAKEDEATH)
output += span_warning("Deceased") + "
"
else
switch(H.stat)
diff --git a/code/modules/admin/health_scan.dm b/code/modules/admin/health_scan.dm
index 02b0a460c5..ac06978f40 100644
--- a/code/modules/admin/health_scan.dm
+++ b/code/modules/admin/health_scan.dm
@@ -83,7 +83,7 @@
return //End here if they're FBP
//Then do normal health scan
- var/fake_oxy = max(rand(1,40), M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
+ var/fake_oxy = max(M.getOxyLoss(), (300 - (M.getToxLoss() + M.getFireLoss() + M.getBruteLoss())))
var/OX = M.getOxyLoss() > 50 ? span_bold("[M.getOxyLoss()]") : M.getOxyLoss()
var/TX = M.getToxLoss() > 50 ? span_bold("[M.getToxLoss()]") : M.getToxLoss()
var/BU = M.getFireLoss() > 50 ? span_bold("[M.getFireLoss()]") : M.getFireLoss()
diff --git a/code/modules/mob/living/carbon/alien/life.dm b/code/modules/mob/living/carbon/alien/life.dm
index 078d4f9846..774e1f5a4c 100644
--- a/code/modules/mob/living/carbon/alien/life.dm
+++ b/code/modules/mob/living/carbon/alien/life.dm
@@ -129,7 +129,7 @@
if(!. || !healths)
return
- if (stat == DEAD)
+ if(stat == DEAD || (status_flags & FAKEDEATH))
healths.icon_state = "health7"
return
diff --git a/code/modules/mob/living/carbon/brain/life.dm b/code/modules/mob/living/carbon/brain/life.dm
index ac9809af50..5e63d9cca0 100644
--- a/code/modules/mob/living/carbon/brain/life.dm
+++ b/code/modules/mob/living/carbon/brain/life.dm
@@ -193,7 +193,7 @@
if(!. || !healths)
return
- if (stat == DEAD)
+ if(stat == DEAD || (status_effects & FAKEDEATH))
healths.icon_state = "health7"
return
diff --git a/code/modules/mob/living/carbon/human/examine.dm b/code/modules/mob/living/carbon/human/examine.dm
index b82963f1b0..230a6ffdb3 100644
--- a/code/modules/mob/living/carbon/human/examine.dm
+++ b/code/modules/mob/living/carbon/human/examine.dm
@@ -356,17 +356,17 @@
else
wound_flavor_text["[temp.name]"] = ""
if(temp.dislocated == 1)
- wound_flavor_text["[temp.name]"] += span_warning("[user.p_Their()] [temp.joint] is dislocated!")
+ wound_flavor_text["[temp.name]"] += span_warning("[p_Their()] [temp.joint] is dislocated!")
if(temp.brute_dam > temp.min_broken_damage || (temp.status & (ORGAN_BROKEN | ORGAN_MUTATED)))
- wound_flavor_text["[temp.name]"] += span_warning("[user.p_Their()] [temp.name] is dented and swollen!")
+ wound_flavor_text["[temp.name]"] += span_warning("[p_Their()] [temp.name] is dented and swollen!")
if(temp.germ_level > INFECTION_LEVEL_TWO && !(temp.status & ORGAN_DEAD))
- wound_flavor_text["[temp.name]"] += span_warning("[user.p_Their()] [temp.name] looks very infected!")
+ wound_flavor_text["[temp.name]"] += span_warning("[p_Their()] [temp.name] looks very infected!")
else if(temp.status & ORGAN_DEAD)
- wound_flavor_text["[temp.name]"] += span_warning("[user.p_Their()] [temp.name] looks rotten!")
+ wound_flavor_text["[temp.name]"] += span_warning("[p_Their()] [temp.name] looks rotten!")
if(temp.status & ORGAN_BLEEDING)
- is_bleeding["[temp.name]"] += span_danger("[user.p_Their()] [temp.name] is bleeding!")
+ is_bleeding["[temp.name]"] += span_danger("[p_Their()] [temp.name] is bleeding!")
if(temp.applied_pressure == src)
applying_pressure = span_info("[p_They()] is applying pressure to [p_their()] [temp.name].")
diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm
index b4e1f667f9..3bc5a90be0 100644
--- a/code/modules/mob/living/carbon/human/life.dm
+++ b/code/modules/mob/living/carbon/human/life.dm
@@ -1666,7 +1666,7 @@
if(!. || !healths)
return
- if(stat == DEAD) //Dead
+ if(stat == DEAD || (status_effects & FAKEDEATH)) //Dead
healths.icon_state = "health7" //DEAD healthmeter
return
@@ -2104,7 +2104,7 @@
if (BITTEST(hud_updateflag, HEALTH_HUD))
var/image/holder = grab_hud(HEALTH_HUD)
var/image/health_us = grab_hud(HEALTH_VR_HUD)
- if(stat == DEAD)
+ if(stat == DEAD || (status_flags & FAKEDEATH))
holder.icon_state = "-100" // X_X
else
holder.icon_state = RoundHealth((health-get_crit_point())/(getMaxHealth()-get_crit_point())*100)
@@ -2118,7 +2118,7 @@
var/image/holder = grab_hud(LIFE_HUD)
if(isSynthetic())
holder.icon_state = "hudrobo"
- else if(stat == DEAD)
+ else if(stat == DEAD || (status_flags & FAKEDEATH))
holder.icon_state = "huddead"
else
holder.icon_state = "hudhealthy"
@@ -2133,7 +2133,7 @@
var/image/status_r = grab_hud(STATUS_R_HUD)
if (isSynthetic())
holder.icon_state = "hudrobo"
- else if(stat == DEAD)
+ else if(stat == DEAD || (status_flags & FAKEDEATH))
holder.icon_state = "huddead"
holder2.icon_state = "huddead"
else if(has_virus())
diff --git a/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm b/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm
index 2cdb385447..daff2545a4 100644
--- a/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm
+++ b/code/modules/mob/living/carbon/human/species/station/traits/neutral.dm
@@ -1898,4 +1898,4 @@
/datum/trait/neutral/abnormal_mind/apply(datum/species/S, mob/living/carbon/human/H, trait_prefs)
..()
- ADD_TRAIT(H.mind, UNIQUE_MINDSTRUCTURE, ROUNDSTART_TRAIT)
+ ADD_TRAIT(H, UNIQUE_MINDSTRUCTURE, ROUNDSTART_TRAIT)
diff --git a/code/modules/mob/living/silicon/pai/pai_hud.dm b/code/modules/mob/living/silicon/pai/pai_hud.dm
index 518a04d1e8..a8e4385a77 100644
--- a/code/modules/mob/living/silicon/pai/pai_hud.dm
+++ b/code/modules/mob/living/silicon/pai/pai_hud.dm
@@ -404,7 +404,7 @@
if(!. || !healths)
return
- if(stat == DEAD)
+ if(stat == DEAD || (status_flags & FAKEDEATH))
healths.icon_state = "health7"
return
diff --git a/code/modules/mob/living/silicon/robot/life.dm b/code/modules/mob/living/silicon/robot/life.dm
index fbff53459e..4e0e6e3f73 100644
--- a/code/modules/mob/living/silicon/robot/life.dm
+++ b/code/modules/mob/living/silicon/robot/life.dm
@@ -281,7 +281,7 @@
if(!. || !healths)
return
- if(stat == DEAD)
+ if(stat == DEAD || (status_effects & FAKEDEATH))
healths.icon_state = "health7"
return
diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm
index 366a5a374c..8ab4d602e8 100644
--- a/code/modules/pda/utilities.dm
+++ b/code/modules/pda/utilities.dm
@@ -49,7 +49,7 @@
user.show_message(span_notice("Analyzing Results for [C]:"))
if(C.status_flags & FAKEDEATH)
user.show_message(span_notice(" Overall Status: dead"))
- var/fake_oxy = max(rand(1,40), C.getOxyLoss(), (300 - (C.getToxLoss() + C.getFireLoss() + C.getBruteLoss())))
+ var/fake_oxy = max(C.getOxyLoss(), (300 - (C.getToxLoss() + C.getFireLoss() + C.getBruteLoss())))
var/OX = fake_oxy > 50 ? span_bold("[fake_oxy]") : fake_oxy //Easier to do this. All this needs consolidation, eventually.
user.show_message(span_notice(" Damage Specifics:") + " [OX]-0-\
[(C.getFireLoss() > 50) ? span_warning("[C.getFireLoss()]") : C.getFireLoss()]-\