From 58bdb85285852deb5ab527d92f7bdf60fe5ce10c Mon Sep 17 00:00:00 2001 From: Timberpoes Date: Sun, 19 Apr 2020 09:06:10 +0100 Subject: [PATCH] Ghost chem scans (#50475) --- code/_onclick/observer.dm | 2 ++ code/modules/mob/dead/observer/observer.dm | 13 +++++++++++++ 2 files changed, 15 insertions(+) diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm index 285ec2fb94c..efed103392f 100644 --- a/code/_onclick/observer.dm +++ b/code/_onclick/observer.dm @@ -62,6 +62,8 @@ /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) return ..() // --------------------------------------- diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm index 61c83085b18..f55339fa350 100644 --- a/code/modules/mob/dead/observer/observer.dm +++ b/code/modules/mob/dead/observer/observer.dm @@ -32,6 +32,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER) var/ghost_hud_enabled = 1 //did this ghost disable the on-screen HUD? var/data_huds_on = 0 //Are data HUDs currently enabled? var/health_scan = FALSE //Are health scans currently enabled? + var/chem_scan = FALSE //Are chem scans currently enabled? var/gas_scan = FALSE //Are gas scans currently enabled? 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 @@ -723,6 +724,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp to_chat(src, "Health scan enabled.") health_scan = TRUE +/mob/dead/observer/verb/toggle_chem_scan() + set name = "Toggle Chem Scan" + set desc = "Toggles whether you scan living beings for chemicals and addictions on click" + set category = "Ghost" + + if(chem_scan) //remove old huds + to_chat(src, "Chem scan disabled.") + chem_scan = FALSE + else + to_chat(src, "Chem scan enabled.") + chem_scan = TRUE + /mob/dead/observer/verb/toggle_gas_scan() set name = "Toggle Gas Scan" set desc = "Toggles whether you analyze gas contents on click"