Merge 49d18f0b81
into 9a64c1885c
This commit is contained in:
commit
d7ebcec7f1
|
@ -49,6 +49,23 @@ ADD_SQFUNC("void", NSSetModEnabled, "string modName, bool enabled", "", ScriptCo
|
|||
return SQRESULT_NULL;
|
||||
}
|
||||
|
||||
ADD_SQFUNC("bool", NSIsModRemote, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI)
|
||||
{
|
||||
const SQChar* modName = g_pSquirrel<context>->getstring(sqvm, 1);
|
||||
|
||||
// manual lookup, not super performant but eh not a big deal
|
||||
for (Mod& mod : g_pModManager->m_LoadedMods)
|
||||
{
|
||||
if (!mod.Name.compare(modName))
|
||||
{
|
||||
g_pSquirrel<context>->pushbool(sqvm, mod.m_bIsRemote);
|
||||
return SQRESULT_NOTNULL;
|
||||
}
|
||||
}
|
||||
|
||||
return SQRESULT_NULL;
|
||||
}
|
||||
|
||||
ADD_SQFUNC("string", NSGetModDescriptionByModName, "string modName", "", ScriptContext::SERVER | ScriptContext::CLIENT | ScriptContext::UI)
|
||||
{
|
||||
const SQChar* modName = g_pSquirrel<context>->getstring(sqvm, 1);
|
||||
|
|
Loading…
Reference in New Issue