diff --git a/code/game/machinery/adv_med.dm b/code/game/machinery/adv_med.dm index 0995780dc9..7819a34e1a 100644 --- a/code/game/machinery/adv_med.dm +++ b/code/game/machinery/adv_med.dm @@ -9,7 +9,7 @@ icon_state = "body_scanner_0" density = 1 anchored = 1 - + use_power = 1 idle_power_usage = 60 active_power_usage = 10000 //10 kW. It's a big all-body scanner. @@ -226,10 +226,10 @@ if(!connected || (connected.stat & (NOPOWER|BROKEN))) user << "\red This console is not connected to a functioning body scanner." return - if(!ishuman(connected.occupant)) user << "\red This device can only scan compatible lifeforms." return + var/dat if (src.delete && src.temphtml) //Window in buffer but its just simple message, so nothing src.delete = src.delete @@ -237,156 +237,210 @@ dat = text("[]

Main Menu", src.temphtml, src) else if (src.connected) //Is something connected? - var/mob/living/carbon/human/occupant = src.connected.occupant - dat = "Occupant Statistics:
" //Blah obvious - if (istype(occupant)) //is there REALLY someone in there? - var/t1 - switch(occupant.stat) // obvious, see what their status is - if(0) - t1 = "Conscious" - if(1) - t1 = "Unconscious" - else - t1 = "*dead*" - if (!istype(occupant,/mob/living/carbon/human)) - dat += "This device can only scan human occupants." - else - dat += text("[]\tHealth %: [] ([])
", (occupant.health > 50 ? "" : ""), occupant.health, t1) - - if(occupant.virus2.len) - dat += text("Viral pathogen detected in blood stream.
") - - dat += text("[]\t-Brute Damage %: []

", (occupant.getBruteLoss() < 60 ? "" : ""), occupant.getBruteLoss()) - dat += text("[]\t-Respiratory Damage %: []
", (occupant.getOxyLoss() < 60 ? "" : ""), occupant.getOxyLoss()) - dat += text("[]\t-Toxin Content %: []
", (occupant.getToxLoss() < 60 ? "" : ""), occupant.getToxLoss()) - dat += text("[]\t-Burn Severity %: []

", (occupant.getFireLoss() < 60 ? "" : ""), occupant.getFireLoss()) - - dat += text("[]\tRadiation Level %: []
", (occupant.radiation < 10 ?"" : ""), occupant.radiation) - dat += text("[]\tGenetic Tissue Damage %: []
", (occupant.getCloneLoss() < 1 ?"" : ""), occupant.getCloneLoss()) - dat += text("[]\tApprox. Brain Damage %: []
", (occupant.getBrainLoss() < 1 ?"" : ""), occupant.getBrainLoss()) - dat += text("Paralysis Summary %: [] ([] seconds left!)
", occupant.paralysis, round(occupant.paralysis / 4)) - dat += text("Body Temperature: [occupant.bodytemperature-T0C]°C ([occupant.bodytemperature*1.8-459.67]°F)

") - - if(occupant.has_brain_worms()) - dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
" - - if(occupant.vessel) - var/blood_volume = round(occupant.vessel.get_reagent_amount("blood")) - var/blood_percent = blood_volume / 560 - blood_percent *= 100 - dat += text("[]\tBlood Level %: [] ([] units)

", (blood_volume > 448 ?"" : ""), blood_percent, blood_volume) - if(occupant.reagents) - dat += text("Inaprovaline units: [] units
", occupant.reagents.get_reagent_amount("inaprovaline")) - dat += text("Soporific: [] units
", occupant.reagents.get_reagent_amount("stoxin")) - dat += text("[]\tDermaline: [] units

