mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-26 13:39:16 +01:00
Saycode Overhaul -- Multilingualism
This commit is contained in:
@@ -1,63 +1,42 @@
|
||||
/mob/observer/dead/say(var/message)
|
||||
/mob/observer/dead/say(var/message, var/datum/language/speaking = null, var/whispering = 0)
|
||||
message = sanitize(message)
|
||||
|
||||
if (!message)
|
||||
return
|
||||
|
||||
log_ghostsay(message, src)
|
||||
|
||||
if (src.client)
|
||||
if(message)
|
||||
client.handle_spam_prevention(MUTE_DEADCHAT)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<font color='red'>You cannot talk in deadchat (muted).</font>")
|
||||
return
|
||||
|
||||
. = src.say_dead(message)
|
||||
|
||||
|
||||
/mob/observer/dead/emote(var/act, var/type, var/message)
|
||||
//message = sanitize(message) - already sanitized in verb/me_verb()
|
||||
|
||||
if(!message)
|
||||
return
|
||||
|
||||
if(act != "me")
|
||||
log_ghostsay(message, src)
|
||||
|
||||
if (client)
|
||||
if(message)
|
||||
client.handle_spam_prevention(MUTE_DEADCHAT)
|
||||
if(client.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<font color='red'>You cannot talk in deadchat (muted).</font>")
|
||||
return
|
||||
|
||||
. = say_dead(message)
|
||||
|
||||
|
||||
/mob/observer/dead/me_verb(message as text)
|
||||
if(!message)
|
||||
return
|
||||
|
||||
log_ghostemote(message, src)
|
||||
|
||||
if(src.client)
|
||||
if(client)
|
||||
if(message)
|
||||
client.handle_spam_prevention(MUTE_DEADCHAT)
|
||||
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
||||
if(client.prefs.muted & MUTE_DEADCHAT)
|
||||
to_chat(src, "<font color='red'>You cannot emote in deadchat (muted).</font>")
|
||||
return
|
||||
|
||||
. = src.emote_dead(message)
|
||||
. = emote_dead(message)
|
||||
|
||||
/*
|
||||
for (var/mob/M in hearers(null, null))
|
||||
if (!M.stat)
|
||||
if(M.job == "Chaplain")
|
||||
if (prob (49))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
if(prob(20))
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
|
||||
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
if(prob(30))
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
if (prob(50))
|
||||
return
|
||||
else if (prob (95))
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... but nothing is there...</i></span>", 2)
|
||||
if(prob(20))
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
else
|
||||
M.show_message("<span class='game'><i>You hear muffled speech... you can almost make out some words...</i></span>", 2)
|
||||
// M.show_message("<span class='game'><i>[stutter(message)]</i></span>", 2)
|
||||
playsound(src.loc, pick('sound/effects/ghost.ogg','sound/effects/ghost2.ogg'), 10, 1)
|
||||
*/
|
||||
/mob/observer/dead/handle_track(message, verb = "says", mob/speaker = null, speaker_name, hard_to_hear)
|
||||
return "[speaker_name] ([ghost_follow_link(speaker, src)])"
|
||||
|
||||
/mob/observer/dead/handle_speaker_name(mob/speaker = null, vname, hard_to_hear)
|
||||
var/speaker_name = ..()
|
||||
//Announce computer and various stuff that broadcasts doesn't use it's real name but AI's can't pretend to be other mobs.
|
||||
if(speaker && (speaker_name != speaker.real_name) && !isAI(speaker))
|
||||
speaker_name = "[speaker.real_name] ([speaker_name])"
|
||||
return speaker_name
|
||||
Reference in New Issue
Block a user