Additional sight options for ghosts, makes AI eye visible to ghosts

This commit is contained in:
Markolie
2015-01-30 16:47:09 +01:00
parent 8b10abf46d
commit 5c18855967
6 changed files with 41 additions and 22 deletions
+25 -9
View File
@@ -23,10 +23,11 @@
universal_speak = 1
var/atom/movable/following = null
var/medHUD = 0
var/secHUD = 0
/mob/dead/observer/New(var/mob/body=null, var/flags=1)
sight |= SEE_TURFS | SEE_MOBS | SEE_OBJS | SEE_SELF
see_invisible = SEE_INVISIBLE_OBSERVER
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
see_in_dark = 100
verbs += /mob/dead/observer/proc/dead_tele
@@ -103,6 +104,8 @@ Works together with spawning an observer, noted above.
assess_targets(target_list, src)
if(medHUD)
process_medHUD(src)
if(secHUD)
process_secHUD(src)
/mob/dead/proc/process_medHUD(var/mob/M)
@@ -110,6 +113,13 @@ Works together with spawning an observer, noted above.
for(var/mob/living/carbon/human/patient in oview(M, 14))
C.images += patient.hud_list[HEALTH_HUD]
C.images += patient.hud_list[STATUS_HUD_OOC]
/mob/dead/proc/process_secHUD(var/mob/M)
var/client/C = M.client
for(var/mob/living/carbon/human/target in oview(M, 14))
C.images += target.hud_list[IMPTRACK_HUD]
C.images += target.hud_list[IMPLOYAL_HUD]
C.images += target.hud_list[IMPCHEM_HUD]
/mob/dead/proc/assess_targets(list/target_list, mob/dead/observer/U)
var/client/C = U.client
@@ -257,8 +267,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
/mob/dead/observer/verb/toggle_medHUD()
set category = "Ghost"
set name = "Toggle MedicHUD"
set desc = "Toggles Medical HUD allowing you to see how everyone is doing"
set name = "Toggle HUD"
set desc = "Toggles the security and medical HUD."
if(!client)
return
if(medHUD)
@@ -450,14 +460,20 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
src << "\blue Heat Capacity: [round(environment.heat_capacity(),0.1)]"
/mob/dead/observer/verb/toggle_darkness()
set name = "Toggle Darkness"
/mob/dead/observer/verb/toggle_sight()
set name = "Toggle Sight"
set category = "Ghost"
if (see_invisible == SEE_INVISIBLE_OBSERVER_NOLIGHTING)
see_invisible = SEE_INVISIBLE_OBSERVER
else
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
switch(see_invisible)
if(SEE_INVISIBLE_OBSERVER_AI_EYE)
see_invisible = SEE_INVISIBLE_OBSERVER_NOOBSERVERS
usr << "<span class='notice'>You no longer see other observers or the AI eye.</span>"
if(SEE_INVISIBLE_OBSERVER_NOOBSERVERS)
see_invisible = SEE_INVISIBLE_OBSERVER_NOLIGHTING
usr << "<span class='notice'>You no longer see darkness.</span>"
else
see_invisible = SEE_INVISIBLE_OBSERVER_AI_EYE
usr << "<span class='notice'>You again see everything.</span>"
/mob/dead/observer/verb/view_manfiest()
set name = "View Crew Manifest"
@@ -1,17 +1,19 @@
// AI EYE
//
// An invisible (no icon) mob that the AI controls to look around the station with.
// A mob that the AI controls to look around the station with.
// It streams chunks as it moves around, which will show it what the AI can and cannot see.
/mob/aiEye
name = "Inactive AI Eye"
icon = 'icons/obj/status_display.dmi' // For AI friend secret shh :o
icon = 'icons/mob/AI.dmi'
icon_state = "eye"
alpha = 127
var/mob/living/silicon/ai/ai = null
density = 0
status_flags = GODMODE // You can't damage it.
mouse_opacity = 0
see_in_dark = 7
invisibility = INVISIBILITY_MAXIMUM
invisibility = INVISIBILITY_AI_EYE
/mob/aiEye/New()
..()