|
|
|
@@ -95,7 +95,7 @@ SLIME SCANNER
|
|
|
|
|
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/carbon/human/user)
|
|
|
|
|
|
|
|
|
|
// Clumsiness/brain damage check
|
|
|
|
|
if ((user.has_trait(TRAIT_CLUMSY) || user.has_trait(TRAIT_DUMB)) && prob(50))
|
|
|
|
|
if ((HAS_TRAIT(user, TRAIT_CLUMSY) || HAS_TRAIT(user, TRAIT_DUMB)) && prob(50))
|
|
|
|
|
to_chat(user, "<span class='notice'>You stupidly try to analyze the floor's vitals!</span>")
|
|
|
|
|
user.visible_message("<span class='warning'>[user] has analyzed the floor's vitals!</span>")
|
|
|
|
|
var/msg = "<span class='info'>*---------*\nAnalyzing results for The floor:\n\tOverall status: <b>Healthy</b>\n"
|
|
|
|
@@ -127,7 +127,7 @@ SLIME SCANNER
|
|
|
|
|
var/brute_loss = M.getBruteLoss()
|
|
|
|
|
var/mob_status = (M.stat == DEAD ? "<span class='alert'><b>Deceased</b></span>" : "<b>[round(M.health/M.maxHealth,0.01)*100] % healthy</b>")
|
|
|
|
|
|
|
|
|
|
if(M.has_trait(TRAIT_FAKEDEATH) && !advanced)
|
|
|
|
|
if(HAS_TRAIT(M, TRAIT_FAKEDEATH) && !advanced)
|
|
|
|
|
mob_status = "<span class='alert'><b>Deceased</b></span>"
|
|
|
|
|
oxy_loss = max(rand(1, 40), oxy_loss, (300 - (tox_loss + fire_loss + brute_loss))) // Random oxygen loss
|
|
|
|
|
|
|
|
|
@@ -208,10 +208,10 @@ SLIME SCANNER
|
|
|
|
|
msg += "\t<span class='info'><b>==EAR STATUS==</b></span>\n"
|
|
|
|
|
if(istype(ears))
|
|
|
|
|
var/healthy = TRUE
|
|
|
|
|
if(C.has_trait(TRAIT_DEAF, GENETIC_MUTATION))
|
|
|
|
|
if(HAS_TRAIT_FROM(C, TRAIT_DEAF, GENETIC_MUTATION))
|
|
|
|
|
healthy = FALSE
|
|
|
|
|
msg += "\t<span class='alert'>Subject is genetically deaf.</span>\n"
|
|
|
|
|
else if(C.has_trait(TRAIT_DEAF))
|
|
|
|
|
else if(HAS_TRAIT(C, TRAIT_DEAF))
|
|
|
|
|
healthy = FALSE
|
|
|
|
|
msg += "\t<span class='alert'>Subject is deaf.</span>\n"
|
|
|
|
|
else
|
|
|
|
@@ -229,10 +229,10 @@ SLIME SCANNER
|
|
|
|
|
msg += "\t<span class='info'><b>==EYE STATUS==</b></span>\n"
|
|
|
|
|
if(istype(eyes))
|
|
|
|
|
var/healthy = TRUE
|
|
|
|
|
if(C.has_trait(TRAIT_BLIND))
|
|
|
|
|
if(HAS_TRAIT(C, TRAIT_BLIND))
|
|
|
|
|
msg += "\t<span class='alert'>Subject is blind.</span>\n"
|
|
|
|
|
healthy = FALSE
|
|
|
|
|
if(C.has_trait(TRAIT_NEARSIGHT))
|
|
|
|
|
if(HAS_TRAIT(C, TRAIT_NEARSIGHT))
|
|
|
|
|
msg += "\t<span class='alert'>Subject is nearsighted.</span>\n"
|
|
|
|
|
healthy = FALSE
|
|
|
|
|
if(eyes.eye_damage > 30)
|
|
|
|
@@ -299,7 +299,7 @@ SLIME SCANNER
|
|
|
|
|
msg += "<span class='info'>Body temperature: [round(M.bodytemperature-T0C,0.1)] °C ([round(M.bodytemperature*1.8-459.67,0.1)] °F)</span>\n"
|
|
|
|
|
|
|
|
|
|
// Time of death
|
|
|
|
|
if(M.tod && (M.stat == DEAD || ((M.has_trait(TRAIT_FAKEDEATH)) && !advanced)))
|
|
|
|
|
if(M.tod && (M.stat == DEAD || ((HAS_TRAIT(M, TRAIT_FAKEDEATH)) && !advanced)))
|
|
|
|
|
msg += "<span class='info'>Time of Death:</span> [M.tod]\n"
|
|
|
|
|
var/tdelta = round(world.time - M.timeofdeath)
|
|
|
|
|
if(tdelta < (DEFIB_TIME_LIMIT * 10))
|
|
|
|
@@ -437,39 +437,38 @@ SLIME SCANNER
|
|
|
|
|
if(total_moles)
|
|
|
|
|
var/list/env_gases = environment.gases
|
|
|
|
|
|
|
|
|
|
environment.assert_gases(arglist(GLOB.hardcoded_gases))
|
|
|
|
|
var/o2_concentration = env_gases[/datum/gas/oxygen][MOLES]/total_moles
|
|
|
|
|
var/n2_concentration = env_gases[/datum/gas/nitrogen][MOLES]/total_moles
|
|
|
|
|
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide][MOLES]/total_moles
|
|
|
|
|
var/plasma_concentration = env_gases[/datum/gas/plasma][MOLES]/total_moles
|
|
|
|
|
var/o2_concentration = env_gases[/datum/gas/oxygen]/total_moles
|
|
|
|
|
var/n2_concentration = env_gases[/datum/gas/nitrogen]/total_moles
|
|
|
|
|
var/co2_concentration = env_gases[/datum/gas/carbon_dioxide]/total_moles
|
|
|
|
|
var/plasma_concentration = env_gases[/datum/gas/plasma]/total_moles
|
|
|
|
|
|
|
|
|
|
if(abs(n2_concentration - N2STANDARD) < 20)
|
|
|
|
|
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='info'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
|
|
|
|
|
else
|
|
|
|
|
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='alert'>Nitrogen: [round(n2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/nitrogen], 0.01)] mol)</span>")
|
|
|
|
|
|
|
|
|
|
if(abs(o2_concentration - O2STANDARD) < 2)
|
|
|
|
|
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='info'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
|
|
|
|
|
else
|
|
|
|
|
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='alert'>Oxygen: [round(o2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/oxygen], 0.01)] mol)</span>")
|
|
|
|
|
|
|
|
|
|
if(co2_concentration > 0.01)
|
|
|
|
|
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='alert'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
|
|
|
|
|
else
|
|
|
|
|
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='info'>CO2: [round(co2_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/carbon_dioxide], 0.01)] mol)</span>")
|
|
|
|
|
|
|
|
|
|
if(plasma_concentration > 0.005)
|
|
|
|
|
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='alert'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
|
|
|
|
|
else
|
|
|
|
|
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='info'>Plasma: [round(plasma_concentration*100, 0.01)] % ([round(env_gases[/datum/gas/plasma], 0.01)] mol)</span>")
|
|
|
|
|
|
|
|
|
|
environment.garbage_collect()
|
|
|
|
|
GAS_GARBAGE_COLLECT(environment.gases)
|
|
|
|
|
|
|
|
|
|
for(var/id in env_gases)
|
|
|
|
|
if(id in GLOB.hardcoded_gases)
|
|
|
|
|
continue
|
|
|
|
|
var/gas_concentration = env_gases[id][MOLES]/total_moles
|
|
|
|
|
to_chat(user, "<span class='alert'>[env_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
var/gas_concentration = env_gases[id]/total_moles
|
|
|
|
|
to_chat(user, "<span class='alert'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(env_gases[id], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='info'>Temperature: [round(environment.temperature-T0C, 0.01)] °C ([round(environment.temperature, 0.01)] K)</span>")
|
|
|
|
|
|
|
|
|
|
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
|
|
|
|
@@ -559,8 +558,8 @@ SLIME SCANNER
|
|
|
|
|
|
|
|
|
|
var/list/cached_gases = air_contents.gases
|
|
|
|
|
for(var/id in cached_gases)
|
|
|
|
|
var/gas_concentration = cached_gases[id][MOLES]/total_moles
|
|
|
|
|
to_chat(user, "<span class='notice'>[cached_gases[id][GAS_META][META_GAS_NAME]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id][MOLES], 0.01)] mol)</span>")
|
|
|
|
|
var/gas_concentration = cached_gases[id]/total_moles
|
|
|
|
|
to_chat(user, "<span class='notice'>[GLOB.meta_gas_names[id]]: [round(gas_concentration*100, 0.01)] % ([round(cached_gases[id], 0.01)] mol)</span>")
|
|
|
|
|
to_chat(user, "<span class='notice'>Temperature: [round(temperature - T0C,0.01)] °C ([round(temperature, 0.01)] K)</span>")
|
|
|
|
|
|
|
|
|
|
else
|
|
|
|
|