", (occupant.reagents.get_reagent_amount("dermaline") < 30 ? "" : ""), occupant.reagents.get_reagent_amount("dermaline")) - dat += text("[]\tBicaridine: [] units
", (occupant.reagents.get_reagent_amount("bicaridine") < 30 ? "" : ""), occupant.reagents.get_reagent_amount("bicaridine")) - dat += text("[]\tDexalin: [] units
", (occupant.reagents.get_reagent_amount("dexalin") < 30 ? "" : ""), occupant.reagents.get_reagent_amount("dexalin")) - - for(var/datum/disease/D in occupant.viruses) - if(!D.hidden[SCANNER]) - dat += text("Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]
") - - dat += "
" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - dat += "" - - for(var/datum/organ/external/e in occupant.organs) - - dat += "" - var/AN = "" - var/open = "" - var/infected = "" - var/imp = "" - var/bled = "" - var/robot = "" - var/splint = "" - var/internal_bleeding = "" - var/lung_ruptured = "" - for(var/datum/wound/W in e.wounds) if(W.internal) - internal_bleeding = "
Internal bleeding" - break - if(istype(e, /datum/organ/external/chest) && occupant.is_lung_ruptured()) - lung_ruptured = "Lung ruptured:" - if(e.status & ORGAN_SPLINTED) - splint = "Splinted:" - 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:" - switch (e.germ_level) - if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200) - infected = "Mild Infection:" - if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) - infected = "Mild Infection+:" - if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400) - infected = "Mild Infection++:" - if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200) - infected = "Acute Infection:" - if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) - infected = "Acute Infection+:" - if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400) - infected = "Acute Infection++:" - if (INFECTION_LEVEL_THREE to INFINITY) - infected = "Septic:" - - var/unknown_body = 0 - for(var/I in e.implants) - if(is_type_in_list(I,known_implants)) - imp += "[I] implanted:" - else - unknown_body++ - - if(unknown_body || e.hidden) - imp += "Unknown body present:" - if(!AN && !open && !infected & !imp) - AN = "None:" - if(!(e.status & ORGAN_DESTROYED)) - dat += "" - else - dat += "" - dat += "" - for(var/datum/organ/internal/i in occupant.internal_organs) - var/mech = "" - if(i.robotic == 1) - mech = "Assisted:" - if(i.robotic == 2) - mech = "Mechanical:" - - var/infection = "None" - switch (i.germ_level) - if (1 to INFECTION_LEVEL_ONE + 200) - infection = "Mild Infection:" - if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) - infection = "Mild Infection+:" - if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400) - infection = "Mild Infection++:" - if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200) - infection = "Acute Infection:" - if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) - infection = "Acute Infection+:" - if (INFECTION_LEVEL_TWO + 300 to INFINITY) - infection = "Acute Infection++:" - - dat += "" - dat += "" - dat += "" - dat += "
OrganBurn DamageBrute DamageOther Wounds
[e.display_name][e.burn_dam][e.brute_dam][robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured][e.display_name]--Not Found
[i.name]N/A[i.damage][infection]:[mech]
" - if(occupant.sdisabilities & BLIND) - dat += text("Cataracts detected.
") - if(occupant.sdisabilities & NEARSIGHTED) - dat += text("Retinal misalignment detected.
") - else - dat += "\The [src] is empty." + dat = format_occupant_data(src.connected.get_occupant_data()) + dat += "
Print
" else dat = " Error: No Body Scanner connected." - dat += text("

