Expanded ghost gas analyzer (#22914)

* Please don't shoot me this time

* Added descriptor

* This one actually works, please don't shoot me

* Spacing fix

* proper documentation
This commit is contained in:
Bjamcham
2023-10-30 15:09:37 -04:00
committed by GitHub
parent faaa2fb392
commit 3e4cb4c25a
2 changed files with 23 additions and 0 deletions
+9
View File
@@ -91,3 +91,12 @@
/obj/effect/portal/attack_ghost(mob/user as mob)
if(target)
user.forceMove(get_turf(target))
/obj/machinery/atmospherics/attack_ghost(mob/dead/observer/user)
if(user.gas_analyzer)
if(istype(src, /obj/machinery/atmospherics/pipe))
var/obj/machinery/atmospherics/pipe/T = src
atmosanalyzer_scan(T.parent.air, user, T)
else if(istype(src, /obj/machinery/atmospherics/unary))
var/obj/machinery/atmospherics/unary/T = src
atmosanalyzer_scan(T.air_contents, user, T)
@@ -32,6 +32,8 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
var/list/data_hud_seen = list()
var/ghost_orbit = GHOST_ORBIT_CIRCLE
var/health_scan = FALSE //does the ghost have health scanner mode on? by default it should be off
///toggle for ghost gas analyzer
var/gas_analyzer = FALSE
var/datum/orbit_menu/orbit_menu
/mob/dead/observer/New(mob/body=null, flags=1)
@@ -528,6 +530,18 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
to_chat(src, "<span class='notice'>Health scan enabled.</span>")
health_scan = TRUE
/mob/dead/observer/verb/toggle_gas_anaylzer()
set name = "Toggle Gas Analyzer"
set desc = "Toggles wether you can anaylze gas contents on click"
set category = "Ghost"
if(gas_analyzer)
to_chat(src, "<span class='notice'>Gas Analyzer disabled.</span>")
gas_analyzer = FALSE
else
to_chat(src, "<span class='notice'>Gas Analyzer enabled. Click on a pipe to analyze.</span>")
gas_analyzer = TRUE
/mob/dead/observer/verb/analyze_air()
set name = "Analyze Air"
set category = "Ghost"