mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-13 03:33:21 +00:00
Borrows /tg/ html stripping code. Ghosts are the first to be given this boon, they now have to deliberately emote things like "Spooky man and it#36&;s friends type crap".
66 lines
2.1 KiB
Plaintext
66 lines
2.1 KiB
Plaintext
/mob/dead/observer/say(var/message)
|
|
message = strip_html_properly(message)
|
|
|
|
if (!message)
|
|
return
|
|
|
|
log_say("Ghost/[src.key] : [message]")
|
|
|
|
if (src.client)
|
|
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
|
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 = trim_strip_html_properly(message)
|
|
|
|
if(!message)
|
|
return
|
|
|
|
if(act != "me")
|
|
return
|
|
|
|
log_emote("Ghost/[src.key] : [message]")
|
|
|
|
if(src.client)
|
|
if(src.client.prefs.muted & MUTE_DEADCHAT)
|
|
src << "\red You cannot emote in deadchat (muted)."
|
|
return
|
|
|
|
if(src.client.handle_spam_prevention(message, MUTE_DEADCHAT))
|
|
return
|
|
|
|
. = src.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)
|
|
*/
|