diff --git a/code/game/machinery/OpTable.dm b/code/game/machinery/OpTable.dm index 9ebb8cd6a4d..35f70dd8d09 100644 --- a/code/game/machinery/OpTable.dm +++ b/code/game/machinery/OpTable.dm @@ -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) diff --git a/code/game/machinery/Sleeper.dm b/code/game/machinery/Sleeper.dm index eec4ebc251d..b8e42dc784c 100644 --- a/code/game/machinery/Sleeper.dm +++ b/code/game/machinery/Sleeper.dm @@ -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) diff --git a/code/game/machinery/body_scanner.dm b/code/game/machinery/body_scanner.dm index d1f1860a84f..58721e579e1 100644 --- a/code/game/machinery/body_scanner.dm +++ b/code/game/machinery/body_scanner.dm @@ -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.
\
\ - 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("The scanner is already occupied!")) return - if (M.abiotic()) - to_chat(user, SPAN_NOTICE("Subject cannot have abiotic items on.")) - 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 = "Scan performed at [occ["stationtime"]]
" - dat += "Occupant Statistics:
" - dat += text("Brain Activity: []
", occ["brain_activity"]) - dat += text("Blood Pressure: []
", occ["blood_pressure"]) - dat += text("Blood Oxygenation: []%
", occ["blood_oxygenation"]) - dat += text("Blood Volume: []%
", occ["blood_volume"]) - dat += text("Physical Trauma: []
", occ["bruteloss"]) + var/dat = "Scan performed at [occ["stationtime"]]
" + dat += "" + dat += "Patient Status

" + dat += "" + dat += text("Name: []
", occ["name"]) + dat += text("Status: []
", occ["stat"]) + dat += text("Species: []
", occ["species"]) + dat += text("Pulse: [] BPM
", occ["pulse"]) + dat += text("Brain Activity: []
", occ["brain_activity"]) + dat += text("Body Temperature: []°C ", (occ["bodytemp"] - T0C)) + dat += text("([]°F)
", (occ["bodytemp"]*1.8-459.67)) + + dat += "
Blood Status


" + dat += text("Blood Pressure: []
", occ["blood_pressure"]) + dat += text("Blood Oxygenation: []%
", occ["blood_oxygenation"]) + dat += text("Blood Volume: []%
", occ["blood_volume"]) + dat += text("Blood Type: []
", occ["blood_type"]) + + if(occ["inaprovaline_amount"]) + dat += text("Inaprovaline: [] units
", occ["inaprovaline_amount"]) + if(occ["soporific_amount"]) + dat += text("Soporific: [] units
", occ["soporific_amount"]) + if(occ["dermaline_amount"]) + dat += text("[]\tDermaline: [] units

", (""), occ["dermaline_amount"]) + if(occ["bicaridine_amount"]) + dat += text("[]\tBicaridine: [] units
", (""), occ["bicaridine_amount"]) + if(occ["dexalin_amount"]) + dat += text("[]\tDexalin: [] units
", (""), occ["dexalin_amount"]) + if(occ["thetamycin_amount"]) + dat += text("[]\tThetamycin: [] units
", (""), occ["thetamycin_amount"]) + if(occ["other_amount"]) + dat += text("Other: [] units
", occ["other_amount"]) + + dat += "
Symptom Status


" + dat += text("Radiation Level: [] Gy
", round(occ["rads"])) + dat += text("Genetic Damage: []
", occ["cloneloss"]) + if(occ["paralysis"]) + dat += text("Est Paralysis Level: [] Seconds Left
", round(occ["paralysis"] / 4)) + else + dat += text("Est Paralysis Level: None
") + + dat += "
Damage Status


" + dat += text("Brute Trauma: []
", occ["bruteloss"]) + dat += text("Burn Severity: []
", occ["fireloss"]) dat += text("Oxygen Deprivation: []
", occ["oxyloss"]) - dat += text("Systemic Organ Failure: []
", occ["toxloss"]) - dat += text("Burn Severity: []

", occ["fireloss"]) + dat += text("Toxin Exposure: []
", occ["toxloss"]) - dat += text("[]\tRadiation Level %: []

