mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-22 04:24:20 +01:00
Merge pull request #13509 from SteelSlayer/guardian-communication-fix
Ghosts can now hear guardian communication again
This commit is contained in:
@@ -180,15 +180,19 @@
|
||||
input = stripped_input(src, "Please enter a message to tell your summoner.", "Guardian", "")
|
||||
else
|
||||
input = message
|
||||
if(!input) return
|
||||
if(!input)
|
||||
return
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(M == summoner)
|
||||
to_chat(M, "<span class='changeling'><i>[src]:</i> [input]</span>")
|
||||
log_say("(GUARDIAN to [key_name(M)]) [input]", src)
|
||||
else if(M in GLOB.dead_mob_list && M.client && M.stat == DEAD && !isnewplayer(M))
|
||||
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
|
||||
// Show the message to the host and to the guardian.
|
||||
to_chat(summoner, "<span class='changeling'><i>[src]:</i> [input]</span>")
|
||||
to_chat(src, "<span class='changeling'><i>[src]:</i> [input]</span>")
|
||||
log_say("(GUARDIAN to [key_name(summoner)]) [input]", src)
|
||||
create_log(SAY_LOG, "GUARDIAN to HOST: [input]", summoner)
|
||||
|
||||
// Show the message to any ghosts/dead players.
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
if(M && M.client && M.stat == DEAD && !isnewplayer(M))
|
||||
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
|
||||
|
||||
//override set to true if message should be passed through instead of going to host communication
|
||||
/mob/living/simple_animal/hostile/guardian/say(message, override = FALSE)
|
||||
@@ -206,18 +210,24 @@
|
||||
set category = "Guardian"
|
||||
set desc = "Communicate telepathically with your guardian."
|
||||
var/input = stripped_input(src, "Please enter a message to tell your guardian.", "Message", "")
|
||||
if(!input) return
|
||||
if(!input)
|
||||
return
|
||||
|
||||
for(var/mob/M in GLOB.mob_list)
|
||||
if(istype(M, /mob/living/simple_animal/hostile/guardian))
|
||||
var/mob/living/simple_animal/hostile/guardian/G = M
|
||||
if(G.summoner == src)
|
||||
to_chat(G, "<span class='changeling'><i>[src]:</i> [input]</span>")
|
||||
log_say("(GUARDIAN to [key_name(G)]) [input]", src)
|
||||
// Find the guardian in our host's contents.
|
||||
var/mob/living/simple_animal/hostile/guardian/G = locate() in contents
|
||||
if(!G)
|
||||
return
|
||||
|
||||
else if(M in GLOB.dead_mob_list && M.client && M.stat == DEAD && !isnewplayer(M))
|
||||
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
|
||||
// Show the message to our guardian and to host.
|
||||
to_chat(G, "<span class='changeling'><i>[src]:</i> [input]</span>")
|
||||
to_chat(src, "<span class='changeling'><i>[src]:</i> [input]</span>")
|
||||
log_say("(GUARDIAN to [key_name(G)]) [input]", src)
|
||||
create_log(SAY_LOG, "HOST to GUARDIAN: [input]", G)
|
||||
|
||||
// Show the message to any ghosts/dead players.
|
||||
for(var/mob/M in GLOB.dead_mob_list)
|
||||
if(M && M.client && M.stat == DEAD && !isnewplayer(M))
|
||||
to_chat(M, "<span class='changeling'><i>Guardian Communication from <b>[src]</b> ([ghost_follow_link(src, ghost=M)]): [input]</i>")
|
||||
|
||||
/mob/living/proc/guardian_recall()
|
||||
set name = "Recall Guardian"
|
||||
|
||||
Reference in New Issue
Block a user