aboutsummaryrefslogtreecommitdiff
path: root/NorthstarDedicatedTest/scriptmodmenu.cpp
diff options
context:
space:
mode:
authorBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-30 21:46:08 +0100
committerBobTheBob <32057864+BobTheBob9@users.noreply.github.com>2021-09-30 21:46:08 +0100
commit1ff8e068e62d095775ef2ae54d3685d89238f28c (patch)
tree5aedcc16f144c2225d7398dd1f19b4f11cd467c1 /NorthstarDedicatedTest/scriptmodmenu.cpp
parent8b93a09f5b12ce7967df5824794ed24b3ff31cdc (diff)
downloadNorthstarLauncher-1ff8e068e62d095775ef2ae54d3685d89238f28c.tar.gz
NorthstarLauncher-1ff8e068e62d095775ef2ae54d3685d89238f28c.zip
small modmanager refactors
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 ca7d047d..d154aff8 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);
}