diff --git a/code/_onclick/observer.dm b/code/_onclick/observer.dm
index 797384b8336..8661a4662b5 100644
--- a/code/_onclick/observer.dm
+++ b/code/_onclick/observer.dm
@@ -58,6 +58,14 @@
/atom/proc/attack_ghost(mob/user as mob)
return
+// health + cyborg analyzer for ghosts
+/mob/living/attack_ghost(mob/dead/observer/user)
+ if(user.client && user.health_scan)
+ if(issilicon(src) || ismachine(src))
+ robot_healthscan(user, src)
+ else if(ishuman(src))
+ healthscan(user, src, 1, TRUE)
+
// ---------------------------------------
// And here are some good things for free:
// Now you can click through portals, wormholes, gateways, and teleporters while observing. -Sayu
diff --git a/code/game/objects/items/devices/scanners.dm b/code/game/objects/items/devices/scanners.dm
index cad4ae25ac8..f6432d9b027 100644
--- a/code/game/objects/items/devices/scanners.dm
+++ b/code/game/objects/items/devices/scanners.dm
@@ -135,8 +135,13 @@ REAGENT SCANNER
user.show_message("Key: Suffocation/Toxin/Burns/Brute", 1)
user.show_message("Body Temperature: ???", 1)
return
- user.visible_message("[user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.")
+ user.visible_message("[user] has analyzed [M]'s vitals."," You have analyzed [M]'s vitals.")
+ healthscan(user, M, mode, upgraded)
+ add_fingerprint(user)
+
+
+proc/healthscan(mob/user, mob/living/M, mode = 1, upgraded = FALSE)
if(!ishuman(M) || M.isSynthetic())
//these sensors are designed for organic life
user.show_message("Analyzing Results for ERROR:\n\t Overall Status: ERROR")
@@ -271,7 +276,6 @@ REAGENT SCANNER
user.show_message("Subject's genes are showing minor signs of instability.")
else
user.show_message("Subject's genes are stable.")
- add_fingerprint(user)
/obj/item/healthanalyzer/verb/toggle_mode()
diff --git a/code/modules/mob/dead/observer/observer.dm b/code/modules/mob/dead/observer/observer.dm
index 731f53c7838..dc2eca2b11e 100644
--- a/code/modules/mob/dead/observer/observer.dm
+++ b/code/modules/mob/dead/observer/observer.dm
@@ -29,6 +29,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
var/seedarkness = TRUE
var/data_hud_seen = FALSE //this should one of the defines in __DEFINES/hud.dm
var/ghost_orbit = GHOST_ORBIT_CIRCLE
+ var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
set_invisibility(GLOB.observer_default_invisibility)
@@ -537,6 +538,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
set hidden = 1
to_chat(src, "You are dead! You have no mind to store memory!")
+
+/mob/dead/observer/verb/toggle_health_scan()
+ set name = "Toggle Health Scan"
+ set desc = "Toggles whether you health-scan living beings on click"
+ set category = "Ghost"
+
+ if(health_scan) //remove old huds
+ to_chat(src, "Health scan disabled.")
+ health_scan = FALSE
+ else
+ to_chat(src, "Health scan enabled.")
+ health_scan = TRUE
+
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"
diff --git a/code/modules/mob/living/silicon/robot/component.dm b/code/modules/mob/living/silicon/robot/component.dm
index d584d5a50f5..0750e4ea3ed 100644
--- a/code/modules/mob/living/silicon/robot/component.dm
+++ b/code/modules/mob/living/silicon/robot/component.dm
@@ -235,6 +235,12 @@
to_chat(user, "Body Temperature: ???")
return
+ user.visible_message("[user] has analyzed [M]'s components.","You have analyzed [M]'s components.")
+ robot_healthscan(user, M)
+ add_fingerprint(user)
+
+
+proc/robot_healthscan(mob/user, mob/living/M)
var/scan_type
if(istype(M, /mob/living/silicon/robot))
scan_type = "robot"
@@ -244,7 +250,7 @@
to_chat(user, "You can't analyze non-robotic things!")
return
- user.visible_message("[user] has analyzed [M]'s components.","You have analyzed [M]'s components.")
+
switch(scan_type)
if("robot")
var/BU = M.getFireLoss() > 50 ? "[M.getFireLoss()]" : M.getFireLoss()
@@ -308,5 +314,3 @@
to_chat(user, "Internal Fluid Level:[H.blood_volume]/[H.max_blood]")
if(H.bleed_rate)
to_chat(user, "Warning:External component leak detected!")
-
- src.add_fingerprint(user)
diff --git a/code/modules/mob/living/silicon/robot/robot.dm b/code/modules/mob/living/silicon/robot/robot.dm
index b9ed81f7180..900705733ba 100644
--- a/code/modules/mob/living/silicon/robot/robot.dm
+++ b/code/modules/mob/living/silicon/robot/robot.dm
@@ -885,6 +885,8 @@ var/list/robot_verbs_default = list(
/mob/living/silicon/robot/attack_ghost(mob/user)
if(wiresexposed)
wires.Interact(user)
+ else
+ ..() //this calls the /mob/living/attack_ghost proc for the ghost health/cyborg analyzer
/mob/living/silicon/robot/proc/allowed(obj/item/I)
var/obj/dummy = new /obj(null) // Create a dummy object to check access on as to avoid having to snowflake check_access on every mob