diff --git a/code/__SPLURTCODE/DEFINES/autopunctuation.dm b/code/__SPLURTCODE/DEFINES/autopunctuation.dm new file mode 100644 index 000000000000..3b08f95d06b2 --- /dev/null +++ b/code/__SPLURTCODE/DEFINES/autopunctuation.dm @@ -0,0 +1,2 @@ +GLOBAL_DATUM_INIT(has_eol_punctuation, /regex, regex(@"^(\w|^[^\*].*[^.!?~\-\+\|\_\*]+)$")) +//Auto punctuation global datum diff --git a/code/modules/mob/say.dm b/code/modules/mob/say.dm index 98fd85dbe16c..6a6ca2e6ae1c 100644 --- a/code/modules/mob/say.dm +++ b/code/modules/mob/say.dm @@ -25,6 +25,11 @@ client?.last_activity = world.time +//SPLURT Edit Start: Adds auto punctuation + if(findtext(message, GLOB.has_eol_punctuation)) + message += "." +//SPLURT Edit End: Adds auto punctuation + say(message) /mob/verb/me_typing_indicator() diff --git a/tgstation.dme b/tgstation.dme index f44fd0b52733..758f871c346b 100644 --- a/tgstation.dme +++ b/tgstation.dme @@ -268,6 +268,7 @@ #include "code\__SPLURTCODE\DEFINES\access.dm" #include "code\__SPLURTCODE\DEFINES\admin.dm" #include "code\__SPLURTCODE\DEFINES\atmospherics.dm" +#include "code\__SPLURTCODE\DEFINES\autopunctuation.dm" #include "code\__SPLURTCODE\DEFINES\cit_defines.dm" #include "code\__SPLURTCODE\DEFINES\click.dm" #include "code\__SPLURTCODE\DEFINES\configuration.dm"