", (""), occ["rads"]) - dat += text("Genetic Tissue Damage: []
", occ["cloneloss"]) - dat += text("Paralysis Summary %: [] ([] seconds left!)
", occ["paralysis"], round(occ["paralysis"] / 4)) - dat += text("Body Temperature: [occ["bodytemp"]]°C

") - - if(occ["borer_present"]) - dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
" - - dat += text("Inaprovaline: [] units
", occ["inaprovaline_amount"]) - dat += text("Soporific: [] units
", occ["soporific_amount"]) - dat += text("[]\tDermaline: [] units

", (""), occ["dermaline_amount"]) - dat += text("[]\tBicaridine: [] units
", (""), occ["bicaridine_amount"]) - dat += text("[]\tDexalin: [] units
", (""), occ["dexalin_amount"]) - dat += text("[]\tThetamycin: [] units
", (""), occ["thetamycin_amount"]) - - dat += "
" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - - for(var/obj/item/organ/external/e in occ["external_organs"]) - var/list/wounds = list() + dat += "
Body Status
" + if(occ["has_external_injuries"]) + dat += "
OrganBurn SeverityPhysical TraumaOther Wounds
" dat += "" - - 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 += "" - else - dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" dat += "" + 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 += "" + dat += "" + dat += "" - 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.
" + else + dat += "
[e.name][get_severity(e.burn_dam, TRUE)][get_severity(e.brute_dam, TRUE)][capitalize(english_list(wounds))][e.name]--Not [e.is_stump() ? "Found" : "Attached Completely"]NameBruteBurnComplicationsImmune
[data["name"]][data["brute_damage"]][data["burn_damage"]][data["wounds"]][data["infection"]]
" - 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("Missing limbs : [occ["missing_limbs"]]
") - var/necrotic = "" - if(i.get_scarring_level() > 0.01) - necrotic += " [i.get_scarring_results()]." - if(i.status & ORGAN_DEAD) - necrotic = " Necrotic and decaying." - - var/rescued = "" - if(istype(i, /obj/item/organ/internal/lungs) && occ["lung_rescued"]) - rescued = " Has a small puncture wound." + dat += "
Internal Organ Status
" + if(occ["has_internal_injuries"]) + dat += "" dat += "" - dat += "" + dat += "" + dat += "" + dat += "" + dat += "" dat += "" - dat += "
[i.name]N/A[get_internal_damage(i)][infection][mech][necrotic][rescued]NameDamageComplicationsImmune
" + 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("No [organ_name] detected.
") + dat += "" + dat += "[data["name"]][data["damage"]][data["wounds"]][data["infection"]]" + dat += "" + + if(!has_internal_injuries) + dat += "No internal injuries detected.
" + else + dat += "" + + if(occ["missing_organs"] != "Nothing") + dat += text("Missing organs : [occ["missing_organs"]]
") + + dat += "
" - if(occ["sdisabilities"] & BLIND) - dat += text("Cataracts detected.
") - if(occ["sdisabilities"] & NEARSIGHTED) - dat += text("Retinal misalignment detected.
") return dat diff --git a/code/game/machinery/computer/Operating.dm b/code/game/machinery/computer/Operating.dm index d2694eff7e1..ca120aa80e2 100644 --- a/code/game/machinery/computer/Operating.dm +++ b/code/game/machinery/computer/Operating.dm @@ -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 = "Operating Computer\n" - if(src.table && (src.table.check_victim())) - src.victim = src.table.victim - dat += {" - Patient Information:
- Brain Activity: [victim.isFBP() ? "N/A" : victim.get_brain_status()]
- Pulse: [victim.get_pulse(GETPULSE_TOOL)]
- BP: [victim.get_blood_pressure()]
- Blood Oxygenation: [victim.get_blood_oxygenation()]%
- Blood Volume: [victim.get_blood_volume()]%
- "} - if(!input_scan) - dat += "Patient Scan: Scan not found. Please insert a Medical Scan.
" - else - dat += {" - Patient Scan: [input_scan]
- Update scan - Remove and update scan - Print new scan

