mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +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"])
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
return
|
||||
if(speaker_name != speaker.real_name && speaker.real_name)
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
track = "(<a href='byond://?src=\ref[src];track=\ref[speaker]'>follow</a>) "
|
||||
track = "([ghost_follow_link(speaker)]) "
|
||||
if(client.prefs.toggles & CHAT_GHOSTEARS && speaker in view(src))
|
||||
message = "<b>[message]</b>"
|
||||
|
||||
@@ -170,7 +170,7 @@
|
||||
if(istype(src, /mob/dead/observer))
|
||||
if(speaker_name != speaker.real_name && !isAI(speaker)) //Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
track = "[speaker_name] (<a href='byond://?src=\ref[src];track=\ref[follow_target]'>follow</a>)"
|
||||
track = "[speaker_name] ([ghost_follow_link(follow_target)])"
|
||||
|
||||
var/formatted
|
||||
if(language)
|
||||
|
||||
@@ -104,7 +104,7 @@
|
||||
|
||||
for(var/mob/player in player_list)
|
||||
if(istype(player,/mob/dead) && follow)
|
||||
var/msg_dead = "<i><span class='game say'>[name], <span class='name'>[speaker_mask]</span> (<a href='byond://?src=\ref[player];follow2=\ref[player];follow=\ref[speaker]'>follow</a>) [format_message(message, get_spoken_verb(message))]</span></i>"
|
||||
var/msg_dead = "<i><span class='game say'>[name], <span class='name'>[speaker_mask]</span> ([ghost_follow_link(speaker, ghost=player)]) [format_message(message, get_spoken_verb(message))]</span></i>"
|
||||
player << msg_dead
|
||||
continue
|
||||
|
||||
@@ -446,7 +446,7 @@
|
||||
|
||||
for (var/mob/M in dead_mob_list)
|
||||
if(!istype(M,/mob/new_player) && !istype(M,/mob/living/carbon/brain))
|
||||
var/message_start_dead = "<i><span class='game say'>[name], <span class='name'>[speaker.name] (<a href='byond://?src=\ref[M];follow2=\ref[M];follow=\ref[speaker]'>follow</a>)</span>"
|
||||
var/message_start_dead = "<i><span class='game say'>[name], <span class='name'>[speaker.name] ([ghost_follow_link(speaker, ghost=M)])</span>"
|
||||
M.show_message("[message_start_dead] [message_body]", 2)
|
||||
|
||||
for (var/mob/living/S in living_mob_list)
|
||||
|
||||
@@ -473,7 +473,7 @@ var/list/intents = list("help","disarm","grab","harm")
|
||||
var/lname
|
||||
if(subject)
|
||||
if(subject != M)
|
||||
follow = "(<a href='byond://?src=\ref[M];track=\ref[subject]'>follow</a>) "
|
||||
follow = "([ghost_follow_link(subject, ghost=M)]) "
|
||||
if(M.stat != DEAD && M.client.holder)
|
||||
follow = "(<a href='?src=\ref[M.client.holder];adminplayerobservejump=\ref[subject]'>JMP</a>) "
|
||||
var/mob/dead/observer/DM
|
||||
|
||||
Reference in New Issue
Block a user