Merge pull request #14247 from farie82/dead-talk-fixes

Makes dead chat logged in the file when you're in a body. Makes say_dead handle all the logic. Whispering while dead won't do anything now
This commit is contained in:
AffectedArc07
2020-09-06 15:15:37 +01:00
committed by GitHub
3 changed files with 18 additions and 21 deletions
+2 -12
View File
@@ -1,20 +1,10 @@
/mob/dead/observer/say(var/message)
/mob/dead/observer/say(message)
message = sanitize(copytext(message, 1, MAX_MESSAGE_LEN))
if(!message)
return
log_ghostsay(message, src)
if(src.client)
if(src.client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "<span class='warning'>You cannot talk in deadchat (muted).</span>")
return
if(src.client.handle_spam_prevention(message,MUTE_DEADCHAT))
return
. = src.say_dead(message)
return say_dead(message)
/mob/dead/observer/emote(act, type, message, force)
-2
View File
@@ -351,8 +351,6 @@ proc/get_radio_key_from_channel(var/channel)
return
if(stat)
if(stat == DEAD)
return say_dead(message_pieces)
return
if(is_muzzled())
+16 -7
View File
@@ -44,18 +44,27 @@
usr.emote(message)
/mob/proc/say_dead(var/message)
if(!(client && client.holder))
if(!config.dsay_allowed)
to_chat(src, "<span class='danger'>Deadchat is globally muted.</span>")
/mob/proc/say_dead(message)
if(client)
if(!client.holder)
if(!config.dsay_allowed)
to_chat(src, "<span class='danger'>Deadchat is globally muted.</span>")
return
if(client.prefs.muted & MUTE_DEADCHAT)
to_chat(src, "<span class='warning'>You cannot talk in deadchat (muted).</span>")
return
if(client && !(client.prefs.toggles & CHAT_DEAD))
to_chat(usr, "<span class='danger'>You have deadchat muted.</span>")
return
if(!(client.prefs.toggles & CHAT_DEAD))
to_chat(src, "<span class='danger'>You have deadchat muted.</span>")
return
if(client.handle_spam_prevention(message, MUTE_DEADCHAT))
return
say_dead_direct("[pick("complains", "moans", "whines", "laments", "blubbers", "salts")], <span class='message'>\"[message]\"</span>", src)
create_log(DEADCHAT_LOG, message)
log_ghostsay(message, src)
/mob/proc/say_understands(var/mob/other, var/datum/language/speaking = null)
if(stat == DEAD)