- "} - dat += "[input_scan.get_content()]" - else - src.victim = null - dat += {" -Patient Information:
-No Patient Detected -"} - 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! [victim]'s Blood Oxygenation AND Brain Activity 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! [victim]'s Blood Oxygenation 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! [victim]'s Brain Activity 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 = "
Scan last updated at [occ["stationtime"]]
" - if(occ["borer_present"]) - dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
" - - dat += "
" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - - 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 += "" - - 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 += "" + pulse_result = occupant.get_pulse(GETPULSE_TOOL) else - dat += "" - dat += "" + 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 = " Necrotic and decaying." - - var/rescued = "" - if(istype(i, /obj/item/organ/internal/lungs) && occ["lung_rescued"]) - rescued = " Has a small puncture wound." - - dat += "" - dat += "" - dat += "" - dat += "
OrganBurn SeverityPhysical TraumaOther Wounds
[e.name][get_severity(e.burn_dam, TRUE)][get_severity(e.brute_dam, TRUE)][robot][bled][AN][splint][open][infected][imp][dislocated][internal_bleeding][severed_tendon][lung_ruptured][e.name]--Not [e.is_stump() ? "Found" : "Attached Completely"]
[i.name]N/A[internal_bodyscanner.get_internal_damage(i)][infection][mech][necrotic][rescued]
" - - 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("No [organ_name] detected.
") - - if(occ["sdisabilities"] & BLIND) - dat += text("Cataracts detected.
") - if(occ["sdisabilities"] & NEARSIGHTED) - dat += text("Retinal misalignment detected.
") - return dat + return data diff --git a/code/game/machinery/computer/sentencing.dm b/code/game/machinery/computer/sentencing.dm index fa8f7e91e27..6b3bb83aee4 100644 --- a/code/game/machinery/computer/sentencing.dm +++ b/code/game/machinery/computer/sentencing.dm @@ -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 diff --git a/code/game/machinery/machinery.dm b/code/game/machinery/machinery.dm index 4490459ca86..a285a9135e8 100644 --- a/code/game/machinery/machinery.dm +++ b/code/game/machinery/machinery.dm @@ -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) diff --git a/code/game/machinery/requests_console.dm b/code/game/machinery/requests_console.dm index eb4f72aae6c..f514bfc0bdf 100644 --- a/code/game/machinery/requests_console.dm +++ b/code/game/machinery/requests_console.dm @@ -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-- diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm index fba0fa296bf..2cbeb585bf0 100644 --- a/code/game/objects/items/devices/scanners.dm +++ b/code/game/objects/items/devices/scanners.dm @@ -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, "You don't have the dexterity to do this!") + if(!user.IsAdvancedToolUser()) + to_chat(user, "You don't have the dexterity to do this!") return user.visible_message("[user] runs a scanner over [M].","You run the scanner over [M].") @@ -131,6 +135,9 @@ BREATH ANALYZER . += "[b]Scan results for \the [H]:[endb]" + if(H.stat == DEAD || H.status_flags & FAKEDEATH) + dat += "[b]Time of Death:[endb] [worldtime2text(H.timeofdeath)]" + // 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 += "[b]Time of Death:[endb] [worldtime2text(H.timeofdeath)]" - // Pulse rate. var/pulse_result = "normal" if(H.should_have_organ(BP_HEART)) @@ -162,33 +166,27 @@ BREATH ANALYZER pulse_result = "0" else pulse_result = H.get_pulse(GETPULSE_TOOL) - pulse_result = "[pulse_result]" + pulse_result = "[pulse_result] BPM" if(H.pulse() == PULSE_NONE) - pulse_result = "[pulse_result]" + pulse_result = "[pulse_result] BPM" else if(H.pulse() < PULSE_NORM) - pulse_result = "[pulse_result]" + pulse_result = "[pulse_result] BPM" else if(H.pulse() > PULSE_NORM) - pulse_result = "[pulse_result]" + pulse_result = "[pulse_result] BPM" else - pulse_result = "0" - dat += "Pulse rate: [pulse_result] bpm" + pulse_result = "0 BPM" + 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: [round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)" + else + temperature_string = "Body temperature: [round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)" + 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 += "Severe blood loss detected." - var/oxygenation_string = "[H.get_blood_oxygenation()]% blood oxygenation" - dat += "Blood type: [H.dna.b_type]" - switch(H.get_blood_oxygenation()) - if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) - oxygenation_string = "[oxygenation_string]" - if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_OKAY) - oxygenation_string = "[oxygenation_string]" - if(-(INFINITY) to BLOOD_VOLUME_SURVIVE) - oxygenation_string = "[oxygenation_string]" - if(H.status_flags & FAKEDEATH) - oxygenation_string = "0% blood oxygenation" - var/blood_pressure_string switch(H.get_blood_pressure_alert()) if(1) @@ -199,23 +197,38 @@ BREATH ANALYZER blood_pressure_string = "[H.get_blood_pressure()]" if(4) blood_pressure_string = "[H.get_blood_pressure()]" - dat += "Blood pressure: [blood_pressure_string] ([oxygenation_string])" + + var/blood_volume_string = "\>[BLOOD_VOLUME_SAFE]%" + switch(H.get_blood_oxygenation()) + if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) + blood_volume_string = "\<[BLOOD_VOLUME_SAFE]%" + if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_OKAY) + blood_volume_string = "\<[BLOOD_VOLUME_OKAY]%" + if(-(INFINITY) to BLOOD_VOLUME_SURVIVE) + blood_volume_string = "\<[BLOOD_VOLUME_SURVIVE]%" + + var/oxygenation_string = "[H.get_blood_oxygenation()]%" + switch(H.get_blood_oxygenation()) + if(BLOOD_VOLUME_OKAY to BLOOD_VOLUME_SAFE) + oxygenation_string = "[oxygenation_string]%" + if(BLOOD_VOLUME_SURVIVE to BLOOD_VOLUME_OKAY) + oxygenation_string = "[oxygenation_string]%" + if(-(INFINITY) to BLOOD_VOLUME_SURVIVE) + oxygenation_string = "[oxygenation_string]%" + if(H.status_flags & FAKEDEATH) + oxygenation_string = "[rand(0,10)]%" + dat += "Blood pressure: [blood_pressure_string]" + dat += "Blood oxygenation: [oxygenation_string]" + dat += "Blood volume: [blood_volume_string]" + dat += "Blood type: [H.dna.b_type]" 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: [round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)" - else - temperature_string = "Body temperature: [round(H.bodytemperature-T0C, 0.1)]°C ([round(H.bodytemperature*1.8-459.67, 0.1)]°F)" - dat += temperature_string - // Traumatic shock. if(H.is_asystole() || (H.status_flags & FAKEDEATH)) - dat += "Patient is suffering from cardiovascular shock. Administer CPR immediately." + dat += "Cardiovascular shock detected. Administer CPR immediately." else if(H.shock_stage > 80) - dat += "Patient is at serious risk of going into shock. Pain relief recommended." + dat += "Imminent cardiovascular shock. Pain relief recommended." if(H.getOxyLoss() > 50) dat += "[b]Severe oxygen deprivation detected.[endb]" @@ -226,18 +239,6 @@ BREATH ANALYZER if(H.getBruteLoss() > 50) dat += "[b]Severe anatomical damage detected.[endb]" - 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(.,"
") . = jointext(list(header,.),null) - to_chat(user, "
") - to_chat(user, .) - to_chat(user, "
") + if(user) + to_chat(user, "
") + to_chat(user, .) + to_chat(user, "
") /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("[user] 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 diff --git a/code/game/sound.dm b/code/game/sound.dm index 5769f547fc8..de0d05632bb 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -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' + ) diff --git a/code/modules/detectivework/microscope/dnascanner.dm b/code/modules/detectivework/microscope/dnascanner.dm index 94ae60516e7..2c6ab09d06a 100644 --- a/code/modules/detectivework/microscope/dnascanner.dm +++ b/code/modules/detectivework/microscope/dnascanner.dm @@ -120,7 +120,7 @@ info = "[src] analysis report #[report_num]
" info += "Scanned item: [bloodsamp.name]

