diff --git a/code/defines/obj/clothing/glasses.dm b/code/defines/obj/clothing/glasses.dm index d6de1488699..3a4c119d8e0 100644 --- a/code/defines/obj/clothing/glasses.dm +++ b/code/defines/obj/clothing/glasses.dm @@ -59,11 +59,21 @@ icon_state = "thermoncle" flags = null //doesn't protect eyes because it's a monocle, duh -/obj/item/clothing/glasses/healthscanner +/obj/item/clothing/glasses/hud + name = "HUD" + desc = "A heads-up display that provides important info in (almost) real time." + flags = null //doesn't protect eyes because it's a monocle, duh + +/obj/item/clothing/glasses/hud/health name = "Health Scanner HUD" desc = "A heads-up display that scans the humans in view and provides accurate data about their health status." - icon_state = "healthscanner" - flags = null //doesn't protect eyes because it's a monocle, duh + icon_state = "healthhud" + var/list/icon/current = list() //the current hud icons + +/obj/item/clothing/glasses/hud/security + name = "Security HUD" + desc = "A heads-up display that scans the humans in view and provides accurate data about their ID status." + icon_state = "securityhud" var/list/icon/current = list() //the current hud icons /proc/RoundHealth(health) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 85db305b3ba..d74f121c540 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -364,4 +364,21 @@ return list("Assistant", "Station Engineer", "Shaft Miner", "Detective", "Medical Doctor", "Captain", "Security Officer", "Warden", "Geneticist", "Scientist", "Head of Security", "Head of Personnel", "Atmospheric Technician", "Chaplain", "Barman", "Chemist", "Janitor", "Clown", "Mime", "Chef", "Roboticist", "Quartermaster", - "Chief Engineer", "Research Director", "Botanist", "Librarian", "Lawyer", "Virologist", "Cargo Technician", "Chief Medical Officer") \ No newline at end of file + "Chief Engineer", "Research Director", "Botanist", "Librarian", "Lawyer", "Virologist", "Cargo Technician", "Chief Medical Officer") + +/obj/proc/GetJobName() + if (!istype(src, /obj/item/device/pda) && !istype(src,/obj/item/weapon/card/id)) + return + + var/jobName + + if(istype(src, /obj/item/device/pda)) + if(src:id) + jobName = src:id:assignment + if(istype(src, /obj/item/weapon/card/id)) + jobName = src:assignment + + if(jobName in get_all_jobs()) + return jobName + else + return "Unknown" diff --git a/code/modules/mob/living/carbon/human/life.dm b/code/modules/mob/living/carbon/human/life.dm index f136c5e2ef8..cdb1ae3a563 100644 --- a/code/modules/mob/living/carbon/human/life.dm +++ b/code/modules/mob/living/carbon/human/life.dm @@ -746,7 +746,7 @@ if(client) for(var/image/hud in client.images) - if(copytext(hud.icon_state,6) == "health") //ugly, but icon comparison is worse, I believe + if(copytext(hud.icon_state,4) == "hud") //ugly, but icon comparison is worse, I believe del(hud) if (src.stat == 2 || src.mutations & XRAY) @@ -795,19 +795,45 @@ src.sight |= SEE_OBJS if (!src.druggy) src.see_invisible = 0 - else if (istype(glasses, /obj/item/clothing/glasses/healthscanner)) + else if (istype(glasses, /obj/item/clothing/glasses/hud/security)) + if(client) + var/icon/tempHud = 'hud.dmi' + for(var/mob/living/carbon/human/perp in view(src)) + if(perp.wear_id) + client.images += image(tempHud,perp,"hud[ckey(perp:wear_id:GetJobName())]") + for (var/datum/data/record/E in data_core.general) + var/perpname = "wot" + if(istype(perp.wear_id,/obj/item/weapon/card/id)) + perpname = perp.wear_id:registered + else if(istype(perp.wear_id,/obj/item/device/pda)) + var/obj/item/device/pda/tempPda = perp.wear_id + perpname = tempPda.owner + world << "[perpname]" + if (E.fields["name"] == perpname) + for (var/datum/data/record/R in data_core.security) + if ((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "*Arrest*")) + client.images += image(tempHud,perp,"hudwanted") + break + else if((R.fields["id"] == E.fields["id"]) && (R.fields["criminal"] == "Incarcerated")) + client.images += image(tempHud,perp,"hudprisoner") + break + else + client.images += image(tempHud,perp,"hudunknown") + if (!src.druggy) + src.see_invisible = 0 + else if (istype(glasses, /obj/item/clothing/glasses/hud/health)) if(client) var/icon/tempHud = 'hud.dmi' for(var/mob/living/carbon/human/patient in view(src)) - client.images += image(tempHud,patient,RoundHealth(patient.health)) + client.images += image(tempHud,patient,"hud[RoundHealth(patient.health)]") if(patient.stat == 2) - client.images += image(tempHud,patient,"healthdead") + client.images += image(tempHud,patient,"huddead") else if(patient.alien_egg_flag) - client.images += image(tempHud,patient,"healthxeno") + client.images += image(tempHud,patient,"hudxeno") else if(patient.virus) - client.images += image(tempHud,patient,"healthill") + client.images += image(tempHud,patient,"hudill") else - client.images += image(tempHud,patient,"healthy") + client.images += image(tempHud,patient,"hudhealthy") if (!src.druggy) src.see_invisible = 0 diff --git a/icons/mob/eyes.dmi b/icons/mob/eyes.dmi index d8c4e544a54..ecebb787f99 100644 Binary files a/icons/mob/eyes.dmi and b/icons/mob/eyes.dmi differ diff --git a/icons/mob/hud.dmi b/icons/mob/hud.dmi index 38f3e5213ae..dcce261c23a 100644 Binary files a/icons/mob/hud.dmi and b/icons/mob/hud.dmi differ diff --git a/icons/obj/clothing/glasses.dmi b/icons/obj/clothing/glasses.dmi index 3af65d9c262..21e45acb3a9 100644 Binary files a/icons/obj/clothing/glasses.dmi and b/icons/obj/clothing/glasses.dmi differ diff --git a/maps/tgstation.2.0.7.dmm b/maps/tgstation.2.0.7.dmm index 9020a4b14bd..8ec701374f6 100644 --- a/maps/tgstation.2.0.7.dmm +++ b/maps/tgstation.2.0.7.dmm @@ -577,7 +577,7 @@ "ale" = (/obj/machinery/atmospherics/pipe/manifold{dir = 4},/turf/simulated/floor,/area/security/warden) "alf" = (/obj/cable{d1 = 1; d2 = 2; icon_state = "1-2"; tag = "Streight"},/turf/simulated/floor,/area/security/warden) "alg" = (/obj/stool/chair{dir = 4},/obj/landmark/start{name = "Warden"},/obj/item/device/radio/intercom{broadcasting = 0; listening = 1; name = "Station Intercom (General)"; pixel_x = 25; pixel_y = 20},/turf/simulated/floor,/area/security/warden) -"alh" = (/obj/table/reinforced,/obj/machinery/door/window/westright{name = "Warden's Desk"; req_access_txt = "3"},/obj/machinery/door/window/eastleft{name = "Warden's Desk"},/obj/window/reinforced,/obj/item/clothing/mask/gas/emergency,/obj/item/clothing/glasses/thermal,/turf/simulated/floor,/area/security/warden) +"alh" = (/obj/table/reinforced,/obj/machinery/door/window/westright{name = "Warden's Desk"; req_access_txt = "3"},/obj/machinery/door/window/eastleft{name = "Warden's Desk"},/obj/window/reinforced,/obj/item/clothing/mask/gas/emergency,/obj/item/clothing/glasses/thermal,/obj/item/clothing/glasses/hud/security,/turf/simulated/floor,/area/security/warden) "ali" = (/turf/simulated/floor{icon_state = "red"; dir = 9},/area/security/main) "alj" = (/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "red"; dir = 1},/area/security/main) "alk" = (/turf/simulated/floor{icon_state = "red"; dir = 1},/area/security/main) @@ -3510,7 +3510,7 @@ "bpz" = (/obj/machinery/atmospherics/unary/vent_pump{dir = 1; on = 1},/obj/item/device/radio/intercom{pixel_y = 25},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) "bpA" = (/obj/machinery/computer/operating,/obj/cable{icon_state = "0-2"; d2 = 2},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) "bpB" = (/obj/machinery/door_control{id = "Obshutter"; name = "Observation Door Control"; pixel_y = 25},/obj/machinery/light{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) -"bpC" = (/obj/table{icon_state = "tabledir"; dir = 8},/obj/item/weapon/scalpel,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/obj/item/clothing/glasses/healthscanner,/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) +"bpC" = (/obj/table{icon_state = "tabledir"; dir = 8},/obj/item/weapon/scalpel,/obj/item/clothing/glasses/hud/health,/turf/simulated/floor{icon_state = "white"},/area/medical/surgery) "bpD" = (/obj/grille,/obj/machinery/door/poddoor{density = 0; icon_state = "pdoor0"; id = "Obshutter"; name = "Observation Shutters"; opacity = 0},/obj/window/reinforced{dir = 8},/obj/window/reinforced{dir = 4},/turf/simulated/floor/plating,/area/medical/surgery) "bpE" = (/obj/stool/chair{dir = 8},/obj/item/device/radio/intercom{pixel_y = 25},/obj/machinery/camera{c_tag = "Surgery Observation"},/turf/simulated/floor{icon_state = "dark"},/area/medical/surgery) "bpF" = (/turf/simulated/floor{icon_state = "dark"},/area/medical/surgery) @@ -4131,7 +4131,7 @@ "bBw" = (/obj/machinery/atmospherics/unary/vent_scrubber{on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/secure_closet/personal/patient,/turf/simulated/floor{dir = 1; icon_state = "warning"},/area/medical/genetics) "bBx" = (/obj/machinery/light{dir = 8},/obj/disposalpipe/segment{dir = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/medbay) "bBy" = (/obj/grille,/obj/window/reinforced{dir = 4},/obj/window/reinforced{dir = 1},/obj/window/reinforced{dir = 8},/obj/window/reinforced,/turf/simulated/floor/plating,/area/medical/cmo) -"bBz" = (/obj/table{dir = 5; icon_state = "tabledir"},/obj/item/weapon/reagent_containers/hypospray,/obj/item/clothing/glasses/healthscanner,/turf/simulated/floor{icon_state = "white"},/area/medical/cmo) +"bBz" = (/obj/table{dir = 5; icon_state = "tabledir"},/obj/item/weapon/reagent_containers/hypospray,/obj/item/clothing/glasses/hud/health,/turf/simulated/floor{icon_state = "white"},/area/medical/cmo) "bBA" = (/obj/machinery/firealarm{dir = 1; pixel_y = -24},/obj/landmark{name = "xeno_spawn"; pixel_x = -1},/obj/machinery/atmospherics/unary/vent_pump{on = 1},/turf/simulated/floor{icon_state = "white"},/area/medical/cmo) "bBB" = (/obj/machinery/atmospherics/pipe/simple{color = "red"; icon_state = "intact-r-f"; level = 1; name = "pipe"},/obj/machinery/requests_console{department = "Chief Medical Officer's Office"; departmentType = 5; name = "CMO RC"; pixel_y = -30},/obj/cable{d1 = 1; d2 = 4; icon_state = "1-4"; tag = "90Curve"},/turf/simulated/floor{icon_state = "white"},/area/medical/cmo) "bBC" = (/obj/machinery/light,/obj/machinery/atmospherics/unary/vent_scrubber{on = 1; scrub_N2O = 0; scrub_Toxins = 0},/obj/cable{d1 = 4; d2 = 8; icon_state = "4-8"; tag = "Streight"},/turf/simulated/floor{icon_state = "white"},/area/medical/cmo)