/obj/machinery/computer3/operating
default_prog = /datum/file/program/op_monitor
spawn_parts = list(/obj/item/part/computer/storage/hdd,/obj/item/part/computer/networking/prox)
icon_state = "frame-med"
/datum/file/program/op_monitor
name = "operating table monitor"
desc = "Monitors patient status during surgery."
active_state = "operating"
var/mob/living/carbon/human/patient = null
var/obj/machinery/optable/table = null
/datum/file/program/op_monitor/interact()
if(!interactable())
return
if(!computer.net)
computer.Crash(MISSING_PERIPHERAL)
return
table = computer.net.connect_to(/obj/machinery/optable,table)
var/dat = ""
if(table)
dat += "Patient information:
"
if(src.table && (src.table.check_victim()))
src.patient = src.table.victim
dat += {"Patient Status: [patient.stat ? "Non-Responsive" : "Stable"]
Blood Type: [patient.b_type]
Health: [round(patient.health)]
Brute Damage: [round(patient.getBruteLoss())]
Toxins Damage: [round(patient.getToxLoss())]
Fire Damage: [round(patient.getFireLoss())]
Suffocation Damage: [round(patient.getOxyLoss())]
"}
else
src.patient = null
dat += "No patient detected"
else
dat += "Operating table not found."
popup.set_content(dat)
popup.open()
/datum/file/program/op_monitor/Topic()
if(!interactable())
return
..()