mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-22 19:47:22 +01:00
Adds ghost_follow_link and AI eye following
This commit is contained in:
@@ -499,6 +499,17 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
return ..()
|
||||
|
||||
/proc/ghost_follow_link(var/atom/target, var/atom/ghost=src)
|
||||
if(!target) return
|
||||
if(isAI(target)) // AI core/eye follow links
|
||||
var/mob/living/silicon/ai/A = target
|
||||
. = "<a href='byond://?src=\ref[ghost];follow=\ref[A]'>core</a>"
|
||||
if(A.client && A.eyeobj) // No point following clientless AI eyes
|
||||
. += "|<a href='byond://?src=\ref[ghost];follow=\ref[A.eyeobj]'>eye</a>"
|
||||
return
|
||||
else
|
||||
return "<a href='byond://?src=\ref[ghost];follow=\ref[target]'>follow</a>"
|
||||
|
||||
//BEGIN TELEPORT HREF CODE
|
||||
/mob/dead/observer/Topic(href, href_list)
|
||||
if(usr != src)
|
||||
@@ -512,26 +523,8 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
|
||||
if (href_list["follow"])
|
||||
var/atom/target = locate(href_list["follow"])
|
||||
var/mob/A = usr;
|
||||
A << "You are now following [target]"
|
||||
//var/mob/living/silicon/ai/A = locate(href_list["track2"]) in mob_list
|
||||
if(target && target != usr)
|
||||
following = target
|
||||
spawn(0)
|
||||
var/turf/pos = get_turf(A)
|
||||
while(A.loc == pos)
|
||||
|
||||
var/turf/T = get_turf(target)
|
||||
if(!T)
|
||||
break
|
||||
if(following != target)
|
||||
break
|
||||
if(!client)
|
||||
break
|
||||
A.loc = T
|
||||
pos = A.loc
|
||||
sleep(15)
|
||||
following = null
|
||||
if(target)
|
||||
ManualFollow(target)
|
||||
|
||||
if (href_list["jump"])
|
||||
var/mob/target = locate(href_list["jump"])
|
||||
|
||||
Reference in New Issue
Block a user