Close", user) + + dat += text("
Close", user) user << browse(dat, "window=scanconsole;size=430x600") return + + +/obj/machinery/body_scanconsole/Topic(href, href_list) + if (..()) + return + + if (href_list["print"]) + if (!src.connected) + usr << "\icon[src]Error: No body scanner connected." + return + var/mob/living/carbon/human/occupant = src.connected.occupant + if (!src.connected.occupant) + usr << "\icon[src]The body scanner is empty." + return + if (!istype(occupant,/mob/living/carbon/human)) + usr << "\icon[src]The body scanner cannot scan that lifeform." + return + var/obj/item/weapon/paper/R = new(src.loc) + R.name = "Body scan report" + R.info = format_occupant_data(src.connected.get_occupant_data()) + + +/obj/machinery/bodyscanner/proc/get_occupant_data() + if (!occupant || !istype(occupant, /mob/living/carbon/human)) + return + var/mob/living/carbon/human/H = occupant + var/list/occupant_data = list( + "stationtime" = worldtime2text(), + "stat" = H.stat, + "health" = H.health, + "virus_present" = H.virus2.len, + "bruteloss" = H.getBruteLoss(), + "fireloss" = H.getFireLoss(), + "oxyloss" = H.getOxyLoss(), + "toxloss" = H.getToxLoss(), + "rads" = H.radiation, + "cloneloss" = H.getCloneLoss(), + "brainloss" = H.getBrainLoss(), + "paralysis" = H.paralysis, + "bodytemp" = H.bodytemperature, + "borer_present" = H.has_brain_worms(), + "inaprovaline_amount" = H.reagents.get_reagent_amount("inaprovaline"), + "dexalin_amount" = H.reagents.get_reagent_amount("dexalin"), + "stoxin_amount" = H.reagents.get_reagent_amount("stoxin"), + "bicaridine_amount" = H.reagents.get_reagent_amount("bicaridine"), + "dermaline_amount" = H.reagents.get_reagent_amount("dermaline"), + "blood_amount" = H.vessel.get_reagent_amount("blood"), + "disabilities" = H.sdisabilities, + "tg_diseases_list" = H.viruses.Copy(), + "lung_ruptured" = H.is_lung_ruptured(), + "external_organs" = H.organs.Copy(), + "internal_organs" = H.internal_organs.Copy() + ) + return occupant_data + + +/obj/machinery/body_scanconsole/proc/format_occupant_data(var/list/occ) + var/dat = "Scan performed at [occ["stationtime"]]
" + dat += "Occupant Statistics:
" + var/aux + switch (occ["stat"]) + if(0) + aux = "Conscious" + if(1) + aux = "Unconscious" + else + aux = "Dead" + dat += text("[]\tHealth %: [] ([])

", (occ["health"] > 50 ? "" : ""), occ["health"], aux) + if (occ["virus_present"]) + dat += "Viral pathogen detected in blood stream.
" + dat += text("[]\t-Brute Damage %: []

", (occ["bruteloss"] < 60 ? "" : ""), occ["bruteloss"]) + dat += text("[]\t-Respiratory Damage %: []
", (occ["oxyloss"] < 60 ? "" : ""), occ["oxyloss"]) + dat += text("[]\t-Toxin Content %: []
", (occ["toxloss"] < 60 ? "" : ""), occ["toxloss"]) + dat += text("[]\t-Burn Severity %: []

", (occ["fireloss"] < 60 ? "" : ""), occ["fireloss"]) + + dat += text("[]\tRadiation Level %: []
", (occ["rads"] < 10 ?"" : ""), occ["rads"]) + dat += text("[]\tGenetic Tissue Damage %: []
", (occ["cloneloss"] < 1 ?"" : ""), occ["cloneloss"]) + dat += text("[]\tApprox. Brain Damage %: []
", (occ["brainloss"] < 1 ?"" : ""), occ["brainloss"]) + dat += text("Paralysis Summary %: [] ([] seconds left!)
", occ["paralysis"], round(occ["paralysis"] / 4)) + dat += text("Body Temperature: [occ["bodytemp"]-T0C]°C ([occ["bodytemp"]*1.8-459.67]°F)

") + + if(occ["borer_present"]) + dat += "Large growth detected in frontal lobe, possibly cancerous. Surgical removal is recommended.
" + + dat += text("[]\tBlood Level %: [] ([] units)

", (occ["blood_amount"] > 448 ?"" : ""), occ["blood_amount"]*100 / 560, occ["blood_amount"]) + + dat += text("Inaprovaline: [] units
", occ["inaprovaline_amount"]) + dat += text("Soporific: [] units
", occ["stoxin_amount"]) + dat += text("[]\tDermaline: [] units

