diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index bdf4e074dea..1f0714bdc81 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -161,6 +161,11 @@ proc/get_radio_key_from_channel(var/channel) var/message_mode = parse_message_mode(message, "headset") + var/static/list/correct_punctuation = list("!" = TRUE, "." = TRUE, "?" = TRUE, "-" = TRUE, "~" = TRUE, "*" = TRUE, "/" = TRUE) + var/ending = copytext(message, length(message), (length(message) + 1)) + if(ending && !correct_punctuation[ending]) + message += "." + message = process_chat_markup(message, list("~", "_")) switch(copytext(message,1,2)) @@ -176,10 +181,6 @@ proc/get_radio_key_from_channel(var/channel) message = trim_left(message) - var/ending = copytext(message, length(message), (length(message) + 1)) - if(ending != "!" && ending != "." && ending != "?" && ending != "-") - message += "." - //parse the language code and consume it if(!speaking) speaking = parse_language(message) diff --git a/html/changelogs/mattatlas-6578.yml b/html/changelogs/mattatlas-6578.yml new file mode 100644 index 00000000000..7dd15254194 --- /dev/null +++ b/html/changelogs/mattatlas-6578.yml @@ -0,0 +1,7 @@ +author: MattAtlas + +delete-after: True + +changes: + - bugfix: "Autopunctuation will no longer autopunctuate if markup (* or /) is present at the end of the sentence." + - bugfix: "Autopunctuation will no longer send a period if you input an empty chat box."