mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-01-11 01:51:51 +00:00
Also mildly refactors hear_radio to kill those nasty istype(src)'s. This makes an [OPEN] link appear on all radio messages the AI hears (to the right of the follow link). When clicked, it allows the AI to open the door nearest to the speaker (or, if it is a voice changer, the door nearest to the poor sap who had his voice stolen)
48 lines
1.5 KiB
Plaintext
48 lines
1.5 KiB
Plaintext
/mob/dead/observer/say(var/message)
|
|
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
|
|
|
if(!message)
|
|
return
|
|
|
|
log_say("Ghost/[src.key] : [message]")
|
|
|
|
if(src.client)
|
|
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
|
to_chat(src, "\red You cannot talk in deadchat (muted).")
|
|
return
|
|
|
|
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
|
|
return
|
|
|
|
. = src.say_dead(message)
|
|
|
|
|
|
/mob/dead/observer/emote(var/act, var/type, var/message)
|
|
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
|
|
|
|
if(!message)
|
|
return
|
|
|
|
if(act != "me")
|
|
return
|
|
|
|
log_emote("Ghost/[src.key] : [message]")
|
|
|
|
if(src.client)
|
|
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
|
to_chat(src, "\red You cannot emote in deadchat (muted).")
|
|
return
|
|
|
|
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
|
|
return
|
|
|
|
. = src.emote_dead(message)
|
|
|
|
/mob/dead/observer/handle_track(var/message, var/verb = "says", var/datum/language/language, var/mob/speaker = null, var/speaker_name, var/atom/follow_target, var/hard_to_hear)
|
|
return "[speaker_name] ([ghost_follow_link(follow_target, ghost=src)])"
|
|
|
|
/mob/dead/observer/handle_speaker_name(var/mob/speaker = null, var/vname, var/hard_to_hear)
|
|
var/speaker_name = ..()
|
|
if(speaker && (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])"
|
|
return speaker_name |