diff --git a/code/modules/scripting/Implementations/Telecomms.dm b/code/modules/scripting/Implementations/Telecomms.dm index c8473b3a056..7016db25076 100644 --- a/code/modules/scripting/Implementations/Telecomms.dm +++ b/code/modules/scripting/Implementations/Telecomms.dm @@ -160,6 +160,7 @@ interpreter.SetProc("reverse", /proc/n_reverse) interpreter.SetProc("tonum", /proc/n_str2num) interpreter.SetProc("replace", /proc/n_replace) + interpreter.SetProc("proper", /proc/n_proper) // Numbers interpreter.SetProc("tostring", /proc/n_num2str) diff --git a/code/modules/scripting/Implementations/_Logic.dm b/code/modules/scripting/Implementations/_Logic.dm index 7a1ac824096..43324eaedd5 100644 --- a/code/modules/scripting/Implementations/_Logic.dm +++ b/code/modules/scripting/Implementations/_Logic.dm @@ -170,6 +170,12 @@ if(istext(string)) return text2num(string) +/proc/n_proper(var/string) + if(!istext(string)) + return "" + + return text("[][]", uppertext(copytext(string, 1, 1)), lowercase(copytext(string, 2))) + // --- Number methods --- //Returns the highest value of the arguments