From 52e1c41e8bd9903fa28fccfedf739a88f553cd09 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Wed, 24 Jun 2020 08:24:46 -0700 Subject: [PATCH 1/4] Update say.dm --- code/game/say.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/game/say.dm b/code/game/say.dm index 35a1b1d072..b66c063761 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -110,6 +110,8 @@ GLOBAL_LIST_INIT(freqtospan, list( /// Quirky citadel proc for our custom sayverbs to strip the verb out. Snowflakey as hell, say rewrite 3.0 when? /atom/movable/proc/quoteless_say_quote(input, list/spans = list(speech_span), message_mode) + if(input[1] == "!") + return "" var/pos = findtext(input, "*") return pos? copytext(input, pos + 1) : input From cfc4a4d6319f149d6d6a491194bf61b60a4ff184 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Wed, 24 Jun 2020 08:27:59 -0700 Subject: [PATCH 2/4] Update say.dm --- code/modules/mob/say.dm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index a403845ee2..a2cae0691f 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -50,6 +50,8 @@ usr.emote("me",1,message,TRUE) /mob/say_mod(input, message_mode) + if(input[1] == "!") + return "" var/customsayverb = findtext(input, "*") if(customsayverb && message_mode != MODE_WHISPER_CRIT) message_mode = MODE_CUSTOM_SAY From 72804963a02f2c168b900e7a57590f0c13c07bea Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Wed, 24 Jun 2020 08:30:16 -0700 Subject: [PATCH 3/4] Update say.dm --- code/game/say.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/game/say.dm b/code/game/say.dm index b66c063761..6b923d4e83 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -146,9 +146,12 @@ GLOBAL_LIST_INIT(freqtospan, list( return "[copytext_char("[freq]", 1, 4)].[copytext_char("[freq]", 4, 5)]" /atom/movable/proc/attach_spans(input, list/spans) - var/customsayverb = findtext(input, "*") - if(customsayverb) - input = capitalize(copytext(input, customsayverb + length(input[customsayverb]))) + if(input[1] == "!") + input = copytext(input, 1, length(input) + 1) + else + var/customsayverb = findtext(input, "*") + if(customsayverb) + input = capitalize(copytext(input, customsayverb + length(input[customsayverb]))) if(input) return "[message_spans_start(spans)][input]" else From 26d384e65ba3ff29ea71c5e16ffc9bb31e4c5320 Mon Sep 17 00:00:00 2001 From: silicons <2003111+silicons@users.noreply.github.com> Date: Thu, 9 Jul 2020 03:17:17 -0700 Subject: [PATCH 4/4] fix --- code/game/say.dm | 13 ++++++------- code/modules/mob/say.dm | 12 +++++++----- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/code/game/say.dm b/code/game/say.dm index 6b923d4e83..a5691ad11f 100644 --- a/code/game/say.dm +++ b/code/game/say.dm @@ -110,7 +110,7 @@ GLOBAL_LIST_INIT(freqtospan, list( /// Quirky citadel proc for our custom sayverbs to strip the verb out. Snowflakey as hell, say rewrite 3.0 when? /atom/movable/proc/quoteless_say_quote(input, list/spans = list(speech_span), message_mode) - if(input[1] == "!") + if((input[1] == "!") && (length_char(input) > 1)) return "" var/pos = findtext(input, "*") return pos? copytext(input, pos + 1) : input @@ -146,12 +146,11 @@ GLOBAL_LIST_INIT(freqtospan, list( return "[copytext_char("[freq]", 1, 4)].[copytext_char("[freq]", 4, 5)]" /atom/movable/proc/attach_spans(input, list/spans) - if(input[1] == "!") - input = copytext(input, 1, length(input) + 1) - else - var/customsayverb = findtext(input, "*") - if(customsayverb) - input = capitalize(copytext(input, customsayverb + length(input[customsayverb]))) + if((input[1] == "!") && (length(input) > 2)) + return + var/customsayverb = findtext(input, "*") + if(customsayverb) + input = capitalize(copytext(input, customsayverb + length(input[customsayverb]))) if(input) return "[message_spans_start(spans)][input]" else diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index a2cae0691f..b7ea70732b 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -50,14 +50,16 @@ usr.emote("me",1,message,TRUE) /mob/say_mod(input, message_mode) - if(input[1] == "!") - return "" + if(message_mode == MODE_WHISPER_CRIT) + return ..() + if((input[1] == "!") && (length_char(input) > 1)) + message_mode = MODE_CUSTOM_SAY + return copytext_char(input, 2) var/customsayverb = findtext(input, "*") - if(customsayverb && message_mode != MODE_WHISPER_CRIT) + if(customsayverb) message_mode = MODE_CUSTOM_SAY return lowertext(copytext_char(input, 1, customsayverb)) - else - return ..() + return ..() /mob/proc/whisper_keybind() var/message = input(src, "", "whisper") as text|null