diff --git a/code/_onclick/hud/_defines.dm b/code/_onclick/hud/_defines.dm index 47f567b7d149..1c5632b74e01 100644 --- a/code/_onclick/hud/_defines.dm +++ b/code/_onclick/hud/_defines.dm @@ -193,3 +193,7 @@ #define ui_ghost_spawners "SOUTH: 6, CENTER+1:24" #define ui_ghost_language_menu "SOUTH: 22,CENTER+2:8" #define ui_ghost_pai "SOUTH: 6,CENTER+2:8" +#define ui_ghost_med "SOUTH: 6,CENTER+3:-8" +#define ui_ghost_chem "SOUTH: 22,CENTER+3:-8" +#define ui_ghost_nanite "SOUTH: 6,CENTER+3:8" +#define ui_ghost_wound "SOUTH: 22,CENTER+3:8" diff --git a/code/_onclick/hud/ghost.dm b/code/_onclick/hud/ghost.dm index fb9558ebbc0b..217181652905 100644 --- a/code/_onclick/hud/ghost.dm +++ b/code/_onclick/hud/ghost.dm @@ -68,6 +68,22 @@ using.screen_loc = ui_ghost_spawners static_inventory += using + using = new /obj/screen/ghost/med_scan() + using.screen_loc = ui_ghost_med + static_inventory += using + + using = new /obj/screen/ghost/chem_scan() + using.screen_loc = ui_ghost_chem + static_inventory += using + + using = new /obj/screen/ghost/nanite_scan() + using.screen_loc = ui_ghost_nanite + static_inventory += using + + using = new /obj/screen/ghost/wound_scan() + using.screen_loc = ui_ghost_wound + static_inventory += using + using = new /obj/screen/ghost/pai() using.screen_loc = ui_ghost_pai static_inventory += using diff --git a/code/_onclick/hud/screen_objects.dm b/code/_onclick/hud/screen_objects.dm index d2a5be1094ea..da193e07e879 100644 --- a/code/_onclick/hud/screen_objects.dm +++ b/code/_onclick/hud/screen_objects.dm @@ -102,6 +102,46 @@ var/mob/dead/observer/G = usr G.register_pai() +/obj/screen/ghost/med_scan + name = "Toggle Medical Scan" + icon = 'icons/mob/screen_midnight.dmi' + icon_state = "med_scan" + screen_loc = ui_ghost_med + +/obj/screen/ghost/med_scan/Click() + var/mob/dead/observer/G = usr + G.toggle_health_scan() + +/obj/screen/ghost/chem_scan + name = "Toggle Chemical Scan" + icon = 'icons/mob/screen_midnight.dmi' + icon_state = "chem_scan" + screen_loc = ui_ghost_chem + +/obj/screen/ghost/chem_scan/Click() + var/mob/dead/observer/G = usr + G.toggle_chemical_scan() + +/obj/screen/ghost/nanite_scan + name = "Toggle Nanite Scan" + icon = 'icons/mob/screen_midnight.dmi' + icon_state = "nanite_scan" + screen_loc = ui_ghost_nanite + +/obj/screen/ghost/nanite_scan/Click() + var/mob/dead/observer/G = usr + G.toggle_nanite_scan() + +/obj/screen/ghost/wound_scan + name = "Toggle Wound Scan" + icon = 'icons/mob/screen_midnight.dmi' + icon_state = "wound_scan" + screen_loc = ui_ghost_wound + +/obj/screen/ghost/wound_scan/Click() + var/mob/dead/observer/G = usr + G.toggle_wound_scan() + /obj/screen/language_menu/ghost screen_loc = ui_ghost_language_menu diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 0e495a6667de..48f3ca513419 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -1,3 +1,8 @@ +#define SCAN_CHEM (1<<0) +#define SCAN_HEALTH (1<<1) +#define SCAN_NANITE (1<<2) +#define SCAN_WOUND (1<<3) + /mob/dead/observer/DblClickOn(atom/A, params) if(check_click_intercept(params, A)) return @@ -58,10 +63,17 @@ return FALSE /mob/living/attack_ghost(mob/dead/observer/user) - if(user.client && user.health_scan) - healthscan(user, src, 1, TRUE) - if(user.client && user.chem_scan) - chemscan(user, src) + if(user?.client) + if(user.scanmode & SCAN_HEALTH) + healthscan(user, src, TRUE) + if(user.scanmode & SCAN_CHEM) + chemscan(user, src) + if(user.scanmode & SCAN_NANITE) + var/response = SEND_SIGNAL(src, COMSIG_NANITE_SCAN, user, TRUE) + if(!response) + to_chat(user, span_info("No nanites detected in the subject.")) + if(user.scanmode & SCAN_WOUND) + woundscan(user, src) return ..() // --------------------------------------- diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 72d8685891b6..03e8da7b7ae0 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -31,8 +31,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) var/mob/observetarget = null //The target mob that the ghost is observing. Used as a reference in logout() var/ghost_hud_enabled = TRUE //did this ghost disable the on-screen HUD? var/data_huds_on = FALSE //Are data HUDs currently enabled? - var/health_scan = FALSE //Are health scans currently enabled? - var/chem_scan = FALSE // Are chemical scans currently enabled + + var/scanmode = 0 var/list/datahuds = list(DATA_HUD_SECURITY_ADVANCED, DATA_HUD_MEDICAL_ADVANCED, DATA_HUD_DIAGNOSTIC_ADVANCED) //list of data HUDs shown to ghosts. var/ghost_orbit = GHOST_ORBIT_CIRCLE @@ -742,16 +742,32 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp set desc = "Toggles whether you health-scan living beings on click" set category = "Ghost" - health_scan = !health_scan - to_chat(src, span_notice("Health scan [health_scan ? "enabled" : "disabled"].")) + scanmode ^= SCAN_HEALTH + to_chat(src, span_notice("Health scan [scanmode & SCAN_HEALTH ? "enabled" : "disabled"].")) /mob/dead/observer/verb/toggle_chemical_scan() set name = "Toggle Chemical Scan" set desc = "Toggles whether you chem-scan living beings on click" set category = "Ghost" - chem_scan = !chem_scan - to_chat(src, span_notice("Chemical scan [chem_scan ? "enabled" : "disabled"].")) + scanmode ^= SCAN_CHEM + to_chat(src, span_notice("Chemical scan [scanmode & SCAN_CHEM ? "enabled" : "disabled"].")) + +/mob/dead/observer/verb/toggle_nanite_scan() + set name = "Toggle Nanite Scan" + set desc = "Toggles scanning of nanites" + set category = "Ghost" + + scanmode ^= SCAN_NANITE + to_chat(src, span_notice("Nanite scan [scanmode & SCAN_NANITE ? "enabled" : "disabled"].")) + +/mob/dead/observer/verb/toggle_wound_scan() + set name = "Toggle Wound Scan" + set desc = "Toggles scanning of wounds" + set category = "Ghost" + + scanmode ^= SCAN_WOUND + to_chat(src, span_notice("Wound scan [scanmode & SCAN_WOUND ? "enabled" : "disabled"].")) /mob/dead/observer/verb/restore_ghost_appearance() set name = "Restore Ghost Character" diff --git a/icons/mob/screen_midnight.dmi b/icons/mob/screen_midnight.dmi index 103e6e6c56e8..e61f85e77b47 100644 Binary files a/icons/mob/screen_midnight.dmi and b/icons/mob/screen_midnight.dmi differ diff --git a/icons/mob/screen_operative.dmi b/icons/mob/screen_operative.dmi index d51022b98a1e..65b38a770b17 100644 Binary files a/icons/mob/screen_operative.dmi and b/icons/mob/screen_operative.dmi differ diff --git a/icons/mob/screen_plasmafire.dmi b/icons/mob/screen_plasmafire.dmi index f251b8b167e5..bd6ce7cdd9d3 100644 Binary files a/icons/mob/screen_plasmafire.dmi and b/icons/mob/screen_plasmafire.dmi differ diff --git a/icons/mob/screen_retro.dmi b/icons/mob/screen_retro.dmi index e57cefa83e38..7c295364b1a6 100644 Binary files a/icons/mob/screen_retro.dmi and b/icons/mob/screen_retro.dmi differ diff --git a/icons/mob/screen_slimecore.dmi b/icons/mob/screen_slimecore.dmi index 01831250b80b..771ae76e31c5 100644 Binary files a/icons/mob/screen_slimecore.dmi and b/icons/mob/screen_slimecore.dmi differ