Expanded ghost following.

Ghosts can now follow the Eye of a speaking mob, if it has one, or the body of someone who has died.
Partial port of https://github.com/ParadiseSS13/Paradise/pull/1151.
This commit is contained in:
PsiOmega
2015-06-09 16:36:43 +02:00
parent 73146a62fe
commit 6f70049a12
3 changed files with 16 additions and 3 deletions
@@ -681,3 +681,16 @@ mob/dead/observer/MayRespawn(var/feedback = 0)
src << "<span class='warning'>antagHUD restrictions prevent you from respawning.</span>"
return 0
return 1
/proc/ghost_follow_link(var/atom/target, var/atom/ghost)
if((!target) || (!ghost)) return
. = "<a href='byond://?src=\ref[ghost];track=\ref[target]'>follow</a>"
if(istype(target, /mob/dead/observer))
var/mob/dead/observer/O = target
if(O.mind && O.mind.current)
. += "|<a href='byond://?src=\ref[ghost];track=\ref[O.mind.current]'>body</a>"
else if(istype(target, /mob)) // Eye follow links
var/mob/M = target
if(M.client && M.eyeobj) // No point following clientless eyes
. += "|<a href='byond://?src=\ref[ghost];track=\ref[M.eyeobj]'>eye</a>"