/obj/machinery/computer/crew name = "Crew monitoring computer" desc = "Used to monitor active health sensors built into most of the crew's uniforms." icon_state = "crew" use_power = 1 idle_power_usage = 250 active_power_usage = 500 circuit = "/obj/item/weapon/circuitboard/crew" var/list/tracked = list( ) /obj/machinery/computer/crew/New() tracked = list() ..() /obj/machinery/computer/crew/attack_ai(mob/user) attack_hand(user) interact(user) /obj/machinery/computer/crew/attack_hand(mob/user) add_fingerprint(user) if(stat & (BROKEN|NOPOWER)) return interact(user) /obj/machinery/computer/crew/update_icon() if(stat & BROKEN) icon_state = "crewb" else if(stat & NOPOWER) src.icon_state = "c_unpowered" stat |= NOPOWER else icon_state = initial(icon_state) stat &= ~NOPOWER /obj/machinery/computer/crew/Topic(href, href_list) if(..()) return if (src.z > 6) usr << "\red Unable to establish a connection: \black You're too far away from the station!" return if( href_list["close"] ) usr << browse(null, "window=crewcomp") usr.unset_machine() return if(href_list["update"]) src.updateDialog() return /obj/machinery/computer/crew/interact(mob/user) if(stat & (BROKEN|NOPOWER)) return if(!istype(user, /mob/living/silicon) && get_dist(src, user) > 1) user.unset_machine() user << browse(null, "window=powcomp") return user.set_machine(src) src.scan() var/t = "Crew Monitoring
" t += "
Refresh " t += "Close
" t += "" var/list/logs = list() for(var/obj/item/clothing/under/C in src.tracked) var/log = "" var/turf/pos = get_turf(C) if((C) && (C.has_sensor) && (pos) && (pos.z == src.z) && C.sensor_mode) if(istype(C.loc, /mob/living/carbon/human)) var/mob/living/carbon/human/H = C.loc var/dam1 = round(H.getOxyLoss(),1) var/dam2 = round(H.getToxLoss(),1) var/dam3 = round(H.getFireLoss(),1) var/dam4 = round(H.getBruteLoss(),1) var/life_status = "[H.stat > 1 ? "Deceased" : "Living"]" var/damage_report = "([dam1]/[dam2]/[dam3]/[dam4])" if(H.wear_id) log += "" else log += "" switch(C.sensor_mode) if(1) log += "" if(2) log += "" if(3) var/area/player_area = get_area(H) log += "" logs += log logs = sortList(logs) for(var/log in logs) t += log t += "
NameVitalsPosition
[H.wear_id.name]
Unknown[life_status]Not Available
[life_status] [damage_report]Not Available
[life_status] [damage_report][player_area.name] ([pos.x], [pos.y])
" t += "
" user << browse(t, "window=crewcomp;size=900x600") onclose(user, "crewcomp") /obj/machinery/computer/crew/proc/scan() for(var/obj/item/clothing/under/C in world) if((C.has_sensor) && (istype(C.loc, /mob/living/carbon/human))) var/check = 0 for(var/O in src.tracked) if(O == C) check = 1 break if(!check) src.tracked.Add(C) return 1