diff options
Diffstat (limited to 'NorthstarDedicatedTest/scriptmodmenu.cpp')
-rw-r--r-- | NorthstarDedicatedTest/scriptmodmenu.cpp | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/NorthstarDedicatedTest/scriptmodmenu.cpp b/NorthstarDedicatedTest/scriptmodmenu.cpp index 88a5c773..54e7d0e1 100644 --- a/NorthstarDedicatedTest/scriptmodmenu.cpp +++ b/NorthstarDedicatedTest/scriptmodmenu.cpp @@ -9,9 +9,9 @@ SQInteger SQ_GetModNames(void* sqvm) { ClientSq_newarray(sqvm, 0); - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - ClientSq_pushstring(sqvm, mod->Name.c_str(), -1); + ClientSq_pushstring(sqvm, mod.Name.c_str(), -1); ClientSq_arrayappend(sqvm, -2); } @@ -24,11 +24,11 @@ SQInteger SQ_IsModEnabled(void* sqvm) const SQChar* modName = ClientSq_getstring(sqvm, 1); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - ClientSq_pushbool(sqvm, mod->Enabled); + ClientSq_pushbool(sqvm, mod.Enabled); return SQRESULT_NOTNULL; } } @@ -43,11 +43,11 @@ SQInteger SQ_SetModEnabled(void* sqvm) const SQBool enabled = ClientSq_getbool(sqvm, 2); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - mod->Enabled = enabled; + mod.Enabled = enabled; return SQRESULT_NULL; } } @@ -61,11 +61,11 @@ SQInteger SQ_GetModDescription(void* sqvm) const SQChar* modName = ClientSq_getstring(sqvm, 1); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - ClientSq_pushstring(sqvm, mod->Description.c_str(), -1); + ClientSq_pushstring(sqvm, mod.Description.c_str(), -1); return SQRESULT_NOTNULL; } } @@ -79,11 +79,11 @@ SQInteger SQ_GetModVersion(void* sqvm) const SQChar* modName = ClientSq_getstring(sqvm, 1); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - ClientSq_pushstring(sqvm, mod->Version.c_str(), -1); + ClientSq_pushstring(sqvm, mod.Version.c_str(), -1); return SQRESULT_NOTNULL; } } @@ -97,11 +97,11 @@ SQInteger SQ_GetModDownloadLink(void* sqvm) const SQChar* modName = ClientSq_getstring(sqvm, 1); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - ClientSq_pushstring(sqvm, mod->DownloadLink.c_str(), -1); + ClientSq_pushstring(sqvm, mod.DownloadLink.c_str(), -1); return SQRESULT_NOTNULL; } } @@ -115,11 +115,11 @@ SQInteger SQ_GetModLoadPriority(void* sqvm) const SQChar* modName = ClientSq_getstring(sqvm, 1); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - ClientSq_pushinteger(sqvm, mod->LoadPriority); + ClientSq_pushinteger(sqvm, mod.LoadPriority); return SQRESULT_NOTNULL; } } @@ -133,11 +133,11 @@ SQInteger SQ_IsModRequiredOnClient(void* sqvm) const SQChar* modName = ClientSq_getstring(sqvm, 1); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - ClientSq_pushbool(sqvm, mod->RequiredOnClient); + ClientSq_pushbool(sqvm, mod.RequiredOnClient); return SQRESULT_NOTNULL; } } @@ -152,11 +152,11 @@ SQInteger SQ_GetModConvars(void* sqvm) ClientSq_newarray(sqvm, 0); // manual lookup, not super performant but eh not a big deal - for (Mod* mod : g_ModManager->m_loadedMods) + for (Mod mod : g_ModManager->m_loadedMods) { - if (!mod->Name.compare(modName)) + if (!mod.Name.compare(modName)) { - for (ModConVar* cvar : mod->ConVars) + for (ModConVar* cvar : mod.ConVars) { ClientSq_pushstring(sqvm, cvar->Name.c_str(), -1); ClientSq_arrayappend(sqvm, -2); |