diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index dbe22162b57..8de07561645 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -90,22 +90,22 @@ REAGENT SCANNER
M.invisibility = INVISIBILITY_LEVEL_TWO
-/proc/chemscan(var/mob/living/user, var/mob/living/M)
+/proc/chemscan(mob/living/user, mob/living/M)
if(ishuman(M))
var/mob/living/carbon/human/H = M
if(H.reagents)
if(H.reagents.reagent_list.len)
- user.show_message("Subject contains the following reagents:")
+ to_chat(user, "Subject contains the following reagents:")
for(var/datum/reagent/R in H.reagents.reagent_list)
- user.show_message("[R.volume]u of [R.name][R.overdosed ? " - OVERDOSING" : "."]")
+ to_chat(user, "[R.volume]u of [R.name][R.overdosed ? " - OVERDOSING" : "."]")
else
- user.show_message("Subject contains no reagents.")
+ to_chat(user, "Subject contains no reagents.")
if(H.reagents.addiction_list.len)
- user.show_message("Subject is addicted to the following reagents:")
+ to_chat(user, "Subject is addicted to the following reagents:")
for(var/datum/reagent/R in H.reagents.addiction_list)
- user.show_message("[R.name] Stage: [R.addiction_stage]/5")
+ to_chat(user, "[R.name] Stage: [R.addiction_stage]/5")
else
- user.show_message("Subject is not addicted to any reagents.")
+ to_chat(user, "Subject is not addicted to any reagents.")
/obj/item/healthanalyzer
name = "Health Analyzer"
@@ -113,43 +113,42 @@ REAGENT SCANNER
icon_state = "health"
item_state = "healthanalyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject."
- flags = CONDUCT
+ flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 3
w_class = WEIGHT_CLASS_TINY
- throw_speed = 5
- throw_range = 10
+ throw_speed = 3
+ throw_range = 7
materials = list(MAT_METAL=200)
origin_tech = "magnets=1;biotech=1"
- var/upgraded = 0
- var/mode = 1;
-
+ var/mode = 1
+ var/advanced = FALSE
/obj/item/healthanalyzer/attack(mob/living/M, mob/living/user)
if(((CLUMSY in user.mutations) || user.getBrainLoss() >= 60) && prob(50))
- to_chat(user, text("You try to analyze the floor's vitals!"))
- for(var/mob/O in viewers(M, null))
- O.show_message(text("[user] has analyzed the floor's vitals!"), 1)
- user.show_message(text("Analyzing Results for The floor:\n\t Overall Status: Healthy"), 1)
- user.show_message(text("\t Damage Specifics: [0]-[0]-[0]-[0]"), 1)
- user.show_message("Key: Suffocation/Toxin/Burns/Brute", 1)
- user.show_message("Body Temperature: ???", 1)
+ user.visible_message("[user] analyzes the floor's vitals!", "You stupidly try to analyze the floor's vitals!")
+ to_chat(user, "Analyzing results for The floor:\n\tOverall status: Healthy")
+ to_chat(user, "Key: Suffocation/Toxin/Burn/Brute")
+ to_chat(user, "\tDamage specifics: 0-0-0-0")
+ to_chat(user, "Body temperature: ???")
return
- user.visible_message("[user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.")
- healthscan(user, M, mode, upgraded)
+ user.visible_message("[user] analyzes [M]'s vitals.", "You analyze [M]'s vitals.")
+
+ healthscan(user, M, mode, advanced)
+
add_fingerprint(user)
-
-proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
+// Used by the PDA medical scanner too
+/proc/healthscan(mob/user, mob/living/M, mode = 1, advanced = FALSE)
if(!ishuman(M) || M.isSynthetic())
//these sensors are designed for organic life
- user.show_message("Analyzing Results for ERROR:\n\t Overall Status: ERROR")
- user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1)
- user.show_message("\t Damage Specifics: ? - ? - ? - ?")
- user.show_message("Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)", 1)
- user.show_message("Warning: Blood Level ERROR: --% --cl.Type: ERROR")
- user.show_message("Subject's pulse: -- bpm.")
+ to_chat(user, "Analyzing Results for ERROR:\n\t Overall Status: ERROR")
+ to_chat(user, "\t Key: Suffocation/Toxin/Burns/Brute")
+ to_chat(user, "\t Damage Specifics: ? - ? - ? - ?")
+ to_chat(user, "Body Temperature: [M.bodytemperature-T0C]°C ([M.bodytemperature*1.8-459.67]°F)")
+ to_chat(user, "Warning: Blood Level ERROR: --% --cl.Type: ERROR")
+ to_chat(user, "Subject's pulse: -- bpm.")
return
var/mob/living/carbon/human/H = M
@@ -160,24 +159,24 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
var/BR = H.getBruteLoss() > 50 ? "[H.getBruteLoss()]" : H.getBruteLoss()
if(H.status_flags & FAKEDEATH)
OX = fake_oxy > 50 ? "[fake_oxy]" : fake_oxy
- user.show_message("Analyzing Results for [H]:\n\t Overall Status: dead")
+ to_chat(user, "Analyzing Results for [H]:\n\t Overall Status: dead")
else
- user.show_message("Analyzing Results for [H]:\n\t Overall Status: [H.stat > 1 ? "dead" : "[H.health]% healthy"]")
- user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1)
- user.show_message("\t Damage Specifics: [OX] - [TX] - [BU] - [BR]")
- user.show_message("Body Temperature: [H.bodytemperature-T0C]°C ([H.bodytemperature*1.8-459.67]°F)", 1)
+ to_chat(user, "Analyzing Results for [H]:\n\t Overall Status: [H.stat > 1 ? "dead" : "[H.health]% healthy"]")
+ to_chat(user, "\t Key: Suffocation/Toxin/Burns/Brute")
+ to_chat(user, "\t Damage Specifics: [OX] - [TX] - [BU] - [BR]")
+ to_chat(user, "Body Temperature: [H.bodytemperature-T0C]°C ([H.bodytemperature*1.8-459.67]°F)")
if(H.timeofdeath && (H.stat == DEAD || (H.status_flags & FAKEDEATH)))
- user.show_message("Time of Death: [station_time_timestamp("hh:mm:ss", H.timeofdeath)]")
+ to_chat(user, "Time of Death: [station_time_timestamp("hh:mm:ss", H.timeofdeath)]")
var/tdelta = round(world.time - H.timeofdeath)
if(tdelta < (DEFIB_TIME_LIMIT * 10))
- user.show_message("Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!")
+ to_chat(user, "Subject died [DisplayTimeText(tdelta)] ago, defibrillation may be possible!")
if(mode == 1)
var/list/damaged = H.get_damaged_organs(1,1)
- user.show_message("Localized Damage, Brute/Burn:",1)
+ to_chat(user, "Localized Damage, Brute/Burn:")
if(length(damaged) > 0)
for(var/obj/item/organ/external/org in damaged)
- user.show_message("\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]")
+ to_chat(user, "\t\t[capitalize(org.name)]: [(org.brute_dam > 0) ? "[org.brute_dam]" : "0"]-[(org.burn_dam > 0) ? "[org.burn_dam]" : "0"]")
OX = H.getOxyLoss() > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal"
TX = H.getToxLoss() > 50 ? "Dangerous amount of toxins detected" : "Subject bloodstream toxin level minimal"
@@ -185,39 +184,39 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
BR = H.getBruteLoss() > 50 ? "Severe anatomical damage detected" : "Subject brute-force injury status O.K"
if(H.status_flags & FAKEDEATH)
OX = fake_oxy > 50 ? "Severe oxygen deprivation detected" : "Subject bloodstream oxygen level normal"
- user.show_message("[OX] | [TX] | [BU] | [BR]")
+ to_chat(user, "[OX] | [TX] | [BU] | [BR]")
- if(upgraded)
+ if(advanced)
chemscan(user, H)
for(var/thing in H.viruses)
var/datum/disease/D = thing
if(!(D.visibility_flags & HIDDEN_SCANNER))
- user.show_message("Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]")
+ to_chat(user, "Warning: [D.form] detected\nName: [D.name].\nType: [D.spread_text].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure_text]")
if(H.undergoing_cardiac_arrest())
var/obj/item/organ/internal/heart/heart = H.get_int_organ(/obj/item/organ/internal/heart)
if(heart && !(heart.status & ORGAN_DEAD))
- user.show_message("Warning: Medical Emergency detected\nName: Cardiac Arrest.\nType: The patient's heart has stopped.\nStage: 1/1.\nPossible Cure: Electric Shock")
+ to_chat(user, "Warning: Medical Emergency detected\nName: Cardiac Arrest.\nType: The patient's heart has stopped.\nStage: 1/1.\nPossible Cure: Electric Shock")
else if(heart && (heart.status & ORGAN_DEAD))
- user.show_message("Subject's heart is necrotic.")
+ to_chat(user, "Subject's heart is necrotic.")
else if(!heart)
- user.show_message("Subject has no heart.")
+ to_chat(user, "Subject has no heart.")
if(H.getStaminaLoss())
- user.show_message("Subject appears to be suffering from fatigue.")
+ to_chat(user, "Subject appears to be suffering from fatigue.")
if(H.getCloneLoss())
- user.show_message("Subject appears to have [H.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.")
+ to_chat(user, "Subject appears to have [H.getCloneLoss() > 30 ? "severe" : "minor"] cellular damage.")
if(H.has_brain_worms())
- user.show_message("Subject suffering from aberrant brain activity. Recommend further scanning.")
+ to_chat(user, "Subject suffering from aberrant brain activity. Recommend further scanning.")
if(H.get_int_organ(/obj/item/organ/internal/brain))
if(H.getBrainLoss() >= 100)
- user.show_message("Subject is brain dead.")
+ to_chat(user, "Subject is brain dead.")
else if(H.getBrainLoss() >= 60)
- user.show_message("Severe brain damage detected. Subject likely to have mental retardation.")
+ to_chat(user, "Severe brain damage detected. Subject likely to have mental retardation.")
else if(H.getBrainLoss() >= 10)
- user.show_message("Significant brain damage detected. Subject may have had a concussion.")
+ to_chat(user, "Significant brain damage detected. Subject may have had a concussion.")
else
- user.show_message("Subject has no brain.")
+ to_chat(user, "Subject has no brain.")
for(var/name in H.bodyparts_by_name)
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
@@ -226,25 +225,25 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
var/limb = e.name
if(e.status & ORGAN_BROKEN)
if((e.limb_name in list("l_arm", "r_arm", "l_hand", "r_hand", "l_leg", "r_leg", "l_foot", "r_foot")) && !(e.status & ORGAN_SPLINTED))
- user.show_message("Unsecured fracture in subject [limb]. Splinting recommended for transport.")
+ to_chat(user, "Unsecured fracture in subject [limb]. Splinting recommended for transport.")
if(e.has_infected_wound())
- user.show_message("Infected wound detected in subject [limb]. Disinfection recommended.")
+ to_chat(user, "Infected wound detected in subject [limb]. Disinfection recommended.")
for(var/name in H.bodyparts_by_name)
var/obj/item/organ/external/e = H.bodyparts_by_name[name]
if(!e)
continue
if(e.status & ORGAN_BROKEN)
- user.show_message(text("Bone fractures detected. Advanced scanner required for location."), 1)
+ to_chat(user, "Bone fractures detected. Advanced scanner required for location.")
break
for(var/obj/item/organ/external/e in H.bodyparts)
if(e.internal_bleeding)
- user.show_message(text("Internal bleeding detected. Advanced scanner required for location."), 1)
+ to_chat(user, "Internal bleeding detected. Advanced scanner required for location.")
break
var/blood_id = H.get_blood_id()
if(blood_id)
if(H.bleed_rate)
- user.show_message("Subject is bleeding!")
+ to_chat(user, "Subject is bleeding!")
var/blood_percent = round((H.blood_volume / BLOOD_VOLUME_NORMAL)*100)
var/blood_type = H.b_type
if(blood_id != "blood")//special blood substance
@@ -254,28 +253,28 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
else
blood_type = blood_id
if(H.blood_volume <= BLOOD_VOLUME_SAFE && H.blood_volume > BLOOD_VOLUME_OKAY)
- user.show_message("LOW blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]")
+ to_chat(user, "LOW blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]")
else if(H.blood_volume <= BLOOD_VOLUME_OKAY)
- user.show_message("CRITICAL blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]")
+ to_chat(user, "CRITICAL blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]")
else
- user.show_message("Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]")
+ to_chat(user, "Blood level [blood_percent] %, [H.blood_volume] cl, type: [blood_type]")
- user.show_message("Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.")
+ to_chat(user, "Subject's pulse: [H.get_pulse(GETPULSE_TOOL)] bpm.")
var/implant_detect
for(var/obj/item/organ/internal/cyberimp/CI in H.internal_organs)
if(CI.is_robotic())
implant_detect += "[H.name] is modified with a [CI.name].
"
if(implant_detect)
- user.show_message("Detected cybernetic modifications:")
- user.show_message("[implant_detect]")
+ to_chat(user, "Detected cybernetic modifications:")
+ to_chat(user, "[implant_detect]")
if(H.gene_stability < 40)
- user.show_message("Subject's genes are quickly breaking down!")
+ to_chat(user, "Subject's genes are quickly breaking down!")
else if(H.gene_stability < 70)
- user.show_message("Subject's genes are showing signs of spontaneous breakdown.")
+ to_chat(user, "Subject's genes are showing signs of spontaneous breakdown.")
else if(H.gene_stability < 85)
- user.show_message("Subject's genes are showing minor signs of instability.")
+ to_chat(user, "Subject's genes are showing minor signs of instability.")
else
- user.show_message("Subject's genes are stable.")
+ to_chat(user, "Subject's genes are stable.")
/obj/item/healthanalyzer/attack_self(mob/user)
toggle_mode()
@@ -293,22 +292,24 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
/obj/item/healthanalyzer/attackby(obj/item/I, mob/user, params)
if(istype(I, /obj/item/healthupgrade))
- if(upgraded)
- to_chat(user, "You have already installed an upgraded in the [src].")
+ if(advanced)
+ to_chat(user, "An upgrade is already installed on [src].")
else
- to_chat(user, "You install the upgrade in the [src].")
- overlays += "advanced"
- playsound(loc, I.usesound, 50, 1)
- upgraded = TRUE
- qdel(I)
+ if(user.unEquip(I))
+ to_chat(user, "You install the upgrade on [src].")
+ add_overlay("advanced")
+ playsound(loc, I.usesound, 50, 1)
+ advanced = TRUE
+ qdel(I)
return
return ..()
/obj/item/healthanalyzer/advanced
- upgraded = TRUE
+ advanced = TRUE
-/obj/item/healthanalyzer/advanced/New()
- overlays += "advanced"
+/obj/item/healthanalyzer/advanced/Initialize(mapload)
+ . = ..()
+ add_overlay("advanced")
/obj/item/healthupgrade
@@ -356,11 +357,11 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
var/pressure = environment.return_pressure()
var/total_moles = environment.total_moles()
- user.show_message("Results:", 1)
+ to_chat(user, "Results:")
if(abs(pressure - ONE_ATMOSPHERE) < 10)
- user.show_message("Pressure: [round(pressure,0.1)] kPa", 1)
+ to_chat(user, "Pressure: [round(pressure,0.1)] kPa")
else
- user.show_message("Pressure: [round(pressure,0.1)] kPa", 1)
+ to_chat(user, "Pressure: [round(pressure,0.1)] kPa")
if(total_moles)
var/o2_concentration = environment.oxygen/total_moles
var/n2_concentration = environment.nitrogen/total_moles
@@ -369,30 +370,29 @@ proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
var/unknown_concentration = 1-(o2_concentration+n2_concentration+co2_concentration+plasma_concentration)
if(abs(n2_concentration - N2STANDARD) < 20)
- user.show_message("Nitrogen: [round(n2_concentration*100)] %", 1)
+ to_chat(user, "Nitrogen: [round(n2_concentration*100)] %")
else
- user.show_message("Nitrogen: [round(n2_concentration*100)] %", 1)
+ to_chat(user, "Nitrogen: [round(n2_concentration*100)] %")
if(abs(o2_concentration - O2STANDARD) < 2)
- user.show_message("Oxygen: [round(o2_concentration*100)] %", 1)
+ to_chat(user, "Oxygen: [round(o2_concentration*100)] %")
else
- user.show_message("Oxygen: [round(o2_concentration*100)] %", 1)
+ to_chat(user, "Oxygen: [round(o2_concentration*100)] %")
if(co2_concentration > 0.01)
- user.show_message("CO2: [round(co2_concentration*100)] %", 1)
+ to_chat(user, "CO2: [round(co2_concentration*100)] %")
else
- user.show_message("CO2: [round(co2_concentration*100)] %", 1)
+ to_chat(user, "CO2: [round(co2_concentration*100)] %")
if(plasma_concentration > 0.01)
- user.show_message("Plasma: [round(plasma_concentration*100)] %", 1)
+ to_chat(user, "Plasma: [round(plasma_concentration*100)] %")
if(unknown_concentration > 0.01)
- user.show_message("Unknown: [round(unknown_concentration*100)] %", 1)
+ to_chat(user, "Unknown: [round(unknown_concentration*100)] %")
- user.show_message("Temperature: [round(environment.temperature-T0C)] °C", 1)
+ to_chat(user, "Temperature: [round(environment.temperature-T0C)] °C")
- src.add_fingerprint(user)
- return
+ add_fingerprint(user)
/obj/item/analyzer/AltClick(mob/user) //Barometer output for measuring when the next storm happens
..()
diff --git a/code/game/objects/items/devices/traitordevices.dm b/code/game/objects/items/devices/traitordevices.dm
index 61561131219..dfef93f2c32 100644
--- a/code/game/objects/items/devices/traitordevices.dm
+++ b/code/game/objects/items/devices/traitordevices.dm
@@ -78,7 +78,7 @@ effective or pretty fucking useless.
icon_state = "health2"
item_state = "healthanalyzer"
desc = "A hand-held body scanner able to distinguish vital signs of the subject. A strange microlaser is hooked on to the scanning end."
- flags = CONDUCT
+ flags = CONDUCT | NOBLUDGEON
slot_flags = SLOT_BELT
throwforce = 3
w_class = WEIGHT_CLASS_TINY
@@ -93,7 +93,7 @@ effective or pretty fucking useless.
/obj/item/rad_laser/attack(mob/living/M, mob/living/user)
if(!used)
add_attack_logs(user, M, "Irradiated by [src]")
- user.visible_message("[user] has analyzed [M]'s vitals.")
+ user.visible_message("[user] analyzes [M]'s vitals.")
var/cooldown = round(max(100,(((intensity*8)-(wavelength/2))+(intensity*2))*10))
used = 1
icon_state = "health1"
diff --git a/code/modules/pda/utilities.dm b/code/modules/pda/utilities.dm
index 4b2d02c33d4..1dfb819c826 100644
--- a/code/modules/pda/utilities.dm
+++ b/code/modules/pda/utilities.dm
@@ -40,25 +40,10 @@
base_name = "Med Scanner"
icon = "heart-o"
-/datum/data/pda/utility/scanmode/medical/scan_mob(mob/living/C as mob, mob/living/user as mob)
- C.visible_message("[user] has analyzed [C]'s vitals!")
+/datum/data/pda/utility/scanmode/medical/scan_mob(mob/living/M, mob/living/user)
+ user.visible_message("[user] analyzes [M]'s vitals.", "You analyze [M]'s vitals.")
- user.show_message("Analyzing Results for [C]:")
- user.show_message("\t Overall Status: [C.stat > 1 ? "dead" : "[C.health]% healthy"]", 1)
- user.show_message("\t Damage Specifics: [C.getOxyLoss() > 50 ? "" : ""][C.getOxyLoss()]-[C.getToxLoss() > 50 ? "" : ""][C.getToxLoss()]-[C.getFireLoss() > 50 ? "" : ""][C.getFireLoss()]-[C.getBruteLoss() > 50 ? "" : ""][C.getBruteLoss()]", 1)
- user.show_message("\t Key: Suffocation/Toxin/Burns/Brute", 1)
- user.show_message("\t Body Temperature: [C.bodytemperature-T0C]°C ([C.bodytemperature*1.8-459.67]°F)", 1)
- if(C.timeofdeath && (C.stat == DEAD || (C.status_flags & FAKEDEATH)))
- user.show_message("\t Time of Death: [station_time_timestamp("hh:mm:ss", C.timeofdeath)]")
- if(istype(C, /mob/living/carbon/human))
- var/mob/living/carbon/human/H = C
- var/list/damaged = H.get_damaged_organs(1,1)
- user.show_message("Localized Damage, Brute/Burn:",1)
- if(length(damaged)>0)
- for(var/obj/item/organ/external/org in damaged)
- user.show_message("\t [capitalize(org.name)]: [org.brute_dam > 0 ? "[org.brute_dam]" : "0"]-[org.burn_dam > 0 ? "[org.burn_dam]" : "0"]", 1)
- else
- user.show_message("\t Limbs are OK.",1)
+ healthscan(user, M, 1)
/datum/data/pda/utility/scanmode/dna
base_name = "DNA Scanner"