", (occ["dermaline"] < 30 ? "" : ""), occ["dermaline"]) + dat += text("[]\tBicaridine: [] units
", (occ["bicaridine"] < 30 ? "" : ""), occ["bicaridine"]) + dat += text("[]\tDexalin: [] units
", (occ["dexalin"] < 30 ? "" : ""), occ["dexalin"]) + + for(var/datum/disease/D in occ["tg_diseases_list"]) + if(!D.hidden[SCANNER]) + dat += text("Warning: [D.form] Detected\nName: [D.name].\nType: [D.spread].\nStage: [D.stage]/[D.max_stages].\nPossible Cure: [D.cure]
") + + dat += "
" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + dat += "" + + for(var/datum/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/lung_ruptured = "" + + dat += "" + + for(var/datum/wound/W in e.wounds) if(W.internal) + internal_bleeding = "
Internal bleeding" + break + if(istype(e, /datum/organ/external/chest) && occ["lung_ruptured"]) + lung_ruptured = "Lung ruptured:" + if(e.status & ORGAN_SPLINTED) + splint = "Splinted:" + 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:" + + switch (e.germ_level) + if (INFECTION_LEVEL_ONE to INFECTION_LEVEL_ONE + 200) + infected = "Mild Infection:" + if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) + infected = "Mild Infection+:" + if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400) + infected = "Mild Infection++:" + if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200) + infected = "Acute Infection:" + if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) + infected = "Acute Infection+:" + if (INFECTION_LEVEL_TWO + 300 to INFECTION_LEVEL_TWO + 400) + infected = "Acute Infection++:" + if (INFECTION_LEVEL_THREE to INFINITY) + infected = "Septic:" + + if (e.implants.len) + var/unknown_body = 0 + for(var/I in e.implants) + if(is_type_in_list(I,known_implants)) + imp += "[I] implanted:" + else + unknown_body++ + if(unknown_body || e.hidden) + imp += "Unknown body present:" + + if(!AN && !open && !infected & !imp) + AN = "None:" + if(!(e.status & ORGAN_DESTROYED)) + dat += "" + else + dat += "" + dat += "" + + for(var/datum/organ/internal/i in occ["internal_organs"]) + var/mech = "" + if(i.robotic == 1) + mech = "Assisted:" + if(i.robotic == 2) + mech = "Mechanical:" + + var/infection = "None" + switch (i.germ_level) + if (1 to INFECTION_LEVEL_ONE + 200) + infection = "Mild Infection:" + if (INFECTION_LEVEL_ONE + 200 to INFECTION_LEVEL_ONE + 300) + infection = "Mild Infection+:" + if (INFECTION_LEVEL_ONE + 300 to INFECTION_LEVEL_ONE + 400) + infection = "Mild Infection++:" + if (INFECTION_LEVEL_TWO to INFECTION_LEVEL_TWO + 200) + infection = "Acute Infection:" + if (INFECTION_LEVEL_TWO + 200 to INFECTION_LEVEL_TWO + 300) + infection = "Acute Infection+:" + if (INFECTION_LEVEL_TWO + 300 to INFINITY) + infection = "Acute Infection++:" + + dat += "" + dat += "" + dat += "" + dat += "
OrganBurn DamageBrute DamageOther Wounds
[e.display_name][e.burn_dam][e.brute_dam][robot][bled][AN][splint][open][infected][imp][internal_bleeding][lung_ruptured][e.display_name]--Not Found
[i.name]N/A[i.damage][infection]:[mech]
" + + if(occ["sdisabilities"] & BLIND) + dat += text("Cataracts detected.
") + if(occ["sdisabilities"] & NEARSIGHTED) + dat += text("Retinal misalignment detected.
") + return dat \ No newline at end of file diff --git a/code/modules/mob/mob_defines.dm b/code/modules/mob/mob_defines.dm index bb7e9f1416..86f3724fb5 100644 --- a/code/modules/mob/mob_defines.dm +++ b/code/modules/mob/mob_defines.dm @@ -185,7 +185,7 @@ //List of active diseases - var/viruses = list() // replaces var/datum/disease/virus + var/list/viruses = list() // replaces var/datum/disease/virus //Monkey/infected mode var/list/resistances = list()