Better Bodyscanners and Surgery Stuff (#17520)
* Better Bodyscanners and Surgery Stuff * ope * i can't believe that worked * adv * bodyscanner fixes
@@ -15,11 +15,29 @@
|
||||
/obj/item/stock_parts/scanning_module = 1
|
||||
)
|
||||
|
||||
var/mob/living/carbon/human/victim = null
|
||||
var/mob/living/carbon/human/occupant = null
|
||||
var/suppressing = FALSE
|
||||
|
||||
var/obj/machinery/computer/operating/computer = null
|
||||
|
||||
var/list/allowed_species = list(
|
||||
SPECIES_HUMAN,
|
||||
SPECIES_HUMAN_OFFWORLD,
|
||||
SPECIES_SKRELL,
|
||||
SPECIES_SKRELL_AXIORI,
|
||||
SPECIES_UNATHI,
|
||||
SPECIES_TAJARA,
|
||||
SPECIES_TAJARA_MSAI,
|
||||
SPECIES_TAJARA_ZHAN,
|
||||
SPECIES_VAURCA_WORKER,
|
||||
SPECIES_VAURCA_WARRIOR,
|
||||
SPECIES_VAURCA_BREEDER,
|
||||
SPECIES_VAURCA_BULWARK,
|
||||
SPECIES_DIONA,
|
||||
SPECIES_DIONA_COEUS,
|
||||
SPECIES_MONKEY
|
||||
)
|
||||
|
||||
/obj/machinery/optable/Initialize()
|
||||
. = ..()
|
||||
LAZYADD(can_buckle, /mob/living)
|
||||
@@ -55,18 +73,18 @@
|
||||
qdel(src)
|
||||
return
|
||||
|
||||
if(!victim)
|
||||
if(!occupant)
|
||||
to_chat(user, SPAN_WARNING("There is nobody on \the [src]. It would be pointless to turn the suppressor on."))
|
||||
return TRUE
|
||||
|
||||
if((user.a_intent != I_HELP) && buckled)
|
||||
user_unbuckle(user)
|
||||
return
|
||||
if(user != victim && !use_check_and_message(user)) // Skip checks if you're doing it to yourself or turning it off, this is an anti-griefing mechanic more than anything.
|
||||
if(user != occupant && !use_check_and_message(user)) // Skip checks if you're doing it to yourself or turning it off, this is an anti-griefing mechanic more than anything.
|
||||
user.visible_message(SPAN_WARNING("\The [user] begins switching [suppressing ? "off" : "on"] \the [src]'s neural suppressor."))
|
||||
if(!do_after(user, 3 SECONDS, src, DO_UNIQUE))
|
||||
return
|
||||
if(!victim)
|
||||
if(!occupant)
|
||||
to_chat(user, SPAN_WARNING("There is nobody on \the [src]. It would be pointless to turn the suppressor on."))
|
||||
|
||||
suppressing = !suppressing
|
||||
@@ -84,32 +102,32 @@
|
||||
user.drop_from_inventory(O,get_turf(src))
|
||||
..()
|
||||
|
||||
/obj/machinery/optable/proc/check_victim()
|
||||
if(!victim || !victim.lying || victim.loc != loc)
|
||||
/obj/machinery/optable/proc/check_occupant()
|
||||
if(!occupant || !occupant.lying || occupant.loc != loc)
|
||||
suppressing = FALSE
|
||||
victim = null
|
||||
occupant = null
|
||||
var/mob/living/carbon/human/H = locate() in loc
|
||||
if(istype(H))
|
||||
if(H.lying)
|
||||
icon_state = H.pulse() ? "[modify_state]-active" : "[modify_state]-idle"
|
||||
victim = H
|
||||
if(victim && !victim.isSynthetic())
|
||||
if(suppressing && victim.sleeping < 7)
|
||||
victim.Sleeping(7 - victim.sleeping)
|
||||
victim.willfully_sleeping = FALSE
|
||||
if(victim.eye_blurry < 7)
|
||||
victim.eye_blurry = (7 - victim.eye_blurry)
|
||||
icon_state = victim.pulse() ? "[modify_state]-active" : "[modify_state]-idle"
|
||||
if(victim.stat == DEAD || victim.is_asystole() || victim.status_flags & FAKEDEATH)
|
||||
occupant = H
|
||||
if(occupant && !occupant.isSynthetic())
|
||||
if(suppressing && occupant.sleeping < 7)
|
||||
occupant.Sleeping(7 - occupant.sleeping)
|
||||
occupant.willfully_sleeping = FALSE
|
||||
if(occupant.eye_blurry < 7)
|
||||
occupant.eye_blurry = (7 - occupant.eye_blurry)
|
||||
icon_state = occupant.pulse() ? "[modify_state]-active" : "[modify_state]-idle"
|
||||
if(occupant.stat == DEAD || occupant.is_asystole() || occupant.status_flags & FAKEDEATH)
|
||||
icon_state = "[modify_state]-critical"
|
||||
return TRUE
|
||||
icon_state = "[modify_state]-idle"
|
||||
return FALSE
|
||||
|
||||
/obj/machinery/optable/process()
|
||||
check_victim()
|
||||
check_occupant()
|
||||
|
||||
/obj/machinery/optable/proc/take_victim(mob/living/carbon/C, mob/living/carbon/user)
|
||||
/obj/machinery/optable/proc/take_occupant(mob/living/carbon/C, mob/living/carbon/user)
|
||||
if(C == user)
|
||||
user.visible_message("\The [user] climbs on \the [src].", "You climb on \the [src].")
|
||||
else
|
||||
@@ -122,7 +140,7 @@
|
||||
add_fingerprint(user)
|
||||
if(ishuman(C))
|
||||
var/mob/living/carbon/human/H = C
|
||||
victim = H
|
||||
occupant = H
|
||||
icon_state = H.pulse() ? "[modify_state]-active" : "[modify_state]-idle"
|
||||
if(H.stat == DEAD || H.is_asystole() || H.status_flags & FAKEDEATH)
|
||||
icon_state = "[modify_state]-critical"
|
||||
@@ -147,7 +165,7 @@
|
||||
if(bucklestatus == 2)
|
||||
var/obj/structure/LB = L.buckled_to
|
||||
LB.user_unbuckle(user)
|
||||
take_victim(target,user)
|
||||
take_occupant(target,user)
|
||||
else
|
||||
return ..()
|
||||
|
||||
@@ -159,12 +177,12 @@
|
||||
if(usr.stat || !ishuman(usr) || usr.restrained() )
|
||||
return
|
||||
|
||||
take_victim(usr,usr)
|
||||
take_occupant(usr,usr)
|
||||
|
||||
/obj/machinery/optable/attackby(obj/item/W, mob/living/carbon/user)
|
||||
if(istype(W, /obj/item/grab))
|
||||
var/obj/item/grab/G = W
|
||||
if(victim)
|
||||
if(occupant)
|
||||
to_chat(usr, SPAN_NOTICE(SPAN_BOLD("\The [src] is already occupied!")))
|
||||
return TRUE
|
||||
|
||||
@@ -178,7 +196,7 @@
|
||||
else
|
||||
user.visible_message(SPAN_NOTICE("\The [user] starts putting \the [L] onto \the [src]."), SPAN_NOTICE("You start putting \the [L] onto \the [src]."), range = 3)
|
||||
if(do_mob(user, L, 10, needhand = FALSE))
|
||||
take_victim(G.affecting,usr)
|
||||
take_occupant(G.affecting,usr)
|
||||
qdel(W)
|
||||
return TRUE
|
||||
if(default_deconstruction_screwdriver(user, W))
|
||||
@@ -189,11 +207,19 @@
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/optable/proc/check_table(mob/living/carbon/patient)
|
||||
check_victim()
|
||||
if(victim?.lying && get_turf(victim) == get_turf(src))
|
||||
check_occupant()
|
||||
if(occupant?.lying && get_turf(occupant) == get_turf(src))
|
||||
to_chat(usr, SPAN_WARNING("\The [src] is already occupied!"))
|
||||
return FALSE
|
||||
if(patient.buckled_to)
|
||||
to_chat(usr, SPAN_NOTICE("Unbuckle \the [patient] first!"))
|
||||
return FALSE
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/optable/proc/check_species()
|
||||
if (!occupant || !ishuman(occupant))
|
||||
return TRUE
|
||||
var/mob/living/carbon/human/O = occupant
|
||||
if (!O)
|
||||
return TRUE
|
||||
return !(O.get_species() in allowed_species)
|
||||
|
||||
@@ -115,7 +115,7 @@
|
||||
/obj/machinery/sleeper/ui_interact(mob/user, var/datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Sleeper", "Sleeper", 1200, 800)
|
||||
ui = new(user, src, "Sleeper", "Sleeper", 450, 500)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/sleeper/ui_data(mob/user)
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
desc_info = "The advanced scanner detects and reports internal injuries such as bone fractures, internal bleeding, and organ damage. \
|
||||
This is useful if you are about to perform surgery.<br>\
|
||||
<br>\
|
||||
Click your target with Grab intent, then click on the scanner to place them in it. Click the red terminal to operate. \
|
||||
Click your target with Grab intent, then click on the scanner to place them in it. Click the connected terminal to operate. \
|
||||
Right-click the scanner and click 'Eject Occupant' to remove them. You can enter the scanner yourself in a similar way, using the 'Enter Body Scanner' \
|
||||
verb."
|
||||
icon = 'icons/obj/sleeper.dmi'
|
||||
@@ -45,6 +45,11 @@
|
||||
|
||||
/obj/machinery/bodyscanner/Initialize()
|
||||
. = ..()
|
||||
for(var/obj/machinery/body_scanconsole/C in orange(1,src))
|
||||
connected = C
|
||||
break
|
||||
if(connected)
|
||||
connected.connected = src
|
||||
update_icon()
|
||||
|
||||
/obj/machinery/bodyscanner/Destroy()
|
||||
@@ -104,9 +109,6 @@
|
||||
if (occupant)
|
||||
to_chat(usr, SPAN_WARNING("The scanner is already occupied!"))
|
||||
return
|
||||
if (usr.abiotic())
|
||||
to_chat(usr, SPAN_WARNING("The subject cannot have abiotic items on."))
|
||||
return
|
||||
usr.pulling = null
|
||||
usr.client.perspective = EYE_PERSPECTIVE
|
||||
usr.client.eye = src
|
||||
@@ -121,8 +123,8 @@
|
||||
if(!occupant || locked)
|
||||
return
|
||||
|
||||
playsound(loc, 'sound/machines/compbeep2.ogg', 50)
|
||||
playsound(loc, 'sound/machines/windowdoor.ogg', 50)
|
||||
playsound(loc, 'sound/machines/compbeep2.ogg', 25)
|
||||
playsound(loc, 'sound/machines/cryopod/cryopod_exit.ogg', 25)
|
||||
|
||||
last_occupant_name = occupant.name
|
||||
if (occupant.client)
|
||||
@@ -140,9 +142,6 @@
|
||||
if (occupant)
|
||||
to_chat(user, SPAN_WARNING("The scanner is already occupied!"))
|
||||
return TRUE
|
||||
if (G.affecting.abiotic())
|
||||
to_chat(user, SPAN_WARNING("Subject cannot have abiotic items on."))
|
||||
return TRUE
|
||||
|
||||
var/mob/living/M = G.affecting
|
||||
var/bucklestatus = M.bucklecheck(user)
|
||||
@@ -174,9 +173,6 @@
|
||||
if (occupant)
|
||||
to_chat(user, SPAN_NOTICE("<B>The scanner is already occupied!</B>"))
|
||||
return
|
||||
if (M.abiotic())
|
||||
to_chat(user, SPAN_NOTICE("<B>Subject cannot have abiotic items on.</B>"))
|
||||
return
|
||||
|
||||
var/mob/living/L = O
|
||||
var/bucklestatus = L.bucklecheck(user)
|
||||
@@ -199,7 +195,8 @@
|
||||
occupant = M
|
||||
update_use_power(POWER_USE_ACTIVE)
|
||||
update_icon()
|
||||
playsound(loc, 'sound/machines/medbayscanner1.ogg', 50)
|
||||
playsound(loc, 'sound/machines/cryopod/cryopod_enter.ogg', 25)
|
||||
playsound(loc, 'sound/machines/medbayscanner1.ogg', 25)
|
||||
add_fingerprint(user)
|
||||
//G = null
|
||||
return
|
||||
@@ -260,11 +257,16 @@
|
||||
/obj/item/stock_parts/console_screen
|
||||
)
|
||||
var/global/image/console_overlay
|
||||
var/list/connected_displays = list()
|
||||
var/list/data = list()
|
||||
var/scan_data
|
||||
|
||||
/obj/machinery/body_scanconsole/Destroy()
|
||||
if (connected)
|
||||
connected.connected = null
|
||||
connected = null
|
||||
for(var/D in connected_displays)
|
||||
remove_display(D)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/body_scanconsole/power_change()
|
||||
@@ -281,26 +283,6 @@
|
||||
add_overlay(console_overlay)
|
||||
set_light(1.4, 1, COLOR_PURPLE)
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/get_collapsed_lung_desc()
|
||||
if (!connected || !connected.occupant)
|
||||
return
|
||||
if (connected.occupant.name != connected.last_occupant_name || !collapse_desc)
|
||||
var/ldesc = pick("shows symptoms of collapse", "dollapsed", "pneumothorax detected")
|
||||
collapse_desc = ldesc
|
||||
connected.last_occupant_name = connected.occupant.name
|
||||
|
||||
return collapse_desc
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/get_broken_lung_desc()
|
||||
if (!connected || !connected.occupant)
|
||||
return
|
||||
if (connected.occupant.name != connected.last_occupant_name || !broken_desc)
|
||||
var/ldesc = pick("shows symptoms of rupture", "ruptured", "extensive damage detected")
|
||||
broken_desc = ldesc
|
||||
connected.last_occupant_name = connected.occupant.name
|
||||
|
||||
return broken_desc
|
||||
|
||||
/obj/machinery/body_scanconsole/Initialize()
|
||||
. = ..()
|
||||
for(var/obj/machinery/bodyscanner/C in orange(1,src))
|
||||
@@ -328,22 +310,36 @@
|
||||
switch(action)
|
||||
// shouldn't be reachable if occupant is invalid
|
||||
if("print")
|
||||
var/obj/item/paper/medscan/R = new(loc)
|
||||
var/obj/item/paper/medscan/R = new /obj/item/paper/medscan
|
||||
R.color = "#eeffe8"
|
||||
R.set_content_unsafe("Scan ([connected.occupant])", format_occupant_data(connected.get_occupant_data()))
|
||||
|
||||
print(R, message = "\The [src] beeps, printing \the [R] after a moment.")
|
||||
print(R, message = "\The [src] beeps, printing \the [R] after a moment.", user = usr)
|
||||
|
||||
if("eject")
|
||||
if(connected)
|
||||
connected.eject()
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/FindDisplays()
|
||||
for(var/obj/machinery/computer/operating/D in SSmachinery.machinery)
|
||||
if (AreConnectedZLevels(D.z, z))
|
||||
connected_displays += D
|
||||
destroyed_event.register(D, src, PROC_REF(remove_display))
|
||||
return !!length(connected_displays)
|
||||
|
||||
/obj/machinery/body_scanconsole/ui_interact(mob/user, var/datum/tgui/ui)
|
||||
if(!connected)
|
||||
to_chat(usr, SPAN_WARNING("[icon2html(src, usr)]Error: No body scanner detected."))
|
||||
return
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "BodyScanner", "Zeng-Hu Pharmaceuticals Body Scanner", 1200, 800)
|
||||
ui = new(user, src, "BodyScanner", "Zeng-Hu Pharmaceuticals Body Scanner", 450, 500)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/remove_display(obj/machinery/computer/operating/display)
|
||||
connected_displays -= display
|
||||
destroyed_event.unregister(display, src, PROC_REF(remove_display))
|
||||
|
||||
/obj/machinery/body_scanconsole/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"noscan" = null,
|
||||
@@ -351,6 +347,7 @@
|
||||
"occupied" = null,
|
||||
"invalid" = null,
|
||||
"ipc" = null,
|
||||
"stationtime" = null,
|
||||
"stat" = null,
|
||||
"name" = null,
|
||||
"species" = null,
|
||||
@@ -360,6 +357,7 @@
|
||||
"blood_pressure_level" = null,
|
||||
"blood_volume" = null,
|
||||
"blood_o2" = null,
|
||||
"blood_type" = null,
|
||||
"rads" = null,
|
||||
"cloneLoss" = null,
|
||||
"oxyLoss" = null,
|
||||
@@ -419,6 +417,8 @@
|
||||
if(occupant.status_flags & FAKEDEATH)
|
||||
displayed_stat = DEAD
|
||||
blood_oxygenation = min(blood_oxygenation, BLOOD_VOLUME_SURVIVE)
|
||||
|
||||
data["stationtime"] = worldtime2text()
|
||||
data["stat"] = displayed_stat
|
||||
data["name"] = occupant.name
|
||||
data["species"] = occupant.get_species()
|
||||
@@ -428,6 +428,7 @@
|
||||
data["blood_pressure_level"] = occupant.get_blood_pressure_alert()
|
||||
data["blood_volume"] = occupant.get_blood_volume()
|
||||
data["blood_o2"] = blood_oxygenation
|
||||
data["blood_type"] = occupant.dna.b_type
|
||||
data["rads"] = occupant.total_radiation
|
||||
|
||||
data["cloneLoss"] = get_severity(occupant.getCloneLoss(), TRUE)
|
||||
@@ -451,8 +452,10 @@
|
||||
data["organs"] = get_internal_wound_data(occupant)
|
||||
data["has_internal_injuries"] = has_internal_injuries
|
||||
data["has_external_injuries"] = has_external_injuries
|
||||
var/list/missing = get_missing_organs(occupant)
|
||||
data["missing_organs"] = missing
|
||||
var/list/missing_limbs = get_missing_limbs(occupant)
|
||||
data["missing_limbs"] = missing_limbs
|
||||
var/list/missing_organs = get_missing_organs(occupant)
|
||||
data["missing_organs"] = missing_organs
|
||||
return data
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/get_internal_damage(var/obj/item/organ/internal/I)
|
||||
@@ -485,6 +488,17 @@
|
||||
missingOrgans += organ_name
|
||||
return capitalize(english_list(missingOrgans))
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/get_missing_limbs(var/mob/living/carbon/human/H)
|
||||
var/list/missingLimbs = list()
|
||||
var/list/species_limbs = H.species.has_limbs
|
||||
for(var/limb_tag in species_limbs)
|
||||
var/obj/item/organ/external/E = H.get_organ(limb_tag)
|
||||
if(!locate(E) in H.organs)
|
||||
var/list/organ_data = species_limbs[limb_tag]
|
||||
var/organ_descriptor = organ_data["descriptor"]
|
||||
missingLimbs += organ_descriptor
|
||||
return capitalize(english_list(missingLimbs))
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/get_external_wound_data(var/mob/living/carbon/human/H)
|
||||
// Limbs.
|
||||
var/organs = list()
|
||||
@@ -499,7 +513,7 @@
|
||||
var/list/wounds = list()
|
||||
|
||||
if (O.status & ORGAN_ROBOT)
|
||||
wounds += "appears to be composed of inorganic material"
|
||||
wounds += "inorganic"
|
||||
if (O.status & ORGAN_ARTERY_CUT)
|
||||
wounds += "severed [O.artery_name]"
|
||||
if (O.tendon_status() & TENDON_CUT)
|
||||
@@ -513,34 +527,37 @@
|
||||
if (O.status & ORGAN_BROKEN)
|
||||
wounds += "[O.broken_description]"
|
||||
if (O.open)
|
||||
wounds += "has an open wound"
|
||||
wounds += "open"
|
||||
|
||||
var/list/infection = list()
|
||||
if (O.germ_level)
|
||||
var/level = get_infection_level(O.germ_level)
|
||||
if (level && level != "")
|
||||
wounds += "shows symptoms of \a [level] infection"
|
||||
infection += "[level]"
|
||||
if (O.rejecting)
|
||||
wounds += "shows symptoms indicating limb rejection"
|
||||
infection += "rejection"
|
||||
|
||||
if (O.implants.len)
|
||||
var/unk = 0
|
||||
var/list/organic = list()
|
||||
for (var/atom/movable/I in O.implants)
|
||||
if(is_type_in_list(I, known_implants))
|
||||
wounds += "\a [I.name] is installed"
|
||||
wounds += "[I.name] installed"
|
||||
else if(istype(I, /obj/effect/spider))
|
||||
organic += I
|
||||
else
|
||||
unk += 1
|
||||
if (unk)
|
||||
wounds += "has unknown objects present"
|
||||
wounds += "unknown objects present"
|
||||
var/friends = length(organic)
|
||||
if(friends)
|
||||
wounds += friends > 1 ? "multiple abnormal organic bodies present" : "abnormal organic body present"
|
||||
wounds += friends > 1 ? "multiple abnormal organic bodies" : "abnormal organic body"
|
||||
|
||||
if(length(wounds) || brute_damage != "None" || burn_damage != "None")
|
||||
has_external_injuries = TRUE
|
||||
|
||||
data["wounds"] = capitalize(english_list(wounds, "None"))
|
||||
data["infection"] = capitalize(english_list(infection, "None"))
|
||||
organs += list(data)
|
||||
|
||||
return organs
|
||||
@@ -558,63 +575,70 @@
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
internal_damage = "Severe" // fake some brain damage
|
||||
if(!(O.status & ORGAN_DEAD)) // to prevent this wound from appearing twice
|
||||
wounds += "Necrotic and decaying."
|
||||
wounds += "necrotic; dead"
|
||||
if(H.has_brain_worms())
|
||||
wounds += "Has an abnormal growth."
|
||||
wounds += "abnormal growth"
|
||||
data["damage"] = internal_damage
|
||||
if(O.is_broken())
|
||||
wounds += "broken"
|
||||
else if(O.is_bruised())
|
||||
wounds += "bruised"
|
||||
if(istype(O, /obj/item/organ/internal/lungs))
|
||||
var/obj/item/organ/internal/lungs/L = O
|
||||
if(L.is_broken())
|
||||
wounds += get_broken_lung_desc()
|
||||
else if(L.is_bruised())
|
||||
wounds += get_collapsed_lung_desc()
|
||||
if(L.rescued)
|
||||
wounds += "has a small puncture wound"
|
||||
wounds += "punctured"
|
||||
|
||||
if(O.status & ORGAN_DEAD)
|
||||
wounds += "necrotic and decaying"
|
||||
if(O.can_recover())
|
||||
wounds += "necrotic; debridable"
|
||||
else
|
||||
wounds += "necrotic; dead"
|
||||
|
||||
if(istype(O, H.species.vision_organ))
|
||||
if(H.sdisabilities & BLIND)
|
||||
wounds += "appears to have cataracts"
|
||||
wounds += "has cataracts"
|
||||
else if(H.disabilities & NEARSIGHTED)
|
||||
wounds += "appears to have misaligned retinas"
|
||||
wounds += "has misaligned retinas"
|
||||
|
||||
var/list/infection = list()
|
||||
if(O.germ_level)
|
||||
var/level = get_infection_level(O.germ_level)
|
||||
if (level && level != "")
|
||||
wounds += "shows symptoms of \a [level] infection"
|
||||
infection += "[level]"
|
||||
|
||||
if(O.rejecting)
|
||||
wounds += "shows symptoms of organ rejection"
|
||||
infection += "rejection"
|
||||
|
||||
if(O.get_scarring_level() > 0.01)
|
||||
wounds += "[O.get_scarring_results()]"
|
||||
|
||||
if(length(wounds) || internal_damage != "None")
|
||||
if(length(wounds) || internal_damage != "None" || length(infection))
|
||||
has_internal_injuries = TRUE
|
||||
|
||||
data["wounds"] = english_list(wounds, "None")
|
||||
if(!length(infection))
|
||||
infection += "healthy"
|
||||
|
||||
data["wounds"] = capitalize(english_list(wounds, "None"))
|
||||
data["infection"] = capitalize(english_list(infection, "None"))
|
||||
organs += list(data)
|
||||
return organs
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/get_infection_level(var/level)
|
||||
switch (level)
|
||||
if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200)
|
||||
return "mild"
|
||||
return "Sepsis"
|
||||
if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300)
|
||||
return "worsening mild"
|
||||
return "Worsening Sepsis"
|
||||
if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400)
|
||||
return "borderline acute"
|
||||
return "Borderline Severe Sepsis"
|
||||
if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200)
|
||||
return "acute"
|
||||
return "Severe Sepsis"
|
||||
if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300)
|
||||
return "worsening acute"
|
||||
return "Worsening Severe Sepsis"
|
||||
if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400)
|
||||
return "borderline septic"
|
||||
return "Borderline Septic Shock"
|
||||
if (INFECTION_LEVEL_THREE to INFINITY)
|
||||
return "septic"
|
||||
return "Septic Shock"
|
||||
|
||||
return ""
|
||||
|
||||
@@ -633,12 +657,55 @@
|
||||
return
|
||||
var/mob/living/carbon/human/H = occupant
|
||||
|
||||
var/displayed_stat = H.stat
|
||||
var/blood_oxygenation = H.get_blood_oxygenation()
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
displayed_stat = DEAD
|
||||
blood_oxygenation = min(blood_oxygenation, BLOOD_VOLUME_SURVIVE)
|
||||
switch(displayed_stat)
|
||||
if(CONSCIOUS)
|
||||
displayed_stat = "Conscious"
|
||||
if(UNCONSCIOUS)
|
||||
displayed_stat = "Unconscious"
|
||||
if(DEAD)
|
||||
displayed_stat = "DEAD"
|
||||
|
||||
var/pulse_result
|
||||
if(H.should_have_organ(BP_HEART))
|
||||
var/obj/item/organ/internal/heart/heart = H.internal_organs_by_name[BP_HEART]
|
||||
if(!heart)
|
||||
pulse_result = 0
|
||||
else if(BP_IS_ROBOTIC(heart))
|
||||
pulse_result = -2
|
||||
else if(H.status_flags & FAKEDEATH)
|
||||
pulse_result = 0
|
||||
else
|
||||
pulse_result = H.get_pulse(GETPULSE_TOOL)
|
||||
else
|
||||
pulse_result = -1
|
||||
|
||||
if(pulse_result == ">250")
|
||||
pulse_result = -3
|
||||
|
||||
var/datum/reagents/R = H.bloodstr
|
||||
|
||||
connected.has_internal_injuries = FALSE
|
||||
connected.has_external_injuries = FALSE
|
||||
var/list/bodyparts = connected.get_external_wound_data(H)
|
||||
var/list/organs = connected.get_internal_wound_data(H)
|
||||
|
||||
var/list/occupant_data = list(
|
||||
"stationtime" = worldtime2text(),
|
||||
"stat" = displayed_stat,
|
||||
"name" = H.name,
|
||||
"species" = H.get_species(),
|
||||
|
||||
"brain_activity" = H.get_brain_status(),
|
||||
"pulse" = text2num(pulse_result),
|
||||
"blood_volume" = H.get_blood_volume(),
|
||||
"blood_oxygenation" = H.get_blood_oxygenation(),
|
||||
"blood_pressure" = H.get_blood_pressure(),
|
||||
"blood_type" = H.dna.b_type,
|
||||
|
||||
"bruteloss" = get_severity(H.getBruteLoss(), TRUE),
|
||||
"fireloss" = get_severity(H.getFireLoss(), TRUE),
|
||||
@@ -648,159 +715,122 @@
|
||||
|
||||
"rads" = H.total_radiation,
|
||||
"paralysis" = H.paralysis,
|
||||
"bodytemp" = H.bodytemperature - T0C,
|
||||
"bodytemp" = H.bodytemperature,
|
||||
"borer_present" = H.has_brain_worms(),
|
||||
"inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/inaprovaline),
|
||||
"dexalin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dexalin),
|
||||
"soporific_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/soporific),
|
||||
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/bicaridine),
|
||||
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dermaline),
|
||||
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/thetamycin),
|
||||
"blood_amount" = REAGENT_VOLUME(H.vessel, /singleton/reagent/blood),
|
||||
"disabilities" = H.sdisabilities,
|
||||
"lung_ruptured" = H.is_lung_ruptured(),
|
||||
"lung_rescued" = H.is_lung_rescued(),
|
||||
"external_organs" = H.organs.Copy(),
|
||||
"internal_organs" = H.internal_organs.Copy(),
|
||||
"species_organs" = H.species.has_organ //Just pass a reference for this, it shouldn't ever be modified outside of the datum.
|
||||
"inaprovaline_amount" = REAGENT_VOLUME(R, /singleton/reagent/inaprovaline),
|
||||
"dexalin_amount" = REAGENT_VOLUME(R, /singleton/reagent/dexalin),
|
||||
"soporific_amount" = REAGENT_VOLUME(R, /singleton/reagent/soporific),
|
||||
"bicaridine_amount" = REAGENT_VOLUME(R, /singleton/reagent/bicaridine),
|
||||
"dermaline_amount" = REAGENT_VOLUME(R, /singleton/reagent/dermaline),
|
||||
"thetamycin_amount" = REAGENT_VOLUME(R, /singleton/reagent/thetamycin),
|
||||
"other_amount" = R.total_volume - (REAGENT_VOLUME(R, /singleton/reagent/inaprovaline) + REAGENT_VOLUME(R, /singleton/reagent/soporific) + REAGENT_VOLUME(R, /singleton/reagent/bicaridine) + REAGENT_VOLUME(R, /singleton/reagent/dexalin) + REAGENT_VOLUME(R, /singleton/reagent/dermaline) + REAGENT_VOLUME(R, /singleton/reagent/thetamycin)),
|
||||
"bodyparts" = bodyparts,
|
||||
"organs" = organs,
|
||||
"has_internal_injuries" = connected.has_internal_injuries,
|
||||
"has_external_injuries" = connected.has_external_injuries,
|
||||
"missing_limbs" = connected.get_missing_limbs(H),
|
||||
"missing_organs" = connected.get_missing_organs(H)
|
||||
)
|
||||
return occupant_data
|
||||
|
||||
|
||||
/obj/machinery/body_scanconsole/proc/format_occupant_data(var/list/occ)
|
||||
var/dat = "<span class='notice'><b>Scan performed at [occ["stationtime"]]</b></span><br>"
|
||||
dat += "<span class='notice'><b>Occupant Statistics:</b></span><br>"
|
||||
dat += text("Brain Activity: []<br>", occ["brain_activity"])
|
||||
dat += text("Blood Pressure: []<br>", occ["blood_pressure"])
|
||||
dat += text("Blood Oxygenation: []%<br>", occ["blood_oxygenation"])
|
||||
dat += text("Blood Volume: []%<br>", occ["blood_volume"])
|
||||
dat += text("Physical Trauma: []<br>", occ["bruteloss"])
|
||||
var/dat = "<font face=\"Courier New\"><font size=\"1\">Scan performed at [occ["stationtime"]]</font></font><br>"
|
||||
dat += "<font face=\"Verdana\">"
|
||||
dat += "<b>Patient Status</b><br><HR>"
|
||||
dat += "<font size=\"1\">"
|
||||
dat += text("Name: []<br>", occ["name"])
|
||||
dat += text("Status: []<br>", occ["stat"])
|
||||
dat += text("Species: []<br>", occ["species"])
|
||||
dat += text("Pulse: [] BPM<br>", occ["pulse"])
|
||||
dat += text("Brain Activity: []<br>", occ["brain_activity"])
|
||||
dat += text("Body Temperature: []°C ", (occ["bodytemp"] - T0C))
|
||||
dat += text("([]°F)<br>", (occ["bodytemp"]*1.8-459.67))
|
||||
|
||||
dat += "<b><br>Blood Status</b><br><HR>"
|
||||
dat += text("Blood Pressure: []<br>", occ["blood_pressure"])
|
||||
dat += text("Blood Oxygenation: []%<br>", occ["blood_oxygenation"])
|
||||
dat += text("Blood Volume: []%<br>", occ["blood_volume"])
|
||||
dat += text("Blood Type: []<br>", occ["blood_type"])
|
||||
|
||||
if(occ["inaprovaline_amount"])
|
||||
dat += text("Inaprovaline: [] units<BR>", occ["inaprovaline_amount"])
|
||||
if(occ["soporific_amount"])
|
||||
dat += text("Soporific: [] units<BR>", occ["soporific_amount"])
|
||||
if(occ["dermaline_amount"])
|
||||
dat += text("[]\tDermaline: [] units</font><BR>", ("<font color='[occ["dermaline_amount"] < 20 ? "black" : "red"]'>"), occ["dermaline_amount"])
|
||||
if(occ["bicaridine_amount"])
|
||||
dat += text("[]\tBicaridine: [] units</font><BR>", ("<font color='[occ["bicaridine_amount"] < 20 ? "black" : "red"]'>"), occ["bicaridine_amount"])
|
||||
if(occ["dexalin_amount"])
|
||||
dat += text("[]\tDexalin: [] units</font><BR>", ("<font color='[occ["dexalin_amount"] < 20 ? "black" : "red"]'>"), occ["dexalin_amount"])
|
||||
if(occ["thetamycin_amount"])
|
||||
dat += text("[]\tThetamycin: [] units</font><BR>", ("<font color='[occ["thetamycin_amount"] < 20 ? "black" : "red"]'>"), occ["thetamycin_amount"])
|
||||
if(occ["other_amount"])
|
||||
dat += text("Other: [] units<BR>", occ["other_amount"])
|
||||
|
||||
dat += "<b><br>Symptom Status</b><br><HR>"
|
||||
dat += text("Radiation Level: [] Gy<br>", round(occ["rads"]))
|
||||
dat += text("Genetic Damage: []<br>", occ["cloneloss"])
|
||||
if(occ["paralysis"])
|
||||
dat += text("Est Paralysis Level: [] Seconds Left<br>", round(occ["paralysis"] / 4))
|
||||
else
|
||||
dat += text("Est Paralysis Level: None<br>")
|
||||
|
||||
dat += "<b><br>Damage Status</b><br><HR>"
|
||||
dat += text("Brute Trauma: []<br>", occ["bruteloss"])
|
||||
dat += text("Burn Severity: []<br>", occ["fireloss"])
|
||||
dat += text("Oxygen Deprivation: []<br>", occ["oxyloss"])
|
||||
dat += text("Systemic Organ Failure: []<br>", occ["toxloss"])
|
||||
dat += text("Burn Severity: []<br><br>", occ["fireloss"])
|
||||
dat += text("Toxin Exposure: []<br>", occ["toxloss"])
|
||||
|
||||
dat += text("[]\tRadiation Level %: []</font><br>", ("<font color='[occ["rads"] < 10 ? "blue" : "red"]'>"), occ["rads"])
|
||||
dat += text("Genetic Tissue Damage: []<br>", occ["cloneloss"])
|
||||
dat += text("Paralysis Summary %: [] ([] seconds left!)<br>", occ["paralysis"], round(occ["paralysis"] / 4))
|
||||
dat += text("Body Temperature: [occ["bodytemp"]]°C<br><HR>")
|
||||
|
||||
if(occ["borer_present"])
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<br>"
|
||||
|
||||
dat += text("Inaprovaline: [] units<BR>", occ["inaprovaline_amount"])
|
||||
dat += text("Soporific: [] units<BR>", occ["soporific_amount"])
|
||||
dat += text("[]\tDermaline: [] units</FONT><BR>", ("<font color='[occ["dermaline_amount"] < 20 ? "black" : "red"]'>"), occ["dermaline_amount"])
|
||||
dat += text("[]\tBicaridine: [] units</font><BR>", ("<font color='[occ["bicaridine_amount"] < 20 ? "black" : "red"]'>"), occ["bicaridine_amount"])
|
||||
dat += text("[]\tDexalin: [] units</font><BR>", ("<font color='[occ["dexalin_amount"] < 20 ? "black" : "red"]'>"), occ["dexalin_amount"])
|
||||
dat += text("[]\tThetamycin: [] units</font><BR>", ("<font color='[occ["thetamycin_amount"] < 20 ? "black" : "red"]'>"), occ["thetamycin_amount"])
|
||||
|
||||
dat += "<HR><table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<th>Organ</th>"
|
||||
dat += "<th>Burn Severity</th>"
|
||||
dat += "<th>Physical Trauma</th>"
|
||||
dat += "<th>Other Wounds</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/obj/item/organ/external/e in occ["external_organs"])
|
||||
var/list/wounds = list()
|
||||
dat += "<br><b>Body Status</b><HR>"
|
||||
|
||||
if(occ["has_external_injuries"])
|
||||
dat += "<table border='1'>"
|
||||
dat += "<tr>"
|
||||
|
||||
if(e.status & ORGAN_ARTERY_CUT)
|
||||
wounds += "severed [e.artery_name]"
|
||||
if(e.tendon_status() & TENDON_CUT)
|
||||
wounds += "severed [e.tendon.name]"
|
||||
if(istype(e, /obj/item/organ/external/chest) && occ["lung_ruptured"])
|
||||
wounds += "lung ruptured"
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
wounds += "splinted"
|
||||
if(ORGAN_IS_DISLOCATED(e))
|
||||
wounds += "dislocated"
|
||||
if(e.status & ORGAN_BLEEDING)
|
||||
wounds += "bleeding"
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
wounds += "[e.broken_description]"
|
||||
if(e.status & ORGAN_ROBOT)
|
||||
wounds += "prosthetic"
|
||||
if(e.open)
|
||||
wounds += "open"
|
||||
|
||||
var/infection = get_infection_level(e.germ_level)
|
||||
if (infection != "")
|
||||
var/infected = "[infection] infection"
|
||||
if(e.rejecting)
|
||||
infected += " (being rejected)"
|
||||
wounds += infection
|
||||
|
||||
if (e.implants.len)
|
||||
var/unk = 0
|
||||
var/list/organic = list()
|
||||
var/imp
|
||||
for(var/I in e.implants)
|
||||
if(istype(I, /obj/item/implant))
|
||||
var/obj/item/implant/A = I
|
||||
if (A.hidden)
|
||||
return
|
||||
else if(A.known)
|
||||
imp += "[I] implanted:"
|
||||
else
|
||||
unk += 1
|
||||
else if(istype(I, /obj/effect/spider))
|
||||
organic += I
|
||||
else
|
||||
unk += 1
|
||||
if(unk)
|
||||
wounds += "has unknown objects present:"
|
||||
var/friends = length(organic)
|
||||
if(friends)
|
||||
wounds += friends > 1 ? "multiple abnormal organic bodies present" : "abnormal organic body present"
|
||||
if(!length(wounds))
|
||||
wounds += "none"
|
||||
if(!e.is_stump())
|
||||
dat += "<td>[e.name]</td><td>[get_severity(e.burn_dam, TRUE)]</td><td>[get_severity(e.brute_dam, TRUE)]</td><td>[capitalize(english_list(wounds))]</td>"
|
||||
else
|
||||
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not [e.is_stump() ? "Found" : "Attached Completely"]</td>"
|
||||
dat += "<th>Name</th>"
|
||||
dat += "<th>Brute</th>"
|
||||
dat += "<th>Burn</th>"
|
||||
dat += "<th>Complications</th>"
|
||||
dat += "<th>Immune</th>"
|
||||
dat += "</tr>"
|
||||
for(var/list/data in occ["bodyparts"]) // cant believe this shit worked HOLY FUCK
|
||||
|
||||
for(var/obj/item/organ/internal/i in occ["internal_organs"])
|
||||
dat += "<tr>"
|
||||
dat += "<td>[data["name"]]</td><td>[data["brute_damage"]]</td><td>[data["burn_damage"]]</td><td>[data["wounds"]]</td><td>[data["infection"]]</td>"
|
||||
dat += "</tr>"
|
||||
|
||||
var/mech = ""
|
||||
if(i.robotic == ROBOTIC_ASSISTED)
|
||||
mech = "Assisted:"
|
||||
if(i.robotic == ROBOTIC_MECHANICAL)
|
||||
mech = "Mechanical:"
|
||||
if(!has_external_injuries)
|
||||
dat += "No external injuries detected.<br>"
|
||||
else
|
||||
dat += "</table>"
|
||||
|
||||
var/infection = get_infection_level(i.germ_level)
|
||||
if(infection == "")
|
||||
infection = "No infection."
|
||||
else
|
||||
infection = "[infection] infection."
|
||||
if(i.rejecting)
|
||||
infection += "(being rejected)."
|
||||
if(occ["missing_limbs"] != "Nothing")
|
||||
dat += text("<span class='warning'>Missing limbs : [occ["missing_limbs"]]</span><BR>")
|
||||
|
||||
var/necrotic = ""
|
||||
if(i.get_scarring_level() > 0.01)
|
||||
necrotic += " [i.get_scarring_results()]."
|
||||
if(i.status & ORGAN_DEAD)
|
||||
necrotic = " <span class='warning'>Necrotic and decaying</span>."
|
||||
|
||||
var/rescued = ""
|
||||
if(istype(i, /obj/item/organ/internal/lungs) && occ["lung_rescued"])
|
||||
rescued = " Has a small puncture wound."
|
||||
dat += "<br><b>Internal Organ Status<HR></b>"
|
||||
|
||||
if(occ["has_internal_injuries"])
|
||||
dat += "<table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[get_internal_damage(i)]</td><td>[infection][mech][necrotic][rescued]</td><td></td>"
|
||||
dat += "<th>Name</th>"
|
||||
dat += "<th>Damage</th>"
|
||||
dat += "<th>Complications</th>"
|
||||
dat += "<th>Immune</th>"
|
||||
dat += "</tr>"
|
||||
dat += "</table>"
|
||||
for(var/list/data in occ["organs"]) // cant believe this shit worked HOLY FUCK
|
||||
|
||||
var/list/species_organs = occ["species_organs"]
|
||||
for(var/organ_name in species_organs)
|
||||
if(!locate(species_organs[organ_name]) in occ["internal_organs"])
|
||||
dat += text("<span class='warning'>No [organ_name] detected.</span><BR>")
|
||||
dat += "<tr>"
|
||||
dat += "<td>[data["name"]]</td><td>[data["damage"]]</td><td>[data["wounds"]]</td><td>[data["infection"]]</td>"
|
||||
dat += "</tr>"
|
||||
|
||||
if(!has_internal_injuries)
|
||||
dat += "No internal injuries detected.<br>"
|
||||
else
|
||||
dat += "</table>"
|
||||
|
||||
if(occ["missing_organs"] != "Nothing")
|
||||
dat += text("<span class='warning'>Missing organs : [occ["missing_organs"]]</span><BR>")
|
||||
|
||||
dat += "</font></font>"
|
||||
|
||||
if(occ["sdisabilities"] & BLIND)
|
||||
dat += text("<span class='warning'>Cataracts detected.</span><BR>")
|
||||
if(occ["sdisabilities"] & NEARSIGHTED)
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
return dat
|
||||
|
||||
@@ -8,371 +8,105 @@
|
||||
icon_screen = "crew"
|
||||
icon_keyboard = "teal_key"
|
||||
light_color = LIGHT_COLOR_BLUE
|
||||
|
||||
circuit = /obj/item/circuitboard/operating
|
||||
var/mob/living/carbon/human/victim = null
|
||||
var/obj/machinery/optable/table = null
|
||||
var/obj/machinery/body_scanconsole/internal_bodyscanner = null
|
||||
var/obj/item/paper/medscan/input_scan = null
|
||||
var/scan_slot = FALSE
|
||||
|
||||
var/backup_victim = null // Backup data
|
||||
var/backup_data = null
|
||||
var/list/bodyscans = list()
|
||||
var/selected = 0
|
||||
|
||||
var/last_critical // Spam checks for the alarms
|
||||
var/last_ba // Brain Activity
|
||||
var/last_bo // Blood Oxygenation
|
||||
|
||||
/obj/machinery/computer/operating/Initialize()
|
||||
. = ..()
|
||||
for(dir in list(NORTH,EAST,SOUTH,WEST))
|
||||
table = locate(/obj/machinery/optable, get_step(src, dir))
|
||||
/obj/machinery/computer/operating/New()
|
||||
..()
|
||||
for(var/obj/machinery/optable/T in orange(1,src))
|
||||
table = T
|
||||
if (table)
|
||||
table.computer = src
|
||||
break
|
||||
if(!internal_bodyscanner) // So it can scan correctly
|
||||
var/obj/machinery/body_scanconsole/S = new (src)
|
||||
S.forceMove(src)
|
||||
S.update_use_power(POWER_USE_OFF)
|
||||
internal_bodyscanner = S
|
||||
|
||||
/obj/machinery/computer/operating/Destroy()
|
||||
QDEL_NULL(table.computer)
|
||||
QDEL_NULL(internal_bodyscanner)
|
||||
QDEL_NULL(input_scan)
|
||||
return ..()
|
||||
|
||||
/obj/machinery/computer/operating/attack_ai(mob/user)
|
||||
if(!ai_can_interact(user))
|
||||
return
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
return attack_hand(user)
|
||||
|
||||
|
||||
/obj/machinery/computer/operating/attack_hand(mob/user)
|
||||
add_fingerprint(user)
|
||||
if(stat & (BROKEN|NOPOWER))
|
||||
return
|
||||
interact(user)
|
||||
|
||||
/obj/machinery/computer/operating/attackby(obj/item/O as obj, mob/user)
|
||||
if(!istype(O, /obj/item/paper/medscan))
|
||||
return ..()
|
||||
else if(scan_slot)
|
||||
if(input_scan)
|
||||
to_chat(usr, SPAN_NOTICE("You try to insert \the [O], but \the [src] buzzes. There is already a [O] inside!"))
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
if(O.name != "Scan ([victim])")
|
||||
to_chat(usr, SPAN_NOTICE("This scan is of a different patient! Please insert the scan of the correct patient."))
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 1)
|
||||
return TRUE
|
||||
|
||||
user.drop_from_inventory(O, src)
|
||||
input_scan = O
|
||||
input_scan.color = "#272727"
|
||||
input_scan.set_content_unsafe("Scan ([victim])", operating_format(get_medical_data(victim)))
|
||||
usr.visible_message("\The [src] pings, displaying \the [input_scan].")
|
||||
to_chat(usr, SPAN_NOTICE("You insert \the [O] into [src]."))
|
||||
playsound(src, 'sound/bureaucracy/scan.ogg', 50, 1)
|
||||
return TRUE
|
||||
else
|
||||
to_chat(usr, SPAN_WARNING("\The [src]'s scan slot is closed! Please put in a valid patient on the table to open it!"))
|
||||
return TRUE
|
||||
|
||||
/obj/machinery/computer/operating/interact(mob/user)
|
||||
if ( (get_dist(src, user) > 1 ) || (stat & (BROKEN|NOPOWER)) )
|
||||
if (!istype(user, /mob/living/silicon))
|
||||
user.unset_machine()
|
||||
user << browse(null, "window=op")
|
||||
return
|
||||
|
||||
user.set_machine(src)
|
||||
var/dat = "<HEAD><TITLE>Operating Computer</TITLE><META HTTP-EQUIV='Refresh' CONTENT='10'></HEAD><BODY>\n"
|
||||
if(src.table && (src.table.check_victim()))
|
||||
src.victim = src.table.victim
|
||||
dat += {"
|
||||
<B>Patient Information:</B><BR>
|
||||
Brain Activity: <b>[victim.isFBP() ? "<span class='danger'>N/A</span>" : victim.get_brain_status()]</b><br>
|
||||
Pulse: <b>[victim.get_pulse(GETPULSE_TOOL)]</b><br>
|
||||
BP: <b>[victim.get_blood_pressure()]</b><br>
|
||||
Blood Oxygenation: <b>[victim.get_blood_oxygenation()]%</b><br>
|
||||
Blood Volume: <b>[victim.get_blood_volume()]%</b><br>
|
||||
"}
|
||||
if(!input_scan)
|
||||
dat += "Patient Scan: <b>Scan not found. Please insert a Medical Scan.</b><br>"
|
||||
else
|
||||
dat += {"
|
||||
Patient Scan: <b>[input_scan]</b><br>
|
||||
<a href='?src=\ref[src];action=update'>Update scan</a>
|
||||
<a href='?src=\ref[src];action=eject'>Remove and update scan</a>
|
||||
<a href='?src=\ref[src];action=print_new'>Print new scan</a><br><hr>
|
||||
"}
|
||||
dat += "[input_scan.get_content()]"
|
||||
else
|
||||
src.victim = null
|
||||
dat += {"
|
||||
<B>Patient Information:</B><BR>
|
||||
<B>No Patient Detected</B>
|
||||
"}
|
||||
var/datum/browser/op_win = new(user, "op", capitalize_first_letters(name), 450, 800)
|
||||
op_win.set_content(dat)
|
||||
op_win.open()
|
||||
|
||||
/obj/machinery/computer/operating/examine(mob/user, distance, is_adjacent)
|
||||
. = ..()
|
||||
if(distance <= 2)
|
||||
if(src.table && (src.table.check_victim()))
|
||||
src.victim = src.table.victim
|
||||
|
||||
to_chat(user, SPAN_NOTICE("Patient Info:"))
|
||||
to_chat(user, SPAN_NOTICE("Brain Activity: [victim.isFBP() ? "N/A" : victim.get_brain_status()]"))
|
||||
to_chat(user, SPAN_NOTICE("Pulse: [victim.get_pulse(GETPULSE_TOOL)]"))
|
||||
to_chat(user, SPAN_NOTICE("BP: [victim.get_blood_pressure()]"))
|
||||
to_chat(user, SPAN_NOTICE("Blood Oxygenation: [victim.get_blood_oxygenation()]%"))
|
||||
to_chat(user, SPAN_NOTICE("Blood Volume: [victim.get_blood_volume()]%"))
|
||||
if(!input_scan)
|
||||
to_chat(user, SPAN_NOTICE("Patient Scan: Scan not found. Please insert the Medical Scan."))
|
||||
else
|
||||
to_chat(user, SPAN_NOTICE("Patient Scan: [input_scan]"))
|
||||
else
|
||||
src.victim = null
|
||||
to_chat(user, SPAN_NOTICE("No Patient Detected"))
|
||||
|
||||
/obj/machinery/computer/operating/Topic(href, href_list)
|
||||
if(..())
|
||||
return TRUE
|
||||
if(href_list["action"])
|
||||
switch(href_list["action"])
|
||||
if("update")
|
||||
input_scan.set_content_unsafe("Scan ([victim])", operating_format(get_medical_data(victim)))
|
||||
usr.visible_message("\The [src] chimes, updating \the [input_scan].")
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, 1)
|
||||
if("eject")
|
||||
usr.visible_message("\The [src] beeps, ejecting \the [input_scan].")
|
||||
input_scan.color = "#eeffe8"
|
||||
input_scan.set_content_unsafe("Scan ([victim])", internal_bodyscanner.format_occupant_data(get_medical_data(victim))) // Re-formats it correctly
|
||||
input_scan.forceMove(usr.loc)
|
||||
usr.put_in_hands(input_scan)
|
||||
input_scan = null
|
||||
backup_clear()
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
if("print_new")
|
||||
print_new()
|
||||
usr.visible_message("\The [src] beeps, printing a new [input_scan] after a moment.")
|
||||
return
|
||||
return
|
||||
|
||||
ui_interact(user)
|
||||
|
||||
/obj/machinery/computer/operating/ui_interact(mob/user, var/datum/tgui/ui)
|
||||
ui = SStgui.try_update_ui(user, src, ui)
|
||||
if(!ui)
|
||||
ui = new(user, src, "Operating", "Patient Monitoring Console", 450, 500)
|
||||
ui.open()
|
||||
|
||||
/obj/machinery/computer/operating/process()
|
||||
if(operable())
|
||||
src.updateDialog()
|
||||
if(src.stat & BROKEN)
|
||||
QDEL_NULL(input_scan)
|
||||
QDEL_NULL(internal_bodyscanner)
|
||||
return PROCESS_KILL
|
||||
if(src.table && (src.table.check_victim())) // Specific warning alarms for specific conditions. Times to be tweaked according to feedback
|
||||
src.victim = src.table.victim
|
||||
scan_slot = TRUE
|
||||
if(src.victim.stat != DEAD && !src.victim.is_diona())
|
||||
if(victim.get_blood_oxygenation() < 30 && victim.get_brain_result() < 20)
|
||||
if(world.time > last_critical + 25 SECONDS)
|
||||
last_critical = world.time
|
||||
src.visible_message(SPAN_WARNING("Warning! <b>[victim]'s Blood Oxygenation AND Brain Activity</b> are in critical condition!"))
|
||||
playsound(src, 'sound/effects/3.wav', 75)
|
||||
updateDialog()
|
||||
|
||||
/obj/machinery/computer/operating/ui_data(mob/user)
|
||||
var/list/data = list(
|
||||
"noscan" = null,
|
||||
"nocons" = null,
|
||||
"occupied" = null,
|
||||
"invalid" = null,
|
||||
"ipc" = null,
|
||||
"stat" = null,
|
||||
"name" = null,
|
||||
"species" = null,
|
||||
"brain_activity" = null,
|
||||
"pulse" = null,
|
||||
"blood_pressure" = null,
|
||||
"blood_pressure_level" = null,
|
||||
"blood_volume" = null,
|
||||
"blood_o2" = null,
|
||||
"blood_type" = null
|
||||
)
|
||||
|
||||
var/mob/living/carbon/human/occupant
|
||||
if(table)
|
||||
occupant = table.occupant
|
||||
|
||||
data["noscan"] = !!table.check_species()
|
||||
data["nocons"] = !table
|
||||
data["occupied"] = !!table.occupant
|
||||
data["invalid"] = !!table.check_species()
|
||||
data["ipc"] = occupant && isipc(occupant)
|
||||
|
||||
if(!data["invalid"])
|
||||
var/brain_result = occupant.get_brain_result()
|
||||
var/pulse_result
|
||||
if(occupant.should_have_organ(BP_HEART))
|
||||
var/obj/item/organ/internal/heart/heart = occupant.internal_organs_by_name[BP_HEART]
|
||||
if(!heart)
|
||||
pulse_result = 0
|
||||
else if(BP_IS_ROBOTIC(heart))
|
||||
pulse_result = -2
|
||||
else if(occupant.status_flags & FAKEDEATH)
|
||||
pulse_result = 0
|
||||
else
|
||||
if(victim.get_blood_oxygenation() < 30 && victim.get_brain_result() > 20)
|
||||
blood_oxygenation_alarm()
|
||||
if(victim.get_brain_result() < 20 && victim.get_blood_oxygenation() > 30)
|
||||
brain_activity_alarm()
|
||||
else if(input_scan)
|
||||
src.visible_message(SPAN_WARNING("Patient not found! Automatically ejecting the scan."))
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 1)
|
||||
input_scan.color = "#eeffe8"
|
||||
input_scan.set_content_unsafe("Scan ([backup_victim])", internal_bodyscanner.format_occupant_data(backup_data)) // To do: Figure out how to re-format without doing more shitcode
|
||||
input_scan.forceMove(src.loc)
|
||||
input_scan = null
|
||||
backup_clear()
|
||||
scan_slot = FALSE
|
||||
|
||||
/obj/machinery/computer/operating/proc/blood_oxygenation_alarm()
|
||||
if(world.time > last_bo + 25 SECONDS)
|
||||
last_bo = world.time
|
||||
src.visible_message(SPAN_WARNING("Warning! <b>[victim]'s Blood Oxygenation</b> is in critical condition!"))
|
||||
playsound(src, 'sound/machines/ringer.ogg', 50)
|
||||
|
||||
/obj/machinery/computer/operating/proc/brain_activity_alarm()
|
||||
if(world.time > last_ba + 20 SECONDS)
|
||||
last_ba = world.time
|
||||
src.visible_message(SPAN_WARNING("Warning! <b>[victim]'s Brain Activity</b> is in critical condition!"))
|
||||
playsound(src, 'sound/effects/alert.ogg', 50)
|
||||
|
||||
/obj/machinery/computer/operating/proc/backup_clear()
|
||||
backup_victim = null
|
||||
backup_data = null
|
||||
|
||||
// PRINTING SHENANIGANRY
|
||||
/obj/machinery/computer/operating/proc/print_new()
|
||||
var/obj/item/paper/medscan/S = new()
|
||||
usr.put_in_hands(S)
|
||||
S.color = "#eeffe8"
|
||||
S.set_content_unsafe("Scan ([victim])", internal_bodyscanner.format_occupant_data(get_medical_data(victim)))
|
||||
playsound(src, 'sound/bureaucracy/print.ogg', 50, 1)
|
||||
|
||||
/obj/machinery/computer/operating/proc/get_medical_data(var/mob/living/carbon/human/H)
|
||||
if (!ishuman(H))
|
||||
return
|
||||
|
||||
var/list/medical_data = list(
|
||||
"stationtime" = worldtime2text(),
|
||||
"brain_activity" = H.get_brain_status(),
|
||||
"blood_volume" = H.get_blood_volume(),
|
||||
"blood_oxygenation" = H.get_blood_oxygenation(),
|
||||
"blood_pressure" = H.get_blood_pressure(),
|
||||
|
||||
"bruteloss" = get_severity(H.getBruteLoss(), TRUE),
|
||||
"fireloss" = get_severity(H.getFireLoss(), TRUE),
|
||||
"oxyloss" = get_severity(H.getOxyLoss(), TRUE),
|
||||
"toxloss" = get_severity(H.getToxLoss(), TRUE),
|
||||
"cloneloss" = get_severity(H.getCloneLoss(), TRUE),
|
||||
|
||||
"rads" = H.total_radiation,
|
||||
"paralysis" = H.paralysis,
|
||||
"bodytemp" = H.bodytemperature,
|
||||
"borer_present" = H.has_brain_worms(),
|
||||
"inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/inaprovaline),
|
||||
"dexalin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dexalin),
|
||||
"stoxin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/soporific),
|
||||
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/bicaridine),
|
||||
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dermaline),
|
||||
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/thetamycin),
|
||||
"blood_amount" = REAGENT_VOLUME(H.vessel, /singleton/reagent/blood),
|
||||
"disabilities" = H.sdisabilities,
|
||||
"lung_ruptured" = H.is_lung_ruptured(),
|
||||
"lung_rescued" = H.is_lung_rescued(),
|
||||
"external_organs" = H.organs.Copy(),
|
||||
"internal_organs" = H.internal_organs.Copy(),
|
||||
"species_organs" = H.species.has_organ
|
||||
)
|
||||
backup_victim = H.name
|
||||
backup_data = medical_data
|
||||
return medical_data
|
||||
|
||||
/obj/machinery/computer/operating/proc/operating_format(var/list/occ) // Format to cut out redundant information
|
||||
var/dat = "<center><b>Scan last updated at [occ["stationtime"]]</b></center>"
|
||||
if(occ["borer_present"])
|
||||
dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.<br>"
|
||||
|
||||
dat += "<center><div style='background-color: #E8FAFF; color: black'><table border='1'>"
|
||||
dat += "<tr>"
|
||||
dat += "<th>Organ</th>"
|
||||
dat += "<th>Burn Severity</th>"
|
||||
dat += "<th>Physical Trauma</th>"
|
||||
dat += "<th>Other Wounds</th>"
|
||||
dat += "</tr>"
|
||||
|
||||
for(var/obj/item/organ/external/e in occ["external_organs"])
|
||||
var/AN = ""
|
||||
var/open = ""
|
||||
var/infected = ""
|
||||
var/imp = ""
|
||||
var/bled = ""
|
||||
var/robot = ""
|
||||
var/splint = ""
|
||||
var/internal_bleeding = ""
|
||||
var/severed_tendon = ""
|
||||
var/lung_ruptured = ""
|
||||
var/dislocated = ""
|
||||
|
||||
dat += "<tr>"
|
||||
|
||||
if(e.status & ORGAN_ARTERY_CUT)
|
||||
internal_bleeding = "Arterial bleeding."
|
||||
if(e.tendon_status() & TENDON_CUT)
|
||||
severed_tendon = "Severed tendon."
|
||||
if(istype(e, /obj/item/organ/external/chest) && occ["lung_ruptured"])
|
||||
lung_ruptured = "Lung ruptured."
|
||||
if(e.status & ORGAN_SPLINTED)
|
||||
splint = "Splinted."
|
||||
if(ORGAN_IS_DISLOCATED(e))
|
||||
dislocated = "Dislocated."
|
||||
if(e.status & ORGAN_BLEEDING)
|
||||
bled = "Bleeding."
|
||||
if(e.status & ORGAN_BROKEN)
|
||||
AN = "[e.broken_description]."
|
||||
if(e.status & ORGAN_ROBOT)
|
||||
robot = "Prosthetic."
|
||||
if(e.open)
|
||||
open = "Open."
|
||||
|
||||
var/infection = internal_bodyscanner.get_infection_level(e.germ_level)
|
||||
if (infection != "")
|
||||
infected = "[infection] infection"
|
||||
if(e.rejecting)
|
||||
infected += " (being rejected)"
|
||||
|
||||
if (e.implants.len)
|
||||
var/unknown_body = 0
|
||||
var/list/organic = list()
|
||||
for(var/I in e.implants)
|
||||
if(is_type_in_list(I,internal_bodyscanner.known_implants))
|
||||
imp += "[I] implanted:"
|
||||
else if(istype(I, /obj/effect/spider))
|
||||
organic += I
|
||||
else
|
||||
unknown_body++
|
||||
if(unknown_body)
|
||||
imp += "Unknown body present:"
|
||||
var/friends = length(organic)
|
||||
if(friends)
|
||||
imp += friends > 1 ? "Multiple abnormal organic bodies present:" : "Abnormal organic body present:"
|
||||
|
||||
if(!AN && !open && !infected && !imp)
|
||||
AN = "None:"
|
||||
if(!e.is_stump())
|
||||
dat += "<td>[e.name]</td><td>[get_severity(e.burn_dam, TRUE)]</td><td>[get_severity(e.brute_dam, TRUE)]</td><td>[robot][bled][AN][splint][open][infected][imp][dislocated][internal_bleeding][severed_tendon][lung_ruptured]</td>"
|
||||
pulse_result = occupant.get_pulse(GETPULSE_TOOL)
|
||||
else
|
||||
dat += "<td>[e.name]</td><td>-</td><td>-</td><td>Not [e.is_stump() ? "Found" : "Attached Completely"]</td>"
|
||||
dat += "</tr>"
|
||||
pulse_result = -1
|
||||
|
||||
for(var/obj/item/organ/internal/i in occ["internal_organs"])
|
||||
if(pulse_result == ">250")
|
||||
pulse_result = -3
|
||||
|
||||
var/mech = ""
|
||||
if(i.robotic == ROBOTIC_ASSISTED)
|
||||
mech = "Assisted:"
|
||||
if(i.robotic == ROBOTIC_MECHANICAL)
|
||||
mech = "Mechanical:"
|
||||
var/displayed_stat = occupant.stat
|
||||
var/blood_oxygenation = occupant.get_blood_oxygenation()
|
||||
if(occupant.status_flags & FAKEDEATH)
|
||||
displayed_stat = DEAD
|
||||
blood_oxygenation = min(blood_oxygenation, BLOOD_VOLUME_SURVIVE)
|
||||
|
||||
var/infection = internal_bodyscanner.get_infection_level(i.germ_level)
|
||||
if(infection == "")
|
||||
infection = "No Infection."
|
||||
else
|
||||
infection = "[infection] infection."
|
||||
if(i.rejecting)
|
||||
infection += "(being rejected)."
|
||||
data["stat"] = displayed_stat
|
||||
data["name"] = occupant.name
|
||||
data["species"] = occupant.get_species()
|
||||
data["brain_activity"] = brain_result
|
||||
data["pulse"] = text2num(pulse_result)
|
||||
data["blood_pressure"] = occupant.get_blood_pressure()
|
||||
data["blood_pressure_level"] = occupant.get_blood_pressure_alert()
|
||||
data["blood_volume"] = occupant.get_blood_volume()
|
||||
data["blood_o2"] = blood_oxygenation
|
||||
data["blood_type"] = occupant.dna.b_type
|
||||
|
||||
var/necrotic = ""
|
||||
if(i.get_scarring_level() > 0.01)
|
||||
necrotic += " [i.get_scarring_results()]."
|
||||
if(i.status & ORGAN_DEAD)
|
||||
necrotic = " <span class='warning'>Necrotic and decaying</span>."
|
||||
|
||||
var/rescued = ""
|
||||
if(istype(i, /obj/item/organ/internal/lungs) && occ["lung_rescued"])
|
||||
rescued = " Has a small puncture wound."
|
||||
|
||||
dat += "<tr>"
|
||||
dat += "<td>[i.name]</td><td>N/A</td><td>[internal_bodyscanner.get_internal_damage(i)]</td><td>[infection][mech][necrotic][rescued]</td><td></td>"
|
||||
dat += "</tr>"
|
||||
dat += "</table></div></center>"
|
||||
|
||||
var/list/species_organs = occ["species_organs"]
|
||||
for(var/organ_name in species_organs)
|
||||
if(!locate(species_organs[organ_name]) in occ["internal_organs"])
|
||||
dat += text("<span class='warning'>No [organ_name] detected.</span><BR>")
|
||||
|
||||
if(occ["sdisabilities"] & BLIND)
|
||||
dat += text("<span class='warning'>Cataracts detected.</span><BR>")
|
||||
if(occ["sdisabilities"] & NEARSIGHTED)
|
||||
dat += text("<font color='red'>Retinal misalignment detected.</font><BR>")
|
||||
return dat
|
||||
return data
|
||||
|
||||
@@ -458,7 +458,7 @@
|
||||
/obj/machinery/computer/sentencing/proc/print_incident_overview(var/text)
|
||||
var/obj/item/paper/P = new /obj/item/paper
|
||||
P.set_content_unsafe("Incident Summary",text)
|
||||
print(P)
|
||||
print(P, user = usr)
|
||||
|
||||
/obj/machinery/computer/sentencing/proc/print_incident_report( var/sentence = 1 )
|
||||
var/error = incident.missingSentenceReq()
|
||||
@@ -473,7 +473,7 @@
|
||||
I.incident = incident
|
||||
I.sentence = sentence
|
||||
I.name = "Encoded Incident Report"
|
||||
print( I )
|
||||
print(I, user = usr)
|
||||
|
||||
return 0
|
||||
|
||||
|
||||
@@ -456,7 +456,7 @@ Class Procs:
|
||||
qdel(src)
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/print(var/obj/paper, var/play_sound = 1, var/print_sfx = 'sound/items/polaroid1.ogg', var/print_delay = 10, var/message)
|
||||
/obj/machinery/proc/print(var/obj/paper, var/play_sound = 1, var/print_sfx = /singleton/sound_category/print_sound, var/print_delay = 10, var/message, var/mob/user)
|
||||
if( printing )
|
||||
return 0
|
||||
|
||||
@@ -469,12 +469,15 @@ Class Procs:
|
||||
message = "\The [src] rattles to life and spits out a paper titled [paper]."
|
||||
visible_message(SPAN_NOTICE(message))
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(print_move_paper), paper), print_delay)
|
||||
addtimer(CALLBACK(src, PROC_REF(print_move_paper), paper, user), print_delay)
|
||||
|
||||
return 1
|
||||
|
||||
/obj/machinery/proc/print_move_paper(obj/paper)
|
||||
paper.forceMove(loc)
|
||||
/obj/machinery/proc/print_move_paper(obj/paper, mob/user)
|
||||
if(user)
|
||||
user.put_in_hands(paper)
|
||||
else
|
||||
paper.forceMove(loc)
|
||||
printing = FALSE
|
||||
|
||||
/obj/machinery/bullet_act(obj/item/projectile/P, def_zone)
|
||||
|
||||
@@ -404,7 +404,7 @@ var/list/obj/machinery/requests_console/allConsoles = list()
|
||||
|
||||
data = html_encode(data)
|
||||
C.set_content("NFC-[id] - [name]", data)
|
||||
print(C)
|
||||
print(C, user = usr)
|
||||
|
||||
paperstock--
|
||||
|
||||
|
||||
@@ -20,8 +20,8 @@ BREATH ANALYZER
|
||||
throw_range = 10
|
||||
matter = list(DEFAULT_WALL_MATERIAL = 200)
|
||||
origin_tech = list(TECH_MAGNET = 1, TECH_BIO = 1)
|
||||
var/mode = 1
|
||||
var/last_scan = 0
|
||||
var/mode = 1
|
||||
var/sound_scan = FALSE
|
||||
|
||||
/obj/item/device/healthanalyzer/attack(mob/living/M, mob/living/user)
|
||||
@@ -29,6 +29,8 @@ BREATH ANALYZER
|
||||
if(last_scan <= world.time - 20) //Spam limiter.
|
||||
last_scan = world.time
|
||||
sound_scan = TRUE
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
flick("[icon_state]-scan", src) //makes it so that it plays the scan animation on a successful scan
|
||||
health_scan_mob(M, user, mode, sound_scan = sound_scan)
|
||||
add_fingerprint(user)
|
||||
@@ -38,6 +40,8 @@ BREATH ANALYZER
|
||||
if(last_scan <= world.time - 20) //Spam limiter.
|
||||
last_scan = world.time
|
||||
sound_scan = TRUE
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
flick("[icon_state]-scan", src) //makes it so that it plays the scan animation on a successful scan
|
||||
health_scan_mob(user, user, mode, sound_scan = sound_scan)
|
||||
add_fingerprint(user)
|
||||
@@ -93,8 +97,8 @@ BREATH ANALYZER
|
||||
playsound(user.loc, 'sound/items/healthscanner/healthscanner_used.ogg', 25)
|
||||
return
|
||||
|
||||
if(!usr.IsAdvancedToolUser())
|
||||
to_chat(usr, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
if(!user.IsAdvancedToolUser())
|
||||
to_chat(user, "<span class='warning'>You don't have the dexterity to do this!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<b>[user]</b> runs a scanner over [M].","<span class='notice'>You run the scanner over [M].</span>")
|
||||
@@ -131,6 +135,9 @@ BREATH ANALYZER
|
||||
|
||||
. += "[b]Scan results for \the [H]:[endb]"
|
||||
|
||||
if(H.stat == DEAD || H.status_flags & FAKEDEATH)
|
||||
dat += "<span class='scan_warning'>[b]Time of Death:[endb] [worldtime2text(H.timeofdeath)]</span>"
|
||||
|
||||
// Brain activity.
|
||||
var/brain_status = H.get_brain_status()
|
||||
dat += "Brain activity: [brain_status]"
|
||||
@@ -152,9 +159,6 @@ BREATH ANALYZER
|
||||
else
|
||||
playsound(user.loc, 'sound/items/healthscanner/healthscanner_stable.ogg', 25)
|
||||
|
||||
if(H.stat == DEAD || H.status_flags & FAKEDEATH)
|
||||
dat += "<span class='scan_warning'>[b]Time of Death:[endb] [worldtime2text(H.timeofdeath)]</span>"
|
||||
|
||||
// Pulse rate.
|
||||
var/pulse_result = "normal"
|
||||
if(H.should_have_organ(BP_HEART))
|
||||
@@ -162,33 +166,27 @@ BREATH ANALYZER
|
||||
pulse_result = "<span class='danger'>0</span>"
|
||||
else
|
||||
pulse_result = H.get_pulse(GETPULSE_TOOL)
|
||||
pulse_result = "<span class='scan_green'>[pulse_result]</span>"
|
||||
pulse_result = "<span class='scan_green'>[pulse_result] BPM</span>"
|
||||
if(H.pulse() == PULSE_NONE)
|
||||
pulse_result = "<span class='scan_danger'>[pulse_result]</span>"
|
||||
pulse_result = "<span class='scan_danger'>[pulse_result] BPM</span>"
|
||||
else if(H.pulse() < PULSE_NORM)
|
||||
pulse_result = "<span class='scan_notice'>[pulse_result]</span>"
|
||||
pulse_result = "<span class='scan_notice'>[pulse_result] BPM</span>"
|
||||
else if(H.pulse() > PULSE_NORM)
|
||||
pulse_result = "<span class='scan_warning'>[pulse_result]</span>"
|
||||
pulse_result = "<span class='scan_warning'>[pulse_result] BPM</span>"
|
||||
else
|
||||
pulse_result = "<span class='scan_danger'>0</span>"
|
||||
dat += "Pulse rate: [pulse_result] bpm"
|
||||
pulse_result = "<span class='scan_danger'>0 BPM</span>"
|
||||
dat += "Pulse rate: [pulse_result]"
|
||||
|
||||
// Body temperature. Rounds to one digit after decimal.
|
||||
var/temperature_string
|
||||
if(H.bodytemperature < H.species.cold_level_1 || H.bodytemperature > H.species.heat_level_1)
|
||||
temperature_string = "Body temperature: <span class='scan_warning'>[round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)</span>"
|
||||
else
|
||||
temperature_string = "Body temperature: <span class='scan_green'>[round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)</span>"
|
||||
dat += temperature_string
|
||||
|
||||
// Blood pressure and blood type. Based on the idea of a normal blood pressure being 120 over 80.
|
||||
if(H.should_have_organ(BP_HEART))
|
||||
if(H.get_blood_volume() <= 70)
|
||||
dat += "<span class='scan_danger'>Severe blood loss detected.</span>"
|
||||
var/oxygenation_string = "<span class='scan_green'>[H.get_blood_oxygenation()]% blood oxygenation</span>"
|
||||
dat += "Blood type: <span class ='scan_green'>[H.dna.b_type]</span>"
|
||||
switch(H.get_blood_oxygenation())
|
||||
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
|
||||
oxygenation_string = "<span class='scan_notice'>[oxygenation_string]</span>"
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_OKAY)
|
||||
oxygenation_string = "<span class='scan_warning'>[oxygenation_string]</span>"
|
||||
if(-(INFINITY) to BLOOD_VOLUME_SURVIVE)
|
||||
oxygenation_string = "<span class='scan_danger'>[oxygenation_string]</span>"
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
oxygenation_string = "<span class='scan_danger'>0% blood oxygenation</span>"
|
||||
|
||||
var/blood_pressure_string
|
||||
switch(H.get_blood_pressure_alert())
|
||||
if(1)
|
||||
@@ -199,23 +197,38 @@ BREATH ANALYZER
|
||||
blood_pressure_string = "<span class='scan_warning'>[H.get_blood_pressure()]</span>"
|
||||
if(4)
|
||||
blood_pressure_string = "<span class='scan_danger'>[H.get_blood_pressure()]</span>"
|
||||
dat += "Blood pressure: [blood_pressure_string] ([oxygenation_string])"
|
||||
|
||||
var/blood_volume_string = "<span class='scan_green'>\>[BLOOD_VOLUME_SAFE]%</span>"
|
||||
switch(H.get_blood_oxygenation())
|
||||
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
|
||||
blood_volume_string = "<span class='scan_notice'>\<[BLOOD_VOLUME_SAFE]%</span>"
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_OKAY)
|
||||
blood_volume_string = "<span class='scan_warning'>\<[BLOOD_VOLUME_OKAY]%</span>"
|
||||
if(-(INFINITY) to BLOOD_VOLUME_SURVIVE)
|
||||
blood_volume_string = "<span class='scan_danger'>\<[BLOOD_VOLUME_SURVIVE]%</span>"
|
||||
|
||||
var/oxygenation_string = "<span class='scan_green'>[H.get_blood_oxygenation()]%</span>"
|
||||
switch(H.get_blood_oxygenation())
|
||||
if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE)
|
||||
oxygenation_string = "<span class='scan_notice'>[oxygenation_string]%</span>"
|
||||
if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_OKAY)
|
||||
oxygenation_string = "<span class='scan_warning'>[oxygenation_string]%</span>"
|
||||
if(-(INFINITY) to BLOOD_VOLUME_SURVIVE)
|
||||
oxygenation_string = "<span class='scan_danger'>[oxygenation_string]%</span>"
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
oxygenation_string = "<span class='scan_danger'>[rand(0,10)]%</span>"
|
||||
dat += "Blood pressure: [blood_pressure_string]"
|
||||
dat += "Blood oxygenation: [oxygenation_string]"
|
||||
dat += "Blood volume: [blood_volume_string]"
|
||||
dat += "Blood type: <span class ='scan_green'>[H.dna.b_type]</span>"
|
||||
else
|
||||
dat += "Blood pressure: N/A"
|
||||
|
||||
// Body temperature. Rounds to one digit after decimal.
|
||||
var/temperature_string
|
||||
if(H.bodytemperature < H.species.cold_level_1 || H.bodytemperature > H.species.heat_level_1)
|
||||
temperature_string = "Body temperature: <span class='scan_warning'>[round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)</span>"
|
||||
else
|
||||
temperature_string = "Body temperature: <span class='scan_green'>[round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)</span>"
|
||||
dat += temperature_string
|
||||
|
||||
// Traumatic shock.
|
||||
if(H.is_asystole() || (H.status_flags & FAKEDEATH))
|
||||
dat += "<span class='scan_danger'>Patient is suffering from cardiovascular shock. Administer CPR immediately.</span>"
|
||||
dat += "<span class='scan_danger'>Cardiovascular shock detected. Administer CPR immediately.</span>"
|
||||
else if(H.shock_stage > 80)
|
||||
dat += "<span class='scan_warning'>Patient is at serious risk of going into shock. Pain relief recommended.</span>"
|
||||
dat += "<span class='scan_warning'>Imminent cardiovascular shock. Pain relief recommended.</span>"
|
||||
|
||||
if(H.getOxyLoss() > 50)
|
||||
dat += "<span class='scan_blue'>[b]Severe oxygen deprivation detected.[endb]</span>"
|
||||
@@ -226,18 +239,6 @@ BREATH ANALYZER
|
||||
if(H.getBruteLoss() > 50)
|
||||
dat += "<span class='scan_red'>[b]Severe anatomical damage detected.[endb]</span>"
|
||||
|
||||
var/rad_result = "Radiation: "
|
||||
switch(H.total_radiation)
|
||||
if(RADS_NONE)
|
||||
rad_result += span("scan_green", "No radiation detected.")
|
||||
if(RADS_LOW to RADS_MED)
|
||||
rad_result += span("scan_orange", "Low levels of radiation poisoning detected.")
|
||||
if(RADS_MED to RADS_HIGH)
|
||||
rad_result += span("scan_orange", "Severe levels of radiation poisoning detected!")
|
||||
if(RADS_HIGH to INFINITY)
|
||||
rad_result += span("scan_red", "[b]Extreme levels of radiation poisoning detected![endb]")
|
||||
dat += rad_result
|
||||
|
||||
if(show_limb_damage)
|
||||
var/list/damaged = H.get_damaged_organs(1,1)
|
||||
if(damaged.len)
|
||||
@@ -347,9 +348,10 @@ BREATH ANALYZER
|
||||
. = jointext(.,"<br>")
|
||||
. = jointext(list(header,.),null)
|
||||
|
||||
to_chat(user, "<hr>")
|
||||
to_chat(user, .)
|
||||
to_chat(user, "<hr>")
|
||||
if(user)
|
||||
to_chat(user, "<hr>")
|
||||
to_chat(user, .)
|
||||
to_chat(user, "<hr>")
|
||||
|
||||
/obj/item/device/healthanalyzer/verb/toggle_mode()
|
||||
set name = "Switch Verbosity"
|
||||
@@ -683,31 +685,33 @@ BREATH ANALYZER
|
||||
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer
|
||||
name = "zeng-hu body analyzer"
|
||||
desc = "An expensive and varied-use health analyzer that prints full-body scans after a short scanning delay."
|
||||
icon_state = "zh-analyzer"
|
||||
item_state = "zh-analyzer"
|
||||
name = "advanced health analyzer"
|
||||
desc = "An expensive and varied-use health analyzer of Zeng-Hu design that prints full-body scans after a short scanning delay."
|
||||
icon_state = "adv-analyzer"
|
||||
item_state = "adv-analyzer"
|
||||
slot_flags = SLOT_BELT
|
||||
w_class = ITEMSIZE_NORMAL
|
||||
origin_tech = list(TECH_MAGNET = 2, TECH_BIO = 3)
|
||||
var/obj/machinery/body_scanconsole/internal_bodyscanner = null //this is used to print the date and to deal with extra
|
||||
var/obj/machinery/body_scanconsole/connected = null //this is used to print the date and to deal with extra
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer/Initialize()
|
||||
. = ..()
|
||||
if(!internal_bodyscanner)
|
||||
if(!connected)
|
||||
var/obj/machinery/body_scanconsole/S = new (src)
|
||||
S.forceMove(src)
|
||||
S.update_use_power(POWER_USE_OFF)
|
||||
internal_bodyscanner = S
|
||||
connected = S
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer/Destroy()
|
||||
if(internal_bodyscanner)
|
||||
QDEL_NULL(internal_bodyscanner)
|
||||
if(connected)
|
||||
QDEL_NULL(connected)
|
||||
return ..()
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer/attack(mob/living/M, mob/living/user)
|
||||
if(!internal_bodyscanner)
|
||||
if(!connected)
|
||||
return
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src]."))
|
||||
if(do_after(user, 7 SECONDS, M, DO_UNIQUE))
|
||||
print_scan(M, user)
|
||||
@@ -716,22 +720,63 @@ BREATH ANALYZER
|
||||
/obj/item/device/advanced_healthanalyzer/proc/print_scan(var/mob/M, var/mob/living/user)
|
||||
var/obj/item/paper/medscan/R = new(user.loc)
|
||||
R.color = "#eeffe8"
|
||||
R.set_content_unsafe("Scan ([M.name])", internal_bodyscanner.format_occupant_data(get_medical_data(M)))
|
||||
R.set_content_unsafe("Scan ([M.name])", connected.format_occupant_data(get_occupant_data(M)))
|
||||
|
||||
if(ishuman(user) && !(user.l_hand && user.r_hand))
|
||||
user.put_in_hands(R)
|
||||
user.visible_message("\The [src] spits out a piece of paper.")
|
||||
connected.print(R, message = "\The [src] beeps, printing \the [R] after a moment.", user = user)
|
||||
|
||||
/obj/item/device/advanced_healthanalyzer/proc/get_medical_data(var/mob/living/carbon/human/H)
|
||||
/obj/item/device/advanced_healthanalyzer/proc/get_occupant_data(var/mob/living/carbon/human/H)
|
||||
if (!ishuman(H))
|
||||
return
|
||||
|
||||
var/list/medical_data = list(
|
||||
var/displayed_stat = H.stat
|
||||
var/blood_oxygenation = H.get_blood_oxygenation()
|
||||
if(H.status_flags & FAKEDEATH)
|
||||
displayed_stat = DEAD
|
||||
blood_oxygenation = min(blood_oxygenation, BLOOD_VOLUME_SURVIVE)
|
||||
switch(displayed_stat)
|
||||
if(CONSCIOUS)
|
||||
displayed_stat = "Conscious"
|
||||
if(UNCONSCIOUS)
|
||||
displayed_stat = "Unconscious"
|
||||
if(DEAD)
|
||||
displayed_stat = "DEAD"
|
||||
|
||||
var/pulse_result
|
||||
if(H.should_have_organ(BP_HEART))
|
||||
var/obj/item/organ/internal/heart/heart = H.internal_organs_by_name[BP_HEART]
|
||||
if(!heart)
|
||||
pulse_result = 0
|
||||
else if(BP_IS_ROBOTIC(heart))
|
||||
pulse_result = -2
|
||||
else if(H.status_flags & FAKEDEATH)
|
||||
pulse_result = 0
|
||||
else
|
||||
pulse_result = H.get_pulse(GETPULSE_TOOL)
|
||||
else
|
||||
pulse_result = -1
|
||||
|
||||
if(pulse_result == ">250")
|
||||
pulse_result = -3
|
||||
|
||||
var/datum/reagents/R = H.bloodstr
|
||||
|
||||
connected.has_internal_injuries = FALSE
|
||||
connected.has_external_injuries = FALSE
|
||||
var/list/bodyparts = connected.get_external_wound_data(H)
|
||||
var/list/organs = connected.get_internal_wound_data(H)
|
||||
|
||||
var/list/occupant_data = list(
|
||||
"stationtime" = worldtime2text(),
|
||||
"stat" = displayed_stat,
|
||||
"name" = H.name,
|
||||
"species" = H.get_species(),
|
||||
|
||||
"brain_activity" = H.get_brain_status(),
|
||||
"pulse" = text2num(pulse_result),
|
||||
"blood_volume" = H.get_blood_volume(),
|
||||
"blood_oxygenation" = H.get_blood_oxygenation(),
|
||||
"blood_pressure" = H.get_blood_pressure(),
|
||||
"blood_type" = H.dna.b_type,
|
||||
|
||||
"bruteloss" = get_severity(H.getBruteLoss(), TRUE),
|
||||
"fireloss" = get_severity(H.getFireLoss(), TRUE),
|
||||
@@ -743,18 +788,18 @@ BREATH ANALYZER
|
||||
"paralysis" = H.paralysis,
|
||||
"bodytemp" = H.bodytemperature,
|
||||
"borer_present" = H.has_brain_worms(),
|
||||
"inaprovaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/inaprovaline),
|
||||
"dexalin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dexalin),
|
||||
"stoxin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/soporific),
|
||||
"bicaridine_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/bicaridine),
|
||||
"dermaline_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/dermaline),
|
||||
"thetamycin_amount" = REAGENT_VOLUME(H.reagents, /singleton/reagent/thetamycin),
|
||||
"blood_amount" = REAGENT_VOLUME(H.vessel, /singleton/reagent/blood),
|
||||
"disabilities" = H.sdisabilities,
|
||||
"lung_ruptured" = H.is_lung_ruptured(),
|
||||
"lung_rescued" = H.is_lung_rescued(),
|
||||
"external_organs" = H.organs.Copy(),
|
||||
"internal_organs" = H.internal_organs.Copy(),
|
||||
"species_organs" = H.species.has_organ
|
||||
"inaprovaline_amount" = REAGENT_VOLUME(R, /singleton/reagent/inaprovaline),
|
||||
"dexalin_amount" = REAGENT_VOLUME(R, /singleton/reagent/dexalin),
|
||||
"soporific_amount" = REAGENT_VOLUME(R, /singleton/reagent/soporific),
|
||||
"bicaridine_amount" = REAGENT_VOLUME(R, /singleton/reagent/bicaridine),
|
||||
"dermaline_amount" = REAGENT_VOLUME(R, /singleton/reagent/dermaline),
|
||||
"thetamycin_amount" = REAGENT_VOLUME(R, /singleton/reagent/thetamycin),
|
||||
"other_amount" = R.total_volume - (REAGENT_VOLUME(R, /singleton/reagent/inaprovaline) + REAGENT_VOLUME(R, /singleton/reagent/soporific) + REAGENT_VOLUME(R, /singleton/reagent/bicaridine) + REAGENT_VOLUME(R, /singleton/reagent/dexalin) + REAGENT_VOLUME(R, /singleton/reagent/dermaline) + REAGENT_VOLUME(R, /singleton/reagent/thetamycin)),
|
||||
"bodyparts" = bodyparts,
|
||||
"organs" = organs,
|
||||
"has_internal_injuries" = connected.has_internal_injuries,
|
||||
"has_external_injuries" = connected.has_external_injuries,
|
||||
"missing_limbs" = connected.get_missing_limbs(H),
|
||||
"missing_organs" = connected.get_missing_organs(H)
|
||||
)
|
||||
return medical_data
|
||||
return occupant_data
|
||||
|
||||
@@ -964,3 +964,9 @@
|
||||
'sound/effects/creatures/hivebot/hivebot-bark-003.ogg',
|
||||
'sound/effects/creatures/hivebot/hivebot-bark-005.ogg',
|
||||
)
|
||||
|
||||
/singleton/sound_category/print_sound
|
||||
sounds = list(
|
||||
'sound/items/polaroid1.ogg',
|
||||
'sound/items/polaroid2.ogg'
|
||||
)
|
||||
|
||||
@@ -120,7 +120,7 @@
|
||||
info = "<b><font size=\"4\">[src] analysis report #[report_num]</font></b><HR>"
|
||||
info += "<b>Scanned item:</b> [bloodsamp.name]<br><br>" + data
|
||||
P.set_content_unsafe(pname, info)
|
||||
print(P)
|
||||
print(P, user = usr)
|
||||
scanning = 0
|
||||
update_icon()
|
||||
return
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
report.update_icon()
|
||||
if(report.info)
|
||||
to_chat(user, report.info)
|
||||
print(report)
|
||||
print(report, user)
|
||||
|
||||
/obj/machinery/microscope/proc/remove_sample(var/mob/living/remover)
|
||||
if(!istype(remover) || remover.incapacitated() || !Adjacent(remover))
|
||||
|
||||
@@ -66,11 +66,7 @@
|
||||
|
||||
for(var/obj/item/spacecash/S in src)
|
||||
S.forceMove(src.loc)
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
break
|
||||
playsound(loc, /singleton/sound_category/print_sound, 50, 1)
|
||||
|
||||
/obj/machinery/atm/emag_act(var/remaining_charges, var/mob/user)
|
||||
if(emagged)
|
||||
@@ -110,10 +106,7 @@
|
||||
if(istype(I,/obj/item/spacecash))
|
||||
//consume the money
|
||||
authenticated_account.money += I:worth
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(loc, /singleton/sound_category/print_sound, 50, 1)
|
||||
|
||||
//create a transaction log entry
|
||||
var/datum/transaction/T = new()
|
||||
@@ -330,15 +323,12 @@
|
||||
R.stamped += /obj/item/stamp
|
||||
R.add_overlay(stampoverlay)
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Automatic Teller Machine.</i>"
|
||||
print(R)
|
||||
print(R, user = usr)
|
||||
|
||||
release_held_id(usr) // printing ends the ATM session similar to real life + prevents spam
|
||||
. = TRUE
|
||||
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(loc, /singleton/sound_category/print_sound, 50, 1)
|
||||
if ("print_transaction")
|
||||
if(authenticated_account)
|
||||
var/obj/item/paper/R = new()
|
||||
@@ -378,12 +368,9 @@
|
||||
R.stamped += /obj/item/stamp
|
||||
R.add_overlay(stampoverlay)
|
||||
R.stamps += "<HR><i>This paper has been stamped by the Automatic Teller Machine.</i>"
|
||||
print(R)
|
||||
print(R, user = usr)
|
||||
|
||||
if(prob(50))
|
||||
playsound(loc, 'sound/items/polaroid1.ogg', 50, 1)
|
||||
else
|
||||
playsound(loc, 'sound/items/polaroid2.ogg', 50, 1)
|
||||
playsound(loc, /singleton/sound_category/print_sound, 50, 1)
|
||||
release_held_id(usr) // printing ends the ATM session similar to real life + prevents spam
|
||||
. = TRUE
|
||||
|
||||
|
||||
@@ -299,13 +299,11 @@
|
||||
to_chat(user, SPAN_NOTICE("You switch to \the [src]'s [HA.fullScan ? "full body" : "basic"] scan mode."))
|
||||
|
||||
/obj/item/device/healthanalyzer/mech/attack(mob/living/M, var/mob/living/heavy_vehicle/user)
|
||||
sound_scan = FALSE
|
||||
if(last_scan <= world.time - 20) //Spam limiter.
|
||||
last_scan = world.time
|
||||
sound_scan = TRUE
|
||||
user.setClickCooldown(DEFAULT_QUICK_COOLDOWN)
|
||||
user.do_attack_animation(src)
|
||||
if(!fullScan)
|
||||
for(var/mob/pilot in user.pilots)
|
||||
health_scan_mob(M, pilot, TRUE, TRUE, sound_scan = sound_scan)
|
||||
health_scan_mob(M, pilot, TRUE, TRUE, sound_scan = TRUE)
|
||||
else
|
||||
user.visible_message("<b>[user]</b> starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src]."))
|
||||
if(do_after(user, 7 SECONDS))
|
||||
|
||||
@@ -240,7 +240,7 @@
|
||||
if(org.status & ORGAN_BROKEN)
|
||||
status += "hurts when touched"
|
||||
if(org.status & ORGAN_DEAD)
|
||||
status += "is bruised and necrotic"
|
||||
status += "is necrotic"
|
||||
if(!org.is_usable())
|
||||
status += "dangling uselessly"
|
||||
if(org.status & ORGAN_BLEEDING)
|
||||
|
||||
@@ -67,9 +67,9 @@
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable/revenant),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable/revenant),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg),
|
||||
|
||||
@@ -181,9 +181,9 @@
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach
|
||||
)
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/zombie),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest/zombie),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin/zombie),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/zombie),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm/zombie),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/zombie),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg/zombie),
|
||||
|
||||
@@ -240,22 +240,22 @@
|
||||
|
||||
///Determines the organs that the species spawns with and
|
||||
var/list/has_organ = list( // which required-organ checks are conducted.
|
||||
BP_BRAIN = /obj/item/organ/internal/brain,
|
||||
BP_EYES = /obj/item/organ/internal/eyes,
|
||||
BP_HEART = /obj/item/organ/internal/heart,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs,
|
||||
BP_LIVER = /obj/item/organ/internal/liver,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain,
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix,
|
||||
BP_EYES = /obj/item/organ/internal/eyes
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix
|
||||
)
|
||||
var/vision_organ // If set, this organ is required for vision. Defaults to BP_EYES if the species has them.
|
||||
var/breathing_organ // If set, this organ is required to breathe. Defaults to BP_LUNGS if the species has them.
|
||||
|
||||
var/list/has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg),
|
||||
|
||||
@@ -68,12 +68,12 @@
|
||||
grab_mod = 0.6 // Viney Tentacles and shit to cling onto
|
||||
resist_mod = 1.5 // Reasonably stronk, not moreso than an Unathi or robot.
|
||||
|
||||
has_organ = list( BP_STOMACH = /obj/item/organ/internal/stomach/diona)
|
||||
has_organ = list(BP_STOMACH = /obj/item/organ/internal/stomach/diona)
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/diona),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest/diona),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin/diona),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/diona),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm/diona),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/diona),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg/diona),
|
||||
|
||||
@@ -69,9 +69,9 @@ var/global/list/golem_types = list(
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable),
|
||||
|
||||
@@ -97,9 +97,9 @@
|
||||
vision_organ = BP_EYES
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/ipc),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest/ipc),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin/ipc),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/ipc),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm/ipc),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/ipc),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg/ipc),
|
||||
|
||||
@@ -129,13 +129,13 @@
|
||||
fall_mod = 0.25
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/skrell/neaera,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/skrell/neaera,
|
||||
BP_HEART = /obj/item/organ/internal/heart/skrell/neaera,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/skrell/neaera,
|
||||
BP_LIVER = /obj/item/organ/internal/liver/skrell/neaera,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/skrell/neaera,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/skrell/neaera,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/skrell/neaera
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach
|
||||
)
|
||||
|
||||
/datum/species/monkey/unathi
|
||||
|
||||
@@ -46,9 +46,9 @@
|
||||
possible_external_organs_modifications = list("Normal","Amputated","Prosthesis", "Diona Nymph")
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/skrell),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/skrell),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg),
|
||||
@@ -60,13 +60,13 @@
|
||||
)
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/skrell,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/skrell,
|
||||
BP_HEART = /obj/item/organ/internal/heart/skrell,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/skrell,
|
||||
BP_LIVER = /obj/item/organ/internal/liver/skrell,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/skrell,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/skrell,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/skrell
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach
|
||||
)
|
||||
|
||||
pain_messages = list("I can't feel my headtails", "You really need some painkillers", "Stars above, the pain")
|
||||
|
||||
@@ -38,9 +38,9 @@
|
||||
push_flags = MONKEY|SLIME|SIMPLE_ANIMAL
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest/unbreakable),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin/unbreakable),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head/unbreakable),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm/unbreakable),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/unbreakable),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg/unbreakable),
|
||||
|
||||
@@ -109,14 +109,14 @@
|
||||
zombie_type = SPECIES_ZOMBIE_TAJARA
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/tajara,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night,
|
||||
BP_HEART = /obj/item/organ/internal/heart/tajara,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/tajara,
|
||||
BP_LIVER = /obj/item/organ/internal/liver/tajara,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/tajara,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach/tajara,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/tajara,
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix/tajara,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix/tajara
|
||||
)
|
||||
|
||||
stomach_capacity = 6
|
||||
|
||||
@@ -160,21 +160,21 @@
|
||||
bodyfall_sound = /singleton/sound_category/bodyfall_machine_sound
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/tajara,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night,
|
||||
BP_HEART = /obj/item/organ/internal/heart/tajara/tesla_body,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/tajara,
|
||||
BP_LIVER = /obj/item/organ/internal/liver/tajara,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/tajara,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach/tajara,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/tajara,
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix/tajara,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night,
|
||||
BP_AUG_TESLA = /obj/item/organ/internal/augment/tesla/massive
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head),
|
||||
BP_CHEST = list("path" = /obj/item/organ/external/chest/tesla_body),
|
||||
BP_GROIN = list("path" = /obj/item/organ/external/groin/tesla_body),
|
||||
BP_HEAD = list("path" = /obj/item/organ/external/head),
|
||||
BP_L_ARM = list("path" = /obj/item/organ/external/arm/tesla_body),
|
||||
BP_R_ARM = list("path" = /obj/item/organ/external/arm/right/tesla_body),
|
||||
BP_L_LEG = list("path" = /obj/item/organ/external/leg/tesla_body),
|
||||
|
||||
@@ -105,14 +105,14 @@
|
||||
)
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/unathi,
|
||||
BP_HEART = /obj/item/organ/internal/heart/unathi,
|
||||
BP_LIVER = /obj/item/organ/internal/liver/unathi,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/unathi,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/unathi,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach/unathi,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/unathi
|
||||
)
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/unathi,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/unathi,
|
||||
BP_HEART = /obj/item/organ/internal/heart/unathi,
|
||||
BP_LIVER = /obj/item/organ/internal/liver/unathi,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/unathi,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/unathi,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach/unathi
|
||||
)
|
||||
|
||||
alterable_internal_organs = list(BP_HEART, BP_EYES, BP_LUNGS, BP_LIVER, BP_KIDNEYS, BP_STOMACH)
|
||||
|
||||
|
||||
@@ -101,6 +101,8 @@
|
||||
stamina_recovery = 2 //slow recovery
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/vaurca,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night/vaurca,
|
||||
BP_NEURAL_SOCKET = /obj/item/organ/internal/vaurca/neuralsocket,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/vaurca,
|
||||
BP_FILTRATION_BIT = /obj/item/organ/internal/vaurca/filtrationbit,
|
||||
@@ -109,9 +111,7 @@
|
||||
BP_LIVER = /obj/item/organ/internal/liver/vaurca,
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/vaurca,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach/vaurca,
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix/vaurca,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/vaurca,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night/vaurca
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix/vaurca
|
||||
)
|
||||
|
||||
has_limbs = list(
|
||||
|
||||
@@ -126,6 +126,8 @@
|
||||
default_h_style = "Bald"
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/vaurca,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night/vaurca,
|
||||
BP_NEURAL_SOCKET = /obj/item/organ/internal/vaurca/neuralsocket/admin,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/vaurca,
|
||||
BP_FILTRATION_BIT = /obj/item/organ/internal/vaurca/filtrationbit,
|
||||
@@ -135,8 +137,6 @@
|
||||
BP_KIDNEYS = /obj/item/organ/internal/kidneys/vaurca,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach/vaurca,
|
||||
BP_APPENDIX = /obj/item/organ/internal/appendix/vaurca,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/vaurca,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night/vaurca,
|
||||
BP_HIVENET_SHIELD = /obj/item/organ/internal/augment/hiveshield
|
||||
)
|
||||
|
||||
@@ -213,6 +213,8 @@
|
||||
)
|
||||
|
||||
has_organ = list(
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/vaurca,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night/vaurca,
|
||||
BP_NEURAL_SOCKET = /obj/item/organ/internal/vaurca/neuralsocket,
|
||||
BP_LUNGS = /obj/item/organ/internal/lungs/vaurca,
|
||||
BP_HEART = /obj/item/organ/internal/heart/vaurca,
|
||||
@@ -220,8 +222,6 @@
|
||||
BP_VAURCA_LIVER = /obj/item/organ/internal/liver/vaurca/robo,
|
||||
BP_VAURCA_KIDNEYS = /obj/item/organ/internal/kidneys/vaurca/robo,
|
||||
BP_STOMACH = /obj/item/organ/internal/stomach,
|
||||
BP_BRAIN = /obj/item/organ/internal/brain/vaurca,
|
||||
BP_EYES = /obj/item/organ/internal/eyes/night/vaurca,
|
||||
BP_FILTRATION_BIT = /obj/item/organ/internal/vaurca/filtrationbit,
|
||||
BP_HIVENET_SHIELD = /obj/item/organ/internal/augment/hiveshield/advanced
|
||||
)
|
||||
|
||||
@@ -129,9 +129,9 @@
|
||||
. = "damaged "
|
||||
if(status & ORGAN_DEAD)
|
||||
if(can_recover())
|
||||
. = "decaying [.]"
|
||||
. = "necrotic and debridable [.]"
|
||||
else
|
||||
. = "necrotic [.]"
|
||||
. = "necrotic and dead [.]"
|
||||
. = "[.][name]"
|
||||
|
||||
/obj/item/organ/internal/process()
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
/obj/item/organ/external/stump/Initialize(mapload, var/internal, var/obj/item/organ/external/limb)
|
||||
if(istype(limb))
|
||||
name = "[limb.name] stump"
|
||||
limb_name = limb.limb_name
|
||||
body_part = limb.body_part
|
||||
amputation_point = limb.amputation_point
|
||||
|
||||
@@ -219,7 +219,7 @@
|
||||
var/obj/machinery/photocopier/T = target
|
||||
flick(T.print_animation, target)
|
||||
--T.toner
|
||||
target.print(c, use_sound, 'sound/bureaucracy/print.ogg', delay)
|
||||
target.print(c, use_sound, 'sound/bureaucracy/print.ogg', delay, , user = usr)
|
||||
return c
|
||||
|
||||
/proc/photocopy(var/obj/machinery/target, var/obj/item/photo/photocopy, var/toner)
|
||||
|
||||
@@ -209,7 +209,7 @@ var/global/photo_count = 0
|
||||
if(!on || !pictures_left || ismob(target.loc)) return
|
||||
captureimage(target, user, flag)
|
||||
|
||||
playsound(loc, pick('sound/items/polaroid1.ogg', 'sound/items/polaroid2.ogg'), 75, 1, -3)
|
||||
playsound(loc, /singleton/sound_category/print_sound, 75, 1, -3)
|
||||
|
||||
pictures_left--
|
||||
to_chat(user, "<span class='notice'>[pictures_left] photos left.</span>")
|
||||
|
||||
@@ -427,7 +427,7 @@ won't update every console in existence) but it's more of a hassle to do. Also,
|
||||
info += GetResearchLevelsInfo()
|
||||
|
||||
PR.set_content_unsafe(pname, info)
|
||||
print(PR)
|
||||
print(PR, user = usr)
|
||||
spawn(10)
|
||||
screen = ((text2num(href_list["print"]) == 2) ? 5.0 : 1.1)
|
||||
updateUsrDialog()
|
||||
|
||||
@@ -282,7 +282,7 @@
|
||||
var/obj/item/paper/R = new /obj/item/paper(get_turf(src))
|
||||
R.color = "#fef8ff"
|
||||
R.set_content_unsafe("Weapon Analysis ([item.name])", get_print_info(item))
|
||||
print(R, message = "\The [src] beeps, printing \the [R] after a moment.")
|
||||
print(R, message = "\The [src] beeps, printing \the [R] after a moment.", user = usr)
|
||||
|
||||
/obj/machinery/weapons_analyzer/proc/get_print_info(var/obj/item/device)
|
||||
var/dat = "<span class='notice'><b>Analysis performed at [worldtime2text()]</b></span><br>"
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
P.stamped = list(/obj/item/stamp)
|
||||
P.overlays = list("paper_stamped")
|
||||
P.set_content_unsafe(pname, info)
|
||||
print(P)
|
||||
print(P, user = usr)
|
||||
|
||||
if(scanned_object && istype(scanned_object, /obj/machinery/artifact))
|
||||
var/obj/machinery/artifact/A = scanned_object
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
################################
|
||||
# Example Changelog File
|
||||
#
|
||||
# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb.
|
||||
#
|
||||
# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.)
|
||||
# When it is, any changes listed below will disappear.
|
||||
#
|
||||
# Valid Prefixes:
|
||||
# bugfix
|
||||
# wip (For works in progress)
|
||||
# tweak
|
||||
# soundadd
|
||||
# sounddel
|
||||
# rscadd (general adding of nice things)
|
||||
# rscdel (general deleting of nice things)
|
||||
# imageadd
|
||||
# imagedel
|
||||
# maptweak
|
||||
# spellcheck (typo fixes)
|
||||
# experiment
|
||||
# balance
|
||||
# admin
|
||||
# backend
|
||||
# security
|
||||
# refactor
|
||||
#################################
|
||||
|
||||
# Your name.
|
||||
author: Wowzewow (Wezzy)
|
||||
|
||||
# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again.
|
||||
delete-after: True
|
||||
|
||||
# Any changes you've made. See valid prefix list above.
|
||||
# INDENT WITH TWO SPACES. NOT TABS. SPACES.
|
||||
# SCREW THIS UP AND IT WON'T WORK.
|
||||
# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries.
|
||||
# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog.
|
||||
changes:
|
||||
- imageadd: "Updated the sprites for Operating tables, Bodyscanner consoles, and freezers/heaters."
|
||||
- rscadd: "Updates the Operating console to TGUI."
|
||||
- rscadd: "Improves Bodyscanner UI and printed scans to look nicer and be more accurate."
|
||||
- rscadd: "Printing stuff should now put the printed paper in your hands."
|
||||
- rscadd: "Tweaked handheld health analyzers. Renamed the Zeng-hu health analyzer to the advanced health analyzer."
|
||||
- maptweak: "Tweaks second body scanner floor decals in the GTR to match the other one."
|
||||
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 6.1 KiB After Width: | Height: | Size: 6.1 KiB |
|
Before Width: | Height: | Size: 34 KiB After Width: | Height: | Size: 34 KiB |
|
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 45 KiB |
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 14 KiB |
@@ -1116,6 +1116,14 @@
|
||||
},
|
||||
/turf/simulated/floor/wood,
|
||||
/area/horizon/library)
|
||||
"axJ" = (
|
||||
/obj/machinery/iv_drip,
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/outline/red,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"axL" = (
|
||||
/obj/machinery/light/small,
|
||||
/obj/effect/floor_decal/spline/fancy/wood,
|
||||
@@ -5625,11 +5633,8 @@
|
||||
layer = 3.01;
|
||||
pixel_y = 6
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/floor_decal/sign/gtr,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/obj/effect/floor_decal/corner/beige/full,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/medical/gen_treatment)
|
||||
"cGM" = (
|
||||
/obj/structure/cable/green{
|
||||
@@ -7795,7 +7800,9 @@
|
||||
/area/operations/mail_room)
|
||||
"dLo" = (
|
||||
/obj/machinery/bodyscanner,
|
||||
/obj/effect/floor_decal/corner/beige/full,
|
||||
/obj/effect/floor_decal/corner/beige{
|
||||
dir = 9
|
||||
},
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/medical/gen_treatment)
|
||||
"dLu" = (
|
||||
@@ -16618,6 +16625,7 @@
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/sign/gtr,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"hQE" = (
|
||||
@@ -17495,6 +17503,14 @@
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/engineering/lobby)
|
||||
"imc" = (
|
||||
/obj/structure/bed/roller,
|
||||
/obj/effect/floor_decal/industrial/warning/corner{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/outline/medical,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"imp" = (
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 1
|
||||
@@ -19360,8 +19376,8 @@
|
||||
/obj/machinery/camera/network/medbay{
|
||||
c_tag = "Medical - General Treatment 1"
|
||||
},
|
||||
/obj/effect/floor_decal/corner/beige/full{
|
||||
dir = 4
|
||||
/obj/effect/floor_decal/corner/beige{
|
||||
dir = 6
|
||||
},
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/medical/gen_treatment)
|
||||
@@ -25879,6 +25895,14 @@
|
||||
/obj/random/loot,
|
||||
/turf/simulated/floor/plating,
|
||||
/area/maintenance/wing/starboard)
|
||||
"mtc" = (
|
||||
/obj/structure/bed/roller,
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/outline/medical,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"mte" = (
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 6
|
||||
@@ -26531,10 +26555,13 @@
|
||||
/turf/simulated/floor/tiled/full,
|
||||
/area/horizon/stairwell/central)
|
||||
"mIh" = (
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
/obj/effect/floor_decal/corner/beige/full{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/loading/yellow{
|
||||
dir = 1
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/medical/gen_treatment)
|
||||
"mIN" = (
|
||||
/obj/structure/platform_stairs/full/east_west_cap{
|
||||
@@ -27482,6 +27509,9 @@
|
||||
/obj/effect/floor_decal/industrial/warning/corner{
|
||||
dir = 8
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/warning/corner{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"nbh" = (
|
||||
@@ -28958,7 +28988,7 @@
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/reception)
|
||||
"nLS" = (
|
||||
/obj/effect/floor_decal/industrial/warning/corner{
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
@@ -34582,6 +34612,12 @@
|
||||
/obj/effect/floor_decal/corner/mauve/diagonal,
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/rnd/research)
|
||||
"qBz" = (
|
||||
/obj/effect/floor_decal/industrial/warning/corner{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/wall,
|
||||
/area/medical/icu)
|
||||
"qBF" = (
|
||||
/obj/structure/lattice/catwalk/indoor/grate,
|
||||
/obj/structure/cable/green{
|
||||
@@ -40143,6 +40179,20 @@
|
||||
},
|
||||
/turf/simulated/floor/tiled,
|
||||
/area/engineering/storage_eva)
|
||||
"tnR" = (
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
|
||||
/obj/structure/cable/green{
|
||||
icon_state = "1-2"
|
||||
},
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"tnX" = (
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply{
|
||||
dir = 4
|
||||
@@ -40885,6 +40935,9 @@
|
||||
/obj/effect/floor_decal/industrial/loading/yellow{
|
||||
dir = 4
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/floor/tiled/dark,
|
||||
/area/medical/gen_treatment)
|
||||
"tHI" = (
|
||||
@@ -44216,6 +44269,9 @@
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 1
|
||||
},
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 4
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"vmv" = (
|
||||
@@ -45627,7 +45683,7 @@
|
||||
input_tag = "cooling_in";
|
||||
name = "Engine Cooling Control";
|
||||
output_tag = "cooling_out";
|
||||
sensors = list("engine_sensor"="Engine Core")
|
||||
sensors = list("engine_sensor"="Engine Core")
|
||||
},
|
||||
/obj/machinery/camera/network/engineering{
|
||||
c_tag = "Engineering - Supermatter Reactor Monitoring";
|
||||
@@ -46295,6 +46351,12 @@
|
||||
},
|
||||
/turf/simulated/floor/plating,
|
||||
/area/engineering/engine_room)
|
||||
"weX" = (
|
||||
/obj/effect/floor_decal/industrial/warning{
|
||||
dir = 8
|
||||
},
|
||||
/turf/simulated/floor/tiled/white,
|
||||
/area/medical/gen_treatment)
|
||||
"weY" = (
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/scrubbers,
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
|
||||
@@ -68504,7 +68566,7 @@ uky
|
||||
whU
|
||||
fyx
|
||||
nLS
|
||||
whF
|
||||
imc
|
||||
whF
|
||||
vsb
|
||||
ryP
|
||||
@@ -68706,7 +68768,7 @@ xQB
|
||||
vTY
|
||||
dLo
|
||||
cGJ
|
||||
pJt
|
||||
axJ
|
||||
pJt
|
||||
hQb
|
||||
dVw
|
||||
@@ -68903,12 +68965,12 @@ aDY
|
||||
wia
|
||||
wia
|
||||
wia
|
||||
wia
|
||||
qBz
|
||||
wia
|
||||
wia
|
||||
jhL
|
||||
mIh
|
||||
whF
|
||||
mtc
|
||||
whF
|
||||
vsb
|
||||
abD
|
||||
@@ -69109,9 +69171,9 @@ uhk
|
||||
vwc
|
||||
nbd
|
||||
abA
|
||||
weX
|
||||
iyl
|
||||
xqE
|
||||
xqE
|
||||
pUI
|
||||
bCl
|
||||
iIf
|
||||
@@ -69313,7 +69375,7 @@ uwi
|
||||
yay
|
||||
ruS
|
||||
rPf
|
||||
rPf
|
||||
tnR
|
||||
rQB
|
||||
oBZ
|
||||
pMB
|
||||
|
||||
@@ -21,6 +21,7 @@ export type ScannerData = {
|
||||
blood_pressure_level: number;
|
||||
blood_volume: number;
|
||||
blood_o2: number;
|
||||
blood_type: string;
|
||||
rads: number;
|
||||
|
||||
cloneLoss: string;
|
||||
@@ -43,6 +44,7 @@ export type ScannerData = {
|
||||
organs: InternalOrgan[];
|
||||
has_internal_injuries: BooleanLike;
|
||||
has_external_injuries: BooleanLike;
|
||||
missing_limbs: string;
|
||||
missing_organs: string;
|
||||
};
|
||||
|
||||
@@ -51,6 +53,7 @@ type Organ = {
|
||||
burn_damage: string;
|
||||
brute_damage: string;
|
||||
wounds: string;
|
||||
infection: string;
|
||||
};
|
||||
|
||||
type InternalOrgan = {
|
||||
@@ -58,6 +61,7 @@ type InternalOrgan = {
|
||||
location: string;
|
||||
damage: string;
|
||||
wounds: string;
|
||||
infection: string;
|
||||
};
|
||||
|
||||
export const BodyScanner = (props, context) => {
|
||||
@@ -76,17 +80,25 @@ export const InvalidWindow = (props, context) => {
|
||||
const { act, data } = useBackend<ScannerData>(context);
|
||||
|
||||
return (
|
||||
<BlockQuote>
|
||||
{data.nocons
|
||||
? 'No scanner bed detected.'
|
||||
: !data.occupied
|
||||
? 'No occupant detected.'
|
||||
: data.ipc
|
||||
? 'An object in the scanner bed is interfering with the sensor array.'
|
||||
: data.noscan
|
||||
? 'No diagnostics profile installed for this species.'
|
||||
: 'Unknown error.'}
|
||||
</BlockQuote>
|
||||
<Table>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Section>
|
||||
<BlockQuote>
|
||||
{data.nocons
|
||||
? 'No scanner bed detected.'
|
||||
: !data.occupied
|
||||
? 'No occupant detected.'
|
||||
: data.ipc
|
||||
? 'An object in the scanner bed is interfering with the sensor array.'
|
||||
: data.noscan
|
||||
? 'No diagnostics profile installed for this species.'
|
||||
: 'Unknown error.'}
|
||||
</BlockQuote>
|
||||
</Section>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table>
|
||||
);
|
||||
};
|
||||
|
||||
@@ -97,50 +109,54 @@ export const ScannerWindow = (props, context) => {
|
||||
<Table>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Section fill={false} title="Patient Status" scrollable>
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Name">{data.name}</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Status"
|
||||
color={consciousnessLabel(data.stat)}>
|
||||
{consciousnessText(data.stat)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Species">
|
||||
{data.species}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Pulse"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{data.pulse}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Brain Activity"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{brainText(data.brain_activity)}
|
||||
</LabeledList.Item>
|
||||
{data.stat < 2 ? <TraumaInfo /> : ''}
|
||||
</LabeledList>
|
||||
<LabeledList>
|
||||
<LabeledList.Divider size={1} />
|
||||
<LabeledList.Item label="Radiation Level">
|
||||
{Math.round(data.rads)} Gy
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Genetic Damage">
|
||||
{data.cloneLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Est. Paralysis Level">
|
||||
{data.paralysis
|
||||
? Math.round(data.paralysis / 4) + ' Seconds Left'
|
||||
: 'No paralysis detected.'}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Body Temperature">
|
||||
{data.bodytemp}°C
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
<Section
|
||||
fill={false}
|
||||
title="Patient Status"
|
||||
buttons={
|
||||
<>
|
||||
<Button
|
||||
content="Print"
|
||||
icon="print"
|
||||
onClick={() => act('print')}
|
||||
/>
|
||||
<Button
|
||||
content="Eject"
|
||||
color="red"
|
||||
icon="arrow-right-from-bracket"
|
||||
onClick={() => act('eject')}
|
||||
/>
|
||||
</>
|
||||
}>
|
||||
<Section>
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Name">{data.name}</LabeledList.Item>
|
||||
<LabeledList.Item label="Species">
|
||||
{data.species}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Status"
|
||||
color={consciousnessLabel(data.stat)}>
|
||||
{consciousnessText(data.stat)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Brain Activity"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{brainText(data.brain_activity)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Pulse"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{data.pulse} BPM
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Body Temperature">
|
||||
{data.bodytemp}°C
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Blood Status" fill:true>
|
||||
<LabeledList>
|
||||
<LabeledList.Item
|
||||
label="BP"
|
||||
label="Blood Pressure"
|
||||
color={getPressureClass(data.blood_pressure_level)}>
|
||||
{data.blood_pressure}
|
||||
</LabeledList.Item>
|
||||
@@ -154,6 +170,9 @@ export const ScannerWindow = (props, context) => {
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{Math.round(data.blood_volume)}%
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Blood Type">
|
||||
{data.blood_type}
|
||||
</LabeledList.Item>
|
||||
{data.inaprovaline_amount ? (
|
||||
<LabeledList.Item label="Inaprovaline">
|
||||
{Math.round(data.inaprovaline_amount)}u
|
||||
@@ -205,53 +224,74 @@ export const ScannerWindow = (props, context) => {
|
||||
)}
|
||||
</LabeledList>
|
||||
</Section>
|
||||
</Section>
|
||||
</Table.Cell>
|
||||
<Table.Cell nowrap>
|
||||
<Section
|
||||
title="Organ Status"
|
||||
scrollable
|
||||
buttons={
|
||||
<>
|
||||
<Button
|
||||
content="Print Report"
|
||||
icon="calendar"
|
||||
onClick={() => act('print')}
|
||||
/>
|
||||
<Button
|
||||
content="Eject Occupant"
|
||||
color="red"
|
||||
icon="person-booth"
|
||||
onClick={() => act('eject')}
|
||||
/>
|
||||
</>
|
||||
}>
|
||||
<LabeledList>
|
||||
{data.missing_organs === 'Nothing' ? (
|
||||
<BlockQuote>No organs missing.</BlockQuote>
|
||||
) : (
|
||||
<MissingOrgans />
|
||||
)}
|
||||
</LabeledList>
|
||||
<Section title="Internal Organ Status">
|
||||
{data.has_internal_injuries ? (
|
||||
<OrganWindow />
|
||||
) : (
|
||||
<BlockQuote color="good">
|
||||
No internal injuries detected.
|
||||
</BlockQuote>
|
||||
)}
|
||||
<Section title="Symptom Status" fill:true>
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Radiation Level">
|
||||
{Math.round(data.rads)} Gy
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Genetic Damage">
|
||||
{data.cloneLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Est. Paralysis Level">
|
||||
{data.paralysis
|
||||
? Math.round(data.paralysis / 4) + ' Seconds Left'
|
||||
: 'None'}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="External Organ Status">
|
||||
{data.has_external_injuries ? (
|
||||
<ExternalOrganWindow />
|
||||
) : (
|
||||
<BlockQuote color="good">
|
||||
No external injuries detected.
|
||||
</BlockQuote>
|
||||
)}
|
||||
<Section title="Damage Status" fill:true>
|
||||
<LabeledList>
|
||||
<LabeledList.Item
|
||||
label="Brute Trauma"
|
||||
color={damageLabel(data.bruteLoss)}>
|
||||
{data.bruteLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Burn Severity"
|
||||
color={damageLabel(data.fireLoss)}>
|
||||
{data.fireLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Oxygen Deprivation"
|
||||
color={damageLabel(data.oxyLoss)}>
|
||||
{data.oxyLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Toxin Exposure"
|
||||
color={damageLabel(data.toxLoss)}>
|
||||
{data.toxLoss}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
</Section>
|
||||
<Section title="Body Status">
|
||||
{data.has_external_injuries ? (
|
||||
<ExternalOrganWindow />
|
||||
) : (
|
||||
<BlockQuote color="green">
|
||||
No external injuries detected.
|
||||
</BlockQuote>
|
||||
)}
|
||||
</Section>
|
||||
<LabeledList>
|
||||
<Section>
|
||||
{data.missing_limbs === 'Nothing' ? '' : <MissingLimbs />}
|
||||
</Section>
|
||||
</LabeledList>
|
||||
<Section title="Internal Organ Status">
|
||||
{data.has_internal_injuries ? (
|
||||
<OrganWindow />
|
||||
) : (
|
||||
<BlockQuote color="green">
|
||||
No internal injuries detected.
|
||||
</BlockQuote>
|
||||
)}
|
||||
</Section>
|
||||
<LabeledList>
|
||||
<Section>
|
||||
{data.missing_organs === 'Nothing' ? '' : <MissingOrgans />}
|
||||
</Section>
|
||||
</LabeledList>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table>
|
||||
@@ -265,9 +305,9 @@ export const OrganWindow = (props, context) => {
|
||||
<Table>
|
||||
<Table.Row color="blue">
|
||||
<Table.Cell>Name</Table.Cell>
|
||||
<Table.Cell>Trauma</Table.Cell>
|
||||
<Table.Cell>Wounds</Table.Cell>
|
||||
<Table.Cell>Location</Table.Cell>
|
||||
<Table.Cell>Damage</Table.Cell>
|
||||
<Table.Cell>Complications</Table.Cell>
|
||||
<Table.Cell>Immune</Table.Cell>
|
||||
</Table.Row>
|
||||
{data.organs.sort().map((organ) => (
|
||||
<Table.Row key={organ.name}>
|
||||
@@ -276,7 +316,7 @@ export const OrganWindow = (props, context) => {
|
||||
{organ.damage}
|
||||
</Table.Cell>
|
||||
<Table.Cell>{organ.wounds}</Table.Cell>
|
||||
<Table.Cell>{organ.location}</Table.Cell>
|
||||
<Table.Cell>{organ.infection}</Table.Cell>
|
||||
</Table.Row>
|
||||
))}
|
||||
</Table>
|
||||
@@ -292,7 +332,8 @@ export const ExternalOrganWindow = (props, context) => {
|
||||
<Table.Cell>Name</Table.Cell>
|
||||
<Table.Cell>Brute</Table.Cell>
|
||||
<Table.Cell>Burn</Table.Cell>
|
||||
<Table.Cell>Wounds</Table.Cell>
|
||||
<Table.Cell>Complications</Table.Cell>
|
||||
<Table.Cell>Immune</Table.Cell>
|
||||
</Table.Row>
|
||||
{data.bodyparts.sort().map((organ) => (
|
||||
<Table.Row key={organ.name}>
|
||||
@@ -304,6 +345,7 @@ export const ExternalOrganWindow = (props, context) => {
|
||||
{organ.burn_damage}
|
||||
</Table.Cell>
|
||||
<Table.Cell>{organ.wounds}</Table.Cell>
|
||||
<Table.Cell>{organ.infection}</Table.Cell>
|
||||
</Table.Row>
|
||||
))}
|
||||
</Table>
|
||||
@@ -323,30 +365,16 @@ export const MissingOrgans = (props, context) => {
|
||||
);
|
||||
};
|
||||
|
||||
export const TraumaInfo = (props, context) => {
|
||||
export const MissingLimbs = (props, context) => {
|
||||
const { act, data } = useBackend<ScannerData>(context);
|
||||
|
||||
return (
|
||||
<>
|
||||
<LabeledList.Item
|
||||
label="Physical Trauma"
|
||||
color={damageLabel(data.bruteLoss)}>
|
||||
{data.bruteLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Oxygen Deprivation"
|
||||
color={damageLabel(data.oxyLoss)}>
|
||||
{data.oxyLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Organ Failure" color={damageLabel(data.toxLoss)}>
|
||||
{data.toxLoss}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Burn Severity"
|
||||
color={damageLabel(data.fireLoss)}>
|
||||
{data.fireLoss}
|
||||
</LabeledList.Item>
|
||||
</>
|
||||
<BlockQuote>
|
||||
Missing limbs:{' '}
|
||||
<Box as="span" color="red">
|
||||
{data.missing_limbs}
|
||||
</Box>
|
||||
</BlockQuote>
|
||||
);
|
||||
};
|
||||
|
||||
|
||||
@@ -0,0 +1,174 @@
|
||||
import { BooleanLike } from '../../common/react';
|
||||
import { useBackend } from '../backend';
|
||||
import { BlockQuote, LabeledList, Section, Table } from '../components';
|
||||
import { Window } from '../layouts';
|
||||
|
||||
export type OperatingData = {
|
||||
// Booleans for errors.
|
||||
noscan: BooleanLike;
|
||||
nocons: BooleanLike;
|
||||
occupied: BooleanLike;
|
||||
invalid: BooleanLike;
|
||||
ipc: BooleanLike;
|
||||
|
||||
// Occupant data.
|
||||
stat: number;
|
||||
name: string;
|
||||
species: string;
|
||||
brain_activity: number;
|
||||
pulse: number;
|
||||
blood_pressure: number;
|
||||
blood_pressure_level: number;
|
||||
blood_volume: number;
|
||||
blood_o2: number;
|
||||
blood_type: string;
|
||||
};
|
||||
|
||||
export const Operating = (props, context) => {
|
||||
const { act, data } = useBackend<OperatingData>(context);
|
||||
|
||||
return (
|
||||
<Window resizable theme="zenghu">
|
||||
<Window.Content scrollable>
|
||||
{data.invalid ? <InvalidWindow /> : <OperatingWindow />}
|
||||
</Window.Content>
|
||||
</Window>
|
||||
);
|
||||
};
|
||||
|
||||
export const InvalidWindow = (props, context) => {
|
||||
const { act, data } = useBackend<OperatingData>(context);
|
||||
|
||||
return (
|
||||
<Section>
|
||||
<BlockQuote>
|
||||
{data.nocons
|
||||
? 'No operating table detected.'
|
||||
: !data.occupied
|
||||
? 'No occupant detected.'
|
||||
: data.ipc
|
||||
? 'An object on the operating table is interfering with the sensor array.'
|
||||
: data.noscan
|
||||
? 'No diagnostics profile installed for this species.'
|
||||
: 'Unknown error.'}
|
||||
</BlockQuote>
|
||||
</Section>
|
||||
);
|
||||
};
|
||||
|
||||
export const OperatingWindow = (props, context) => {
|
||||
const { act, data } = useBackend<OperatingData>(context);
|
||||
|
||||
return (
|
||||
<Table>
|
||||
<Table.Row>
|
||||
<Table.Cell>
|
||||
<Section title="Patient Status" fill={false}>
|
||||
<Section>
|
||||
<LabeledList>
|
||||
<LabeledList.Item label="Name">{data.name}</LabeledList.Item>
|
||||
<LabeledList.Item label="Species">
|
||||
{data.species}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Status"
|
||||
color={consciousnessLabel(data.stat)}>
|
||||
{consciousnessText(data.stat)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Brain Activity"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{brainText(data.brain_activity)}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Pulse"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{data.pulse}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
<Section title="Blood Status" fill:true>
|
||||
<LabeledList>
|
||||
<LabeledList.Item
|
||||
label="Blood Pressure"
|
||||
color={getPressureClass(data.blood_pressure_level)}>
|
||||
{data.blood_pressure}
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Blood Oxygenation"
|
||||
color={progressClass(data.blood_o2)}>
|
||||
{Math.round(data.blood_o2)}%
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item
|
||||
label="Blood Volume"
|
||||
color={progressClass(data.brain_activity)}>
|
||||
{Math.round(data.blood_volume)}%
|
||||
</LabeledList.Item>
|
||||
<LabeledList.Item label="Blood Type">
|
||||
{data.blood_type}
|
||||
</LabeledList.Item>
|
||||
</LabeledList>
|
||||
</Section>
|
||||
</Section>
|
||||
</Table.Cell>
|
||||
</Table.Row>
|
||||
</Table>
|
||||
);
|
||||
};
|
||||
|
||||
const consciousnessLabel = (value) => {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return 'green';
|
||||
case 1:
|
||||
return 'average';
|
||||
case 2:
|
||||
return 'bad';
|
||||
}
|
||||
};
|
||||
const consciousnessText = (value) => {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return 'Conscious';
|
||||
case 1:
|
||||
return 'Unconscious';
|
||||
case 2:
|
||||
return 'DEAD';
|
||||
}
|
||||
};
|
||||
|
||||
const progressClass = (value) => {
|
||||
if (value <= 50) {
|
||||
return 'bad';
|
||||
} else if (value <= 90) {
|
||||
return 'average';
|
||||
} else {
|
||||
return 'green';
|
||||
}
|
||||
};
|
||||
|
||||
const brainText = (value) => {
|
||||
switch (value) {
|
||||
case 0:
|
||||
return 'None, patient is braindead';
|
||||
case -1:
|
||||
return 'ERROR - Non-Standard Biology';
|
||||
default:
|
||||
return value.toString().concat('%');
|
||||
}
|
||||
};
|
||||
|
||||
const getPressureClass = (tpressure) => {
|
||||
switch (tpressure) {
|
||||
case 1:
|
||||
return 'red';
|
||||
case 2:
|
||||
return 'green';
|
||||
case 3:
|
||||
return 'good';
|
||||
case 4:
|
||||
return 'red';
|
||||
default:
|
||||
return 'teal';
|
||||
}
|
||||
};
|
||||
@@ -71,7 +71,7 @@ export const OccupantStatus = (props, context) => {
|
||||
title="Occupant Status"
|
||||
buttons={
|
||||
<Button
|
||||
content="Eject"
|
||||
content="Eject Occupant"
|
||||
color="bad"
|
||||
icon="person-booth"
|
||||
onClick={() => act('eject')}
|
||||
@@ -137,8 +137,6 @@ export const OccupantStatus = (props, context) => {
|
||||
'No stomach detected.'
|
||||
)}
|
||||
</Section>
|
||||
</Table.Cell>
|
||||
<Table.Cell>
|
||||
<Section title="Injectable Reagents">
|
||||
<Table>
|
||||
{data.reagents.map((reagent) => (
|
||||
|
||||