" + data P.set_content_unsafe(pname, info) - print(P) + print(P, user = usr) scanning = 0 update_icon() return diff --git a/code/modules/detectivework/microscope/microscope.dm b/code/modules/detectivework/microscope/microscope.dm index fd735214aef..3ab2738b4c6 100644 --- a/code/modules/detectivework/microscope/microscope.dm +++ b/code/modules/detectivework/microscope/microscope.dm @@ -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)) diff --git a/code/modules/economy/ATM.dm b/code/modules/economy/ATM.dm index 83808f1e90f..edfc00474e7 100644 --- a/code/modules/economy/ATM.dm +++ b/code/modules/economy/ATM.dm @@ -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 += "
This paper has been stamped by the Automatic Teller Machine." - 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 += "
This paper has been stamped by the Automatic Teller Machine." - 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 diff --git a/code/modules/heavy_vehicle/equipment/medical.dm b/code/modules/heavy_vehicle/equipment/medical.dm index 31abe381207..4cb878c41d4 100644 --- a/code/modules/heavy_vehicle/equipment/medical.dm +++ b/code/modules/heavy_vehicle/equipment/medical.dm @@ -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("[user] starts scanning \the [M] with \the [src].", SPAN_NOTICE("You start scanning \the [M] with \the [src].")) if(do_after(user, 7 SECONDS)) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 288412695ec..4def206ee74 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species/outsider/revenant.dm b/code/modules/mob/living/carbon/human/species/outsider/revenant.dm index 1bd709cc572..fc49f81d17f 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/revenant.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/revenant.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/outsider/undead.dm b/code/modules/mob/living/carbon/human/species/outsider/undead.dm index 8b3b9fed753..d8fd684b838 100644 --- a/code/modules/mob/living/carbon/human/species/outsider/undead.dm +++ b/code/modules/mob/living/carbon/human/species/outsider/undead.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/species.dm b/code/modules/mob/living/carbon/human/species/species.dm index 1b68b455c15..a4399b80395 100644 --- a/code/modules/mob/living/carbon/human/species/species.dm +++ b/code/modules/mob/living/carbon/human/species/species.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/station/diona/diona.dm b/code/modules/mob/living/carbon/human/species/station/diona/diona.dm index 7060dab22ce..cc067e84209 100644 --- a/code/modules/mob/living/carbon/human/species/station/diona/diona.dm +++ b/code/modules/mob/living/carbon/human/species/station/diona/diona.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/station/golem.dm b/code/modules/mob/living/carbon/human/species/station/golem.dm index 0523da6f417..0d9bc15ad7e 100644 --- a/code/modules/mob/living/carbon/human/species/station/golem.dm +++ b/code/modules/mob/living/carbon/human/species/station/golem.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm b/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm index dfc5b838f87..48d02a70c00 100644 --- a/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm +++ b/code/modules/mob/living/carbon/human/species/station/ipc/ipc.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index 7d9e3ffd13f..916dec46dd7 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm b/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm index 2f325551b26..a777fe81ad1 100644 --- a/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm +++ b/code/modules/mob/living/carbon/human/species/station/skrell/skrell.dm @@ -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") diff --git a/code/modules/mob/living/carbon/human/species/station/slime.dm b/code/modules/mob/living/carbon/human/species/station/slime.dm index 7546bf76f29..d9c9cceaced 100644 --- a/code/modules/mob/living/carbon/human/species/station/slime.dm +++ b/code/modules/mob/living/carbon/human/species/station/slime.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm b/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm index 78ca3720258..3f9bc06ef9a 100644 --- a/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm +++ b/code/modules/mob/living/carbon/human/species/station/tajara/tajara.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/species/station/tajara/tajaran_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/tajara/tajaran_subspecies.dm index 6f5462a5c27..bd79f6b1b96 100644 --- a/code/modules/mob/living/carbon/human/species/station/tajara/tajaran_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/tajara/tajaran_subspecies.dm @@ -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), diff --git a/code/modules/mob/living/carbon/human/species/station/unathi/unathi.dm b/code/modules/mob/living/carbon/human/species/station/unathi/unathi.dm index 6c0e7eaaf84..b89e0ed4a50 100644 --- a/code/modules/mob/living/carbon/human/species/station/unathi/unathi.dm +++ b/code/modules/mob/living/carbon/human/species/station/unathi/unathi.dm @@ -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) diff --git a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm index 6572b1cfbe3..78567caca35 100644 --- a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm +++ b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca.dm @@ -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( diff --git a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm index 7e3570f043f..f0ad6f7c4eb 100644 --- a/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm +++ b/code/modules/mob/living/carbon/human/species/station/vaurca/vaurca_subspecies.dm @@ -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 ) diff --git a/code/modules/organs/internal/_internal.dm b/code/modules/organs/internal/_internal.dm index a20158c7947..41c30508a40 100644 --- a/code/modules/organs/internal/_internal.dm +++ b/code/modules/organs/internal/_internal.dm @@ -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() diff --git a/code/modules/organs/organ_stump.dm b/code/modules/organs/organ_stump.dm index a0d35476ea8..627dd40d389 100644 --- a/code/modules/organs/organ_stump.dm +++ b/code/modules/organs/organ_stump.dm @@ -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 diff --git a/code/modules/paperwork/photocopier.dm b/code/modules/paperwork/photocopier.dm index 33b94cb764d..60eb03a79d8 100644 --- a/code/modules/paperwork/photocopier.dm +++ b/code/modules/paperwork/photocopier.dm @@ -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) diff --git a/code/modules/paperwork/photography.dm b/code/modules/paperwork/photography.dm index 77574bbc507..54f3f7ebf0f 100644 --- a/code/modules/paperwork/photography.dm +++ b/code/modules/paperwork/photography.dm @@ -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, "[pictures_left] photos left.") diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm index 6b8a7db6ab4..d8f6cb2d17e 100644 --- a/code/modules/research/rdconsole.dm +++ b/code/modules/research/rdconsole.dm @@ -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() diff --git a/code/modules/research/weaponsanalyzer.dm b/code/modules/research/weaponsanalyzer.dm index c7875be95b0..87d32967a08 100644 --- a/code/modules/research/weaponsanalyzer.dm +++ b/code/modules/research/weaponsanalyzer.dm @@ -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 = "Analysis performed at [worldtime2text()]
" diff --git a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm index 8c01f5a1b58..ea3e480471c 100644 --- a/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm +++ b/code/modules/research/xenoarchaeology/machinery/artifact_analyser.dm @@ -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 diff --git a/html/changelogs/wezzy_bodyscanner-better.yml b/html/changelogs/wezzy_bodyscanner-better.yml new file mode 100644 index 00000000000..f98784268f4 --- /dev/null +++ b/html/changelogs/wezzy_bodyscanner-better.yml @@ -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." diff --git a/icons/mob/items/device/lefthand_device.dmi b/icons/mob/items/device/lefthand_device.dmi index c9d92a41368..a18d90369d3 100644 Binary files a/icons/mob/items/device/lefthand_device.dmi and b/icons/mob/items/device/lefthand_device.dmi differ diff --git a/icons/mob/items/device/righthand_device.dmi b/icons/mob/items/device/righthand_device.dmi index 0a5d0c7a1ed..4bc86f5adc1 100644 Binary files a/icons/mob/items/device/righthand_device.dmi and b/icons/mob/items/device/righthand_device.dmi differ diff --git a/icons/obj/device.dmi b/icons/obj/device.dmi index a75e16c47c7..d048cb4ba8d 100644 Binary files a/icons/obj/device.dmi and b/icons/obj/device.dmi differ diff --git a/icons/obj/sleeper.dmi b/icons/obj/sleeper.dmi index 8467f2661c0..b0825198f23 100644 Binary files a/icons/obj/sleeper.dmi and b/icons/obj/sleeper.dmi differ diff --git a/icons/obj/surgery.dmi b/icons/obj/surgery.dmi index ce292a8a468..2030e669270 100644 Binary files a/icons/obj/surgery.dmi and b/icons/obj/surgery.dmi differ diff --git a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm index cbd726d2f4a..901e7d748e8 100644 --- a/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm +++ b/maps/sccv_horizon/sccv_horizon-2_deck_2.dmm @@ -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 diff --git a/tgui/packages/tgui/interfaces/BodyScanner.tsx b/tgui/packages/tgui/interfaces/BodyScanner.tsx index 273b1a384d7..d87c591bdcb 100644 --- a/tgui/packages/tgui/interfaces/BodyScanner.tsx +++ b/tgui/packages/tgui/interfaces/BodyScanner.tsx @@ -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(context); return ( -
- {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.'} -
+ + + +
+
+ {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.'} +
+
+
+
+
); }; @@ -97,50 +109,54 @@ export const ScannerWindow = (props, context) => { -
- - {data.name} - - {consciousnessText(data.stat)} - - - {data.species} - - - {data.pulse} - - - {brainText(data.brain_activity)} - - {data.stat < 2 ? : ''} - - - - - {Math.round(data.rads)} Gy - - - {data.cloneLoss} - - - {data.paralysis - ? Math.round(data.paralysis / 4) + ' Seconds Left' - : 'No paralysis detected.'} - - - {data.bodytemp}°C - - +
+
- - -
-
@@ -265,9 +305,9 @@ export const OrganWindow = (props, context) => { Name - Trauma - Wounds - Location + Damage + Complications + Immune {data.organs.sort().map((organ) => ( @@ -276,7 +316,7 @@ export const OrganWindow = (props, context) => { {organ.damage} {organ.wounds} - {organ.location} + {organ.infection} ))}
@@ -292,7 +332,8 @@ export const ExternalOrganWindow = (props, context) => { Name Brute Burn - Wounds + Complications + Immune {data.bodyparts.sort().map((organ) => ( @@ -304,6 +345,7 @@ export const ExternalOrganWindow = (props, context) => { {organ.burn_damage} {organ.wounds} + {organ.infection} ))} @@ -323,30 +365,16 @@ export const MissingOrgans = (props, context) => { ); }; -export const TraumaInfo = (props, context) => { +export const MissingLimbs = (props, context) => { const { act, data } = useBackend(context); return ( - <> - - {data.bruteLoss} - - - {data.oxyLoss} - - - {data.toxLoss} - - - {data.fireLoss} - - +
+ Missing limbs:{' '} + + {data.missing_limbs} + +
); }; diff --git a/tgui/packages/tgui/interfaces/Operating.tsx b/tgui/packages/tgui/interfaces/Operating.tsx new file mode 100644 index 00000000000..e504903531b --- /dev/null +++ b/tgui/packages/tgui/interfaces/Operating.tsx @@ -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(context); + + return ( + + + {data.invalid ? : } + + + ); +}; + +export const InvalidWindow = (props, context) => { + const { act, data } = useBackend(context); + + return ( +
+
+ {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.'} +
+
+ ); +}; + +export const OperatingWindow = (props, context) => { + const { act, data } = useBackend(context); + + return ( + + + +
+
+ + {data.name} + + {data.species} + + + {consciousnessText(data.stat)} + + + {brainText(data.brain_activity)} + + + {data.pulse} + + +
+
+ + + {data.blood_pressure} + + + {Math.round(data.blood_o2)}% + + + {Math.round(data.blood_volume)}% + + + {data.blood_type} + + +
+
+
+
+
+ ); +}; + +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'; + } +}; diff --git a/tgui/packages/tgui/interfaces/Sleeper.tsx b/tgui/packages/tgui/interfaces/Sleeper.tsx index 2929dcf182a..66063ece9cd 100644 --- a/tgui/packages/tgui/interfaces/Sleeper.tsx +++ b/tgui/packages/tgui/interfaces/Sleeper.tsx @@ -71,7 +71,7 @@ export const OccupantStatus = (props, context) => { title="Occupant Status" buttons={