From 652f5662f63fe03d5c465ed40333b28f06b6e628 Mon Sep 17 00:00:00 2001 From: Erlite Date: Sun, 11 Dec 2022 20:12:06 +0100 Subject: Make most mod-setting related funcs global. (#364) Make most mod-setting related funcs global --- NorthstarDLL/scriptmodmenu.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/NorthstarDLL/scriptmodmenu.cpp b/NorthstarDLL/scriptmodmenu.cpp index df5dc101..1dd80261 100644 --- a/NorthstarDLL/scriptmodmenu.cpp +++ b/NorthstarDLL/scriptmodmenu.cpp @@ -2,7 +2,7 @@ #include "modmanager.h" #include "squirrel.h" -ADD_SQFUNC("array", NSGetModNames, "", "", ScriptContext::UI) +ADD_SQFUNC("array", NSGetModNames, "", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { g_pSquirrel->newarray(sqvm, 0); @@ -15,7 +15,7 @@ ADD_SQFUNC("array", NSGetModNames, "", "", ScriptContext::UI) return SQRESULT_NOTNULL; } -ADD_SQFUNC("bool", NSIsModEnabled, "string modName", "", ScriptContext::UI) +ADD_SQFUNC("bool", NSIsModEnabled, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); @@ -32,7 +32,7 @@ ADD_SQFUNC("bool", NSIsModEnabled, "string modName", "", ScriptContext::UI) return SQRESULT_NULL; } -ADD_SQFUNC("void", NSSetModEnabled, "string modName, bool enabled", "", ScriptContext::UI) +ADD_SQFUNC("void", NSSetModEnabled, "string modName, bool enabled", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); const SQBool enabled = g_pSquirrel->getbool(sqvm, 2); @@ -50,7 +50,7 @@ ADD_SQFUNC("void", NSSetModEnabled, "string modName, bool enabled", "", ScriptCo return SQRESULT_NULL; } -ADD_SQFUNC("string", NSGetModDescriptionByModName, "string modName", "", ScriptContext::UI) +ADD_SQFUNC("string", NSGetModDescriptionByModName, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); @@ -67,7 +67,7 @@ ADD_SQFUNC("string", NSGetModDescriptionByModName, "string modName", "", ScriptC return SQRESULT_NULL; } -ADD_SQFUNC("string", NSGetModVersionByModName, "string modName", "", ScriptContext::UI) +ADD_SQFUNC("string", NSGetModVersionByModName, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); @@ -84,7 +84,7 @@ ADD_SQFUNC("string", NSGetModVersionByModName, "string modName", "", ScriptConte return SQRESULT_NULL; } -ADD_SQFUNC("string", NSGetModDownloadLinkByModName, "string modName", "", ScriptContext::UI) +ADD_SQFUNC("string", NSGetModDownloadLinkByModName, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); @@ -101,7 +101,7 @@ ADD_SQFUNC("string", NSGetModDownloadLinkByModName, "string modName", "", Script return SQRESULT_NULL; } -ADD_SQFUNC("int", NSGetModLoadPriority, "string modName", "", ScriptContext::UI) +ADD_SQFUNC("int", NSGetModLoadPriority, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); @@ -118,7 +118,7 @@ ADD_SQFUNC("int", NSGetModLoadPriority, "string modName", "", ScriptContext::UI) return SQRESULT_NULL; } -ADD_SQFUNC("bool", NSIsModRequiredOnClient, "string modName", "", ScriptContext::UI) +ADD_SQFUNC("bool", NSIsModRequiredOnClient, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); @@ -135,7 +135,8 @@ ADD_SQFUNC("bool", NSIsModRequiredOnClient, "string modName", "", ScriptContext: return SQRESULT_NULL; } -ADD_SQFUNC("array", NSGetModConvarsByModName, "string modName", "", ScriptContext::UI) +ADD_SQFUNC( + "array", NSGetModConvarsByModName, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI) { const SQChar* modName = g_pSquirrel->getstring(sqvm, 1); g_pSquirrel->newarray(sqvm, 0); -- cgit v1.2.3