mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 03:27:05 +01:00
Merge pull request #12023 from SteelSlayer/ghost-health-analyzer
Health and Cyborg analyzer for ghosts
This commit is contained in:
@@ -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)
|
||||
@@ -541,6 +542,19 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
set hidden = 1
|
||||
to_chat(src, "<span class='warning'>You are dead! You have no mind to store memory!</span>")
|
||||
|
||||
|
||||
/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, "<span class='notice'>Health scan disabled.</span>")
|
||||
health_scan = FALSE
|
||||
else
|
||||
to_chat(src, "<span class='notice'>Health scan enabled.</span>")
|
||||
health_scan = TRUE
|
||||
|
||||
/mob/dead/observer/verb/analyze_air()
|
||||
set name = "Analyze Air"
|
||||
set category = "Ghost"
|
||||
|
||||
@@ -235,6 +235,12 @@
|
||||
to_chat(user, "<span class='notice'>Body Temperature: ???</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
|
||||
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, "<span class='warning'>You can't analyze non-robotic things!</span>")
|
||||
return
|
||||
|
||||
user.visible_message("<span class='notice'>[user] has analyzed [M]'s components.</span>","<span class='notice'>You have analyzed [M]'s components.</span>")
|
||||
|
||||
switch(scan_type)
|
||||
if("robot")
|
||||
var/BU = M.getFireLoss() > 50 ? "<b>[M.getFireLoss()]</b>" : M.getFireLoss()
|
||||
@@ -308,5 +314,3 @@
|
||||
to_chat(user, "<span class='notice'>Internal Fluid Level:[H.blood_volume]/[H.max_blood]</span>")
|
||||
if(H.bleed_rate)
|
||||
to_chat(user, "<span class='warning'>Warning:External component leak detected!</span>")
|
||||
|
||||
src.add_fingerprint(user)
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user