mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2026-08-24 05:38:15 +01:00
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:
@@ -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>"
|
||||
|
||||
Reference in New Issue
Block a user