aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptmodmenu.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-01 17:16:42 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-10-01 17:16:42 +0100
commit51df18abbc0c344b56f88e0a66b6b46d6aca375c (patch)
tree1ce680cb9134273870373134f845633e2c390bde /NorthstarDedicatedTest/scriptmodmenu.cpp
parent1ff8e068e62d095775ef2ae54d3685d89238f28c (diff)
downloadNorthstarLauncher-51df18abbc0c344b56f88e0a66b6b46d6aca375c.tar.gz
NorthstarLauncher-51df18abbc0c344b56f88e0a66b6b46d6aca375c.zip
Revert "small modmanager refactors"
This reverts commit 1ff8e068e62d095775ef2ae54d3685d89238f28c.
Diffstat (limited to 'NorthstarDedicatedTest/scriptmodmenu.cpp')
-rw-r--r--NorthstarDedicatedTest/scriptmodmenu.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/NorthstarDedicatedTest/scriptmodmenu.cpp b/NorthstarDedicatedTest/scriptmodmenu.cpp
index d154aff8..ca7d047d 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_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 1;
}
}
@@ -42,11 +42,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 1;
}
}
@@ -60,11 +60,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 1;
}
}
@@ -78,11 +78,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 1;
}
}
@@ -97,13 +97,13 @@ 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_pushstring(sqvm, cvar->Name.c_str(), -1);
ClientSq_arrayappend(sqvm, -2);
}