aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDLL/squirrel/squirrel.cpp
diff options
context:
space:
mode:
authorEmma Miler <emma.pi@protonmail.com>2022-12-22 19:59:10 +0100
committerGitHub <noreply@github.com>2022-12-22 19:59:10 +0100
commit64100065b55f79e76542ba689545c60e6fb0dcef (patch)
tree396bfeb9eacdd6d8070dee89de16c6c216ac6b10 /NorthstarDLL/squirrel/squirrel.cpp
parent7cdf27e6dfcf61329317e641e6625599cda3f5b0 (diff)
downloadNorthstarLauncher-64100065b55f79e76542ba689545c60e6fb0dcef.tar.gz
NorthstarLauncher-64100065b55f79e76542ba689545c60e6fb0dcef.zip
Add script concommands (#373)
* Add script concommands * Fix indent * Formatting * Formatting stuff * Changes for review * Fix typo * Forgot to remove the return statement * Formatting
Diffstat (limited to 'NorthstarDLL/squirrel/squirrel.cpp')
-rw-r--r--NorthstarDLL/squirrel/squirrel.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/NorthstarDLL/squirrel/squirrel.cpp b/NorthstarDLL/squirrel/squirrel.cpp
index 5e968daa..8761fb13 100644
--- a/NorthstarDLL/squirrel/squirrel.cpp
+++ b/NorthstarDLL/squirrel/squirrel.cpp
@@ -88,6 +88,18 @@ eSQReturnType SQReturnTypeFromString(const char* pReturnType)
return eSQReturnType::Default; // previous default value
}
+ScriptContext ScriptContextFromString(std::string string)
+{
+ if (string == "UI")
+ return ScriptContext::UI;
+ if (string == "CLIENT")
+ return ScriptContext::CLIENT;
+ if (string == "SERVER")
+ return ScriptContext::SERVER;
+ else
+ return ScriptContext::INVALID;
+}
+
const char* SQTypeNameFromID(int type)
{
switch (type)