aboutsummaryrefslogtreecommitdiff
path: root/launcher/minecraft/PackProfile.cpp
diff options
context:
space:
mode:
authorSefa Eyeoglu <contact@scrumplex.net>2022-05-19 08:40:28 +0200
committerSefa Eyeoglu <contact@scrumplex.net>2022-05-19 08:49:27 +0200
commit943090db98dbbe969afed8a4fb59f4bbb43449cc (patch)
tree3a93a9c6d8bd073dcbdbc4ce2866d4903bff2263 /launcher/minecraft/PackProfile.cpp
parent77caaca50dab7ba8e455d641ac6b448052bc6799 (diff)
downloadPrismLauncher-943090db98dbbe969afed8a4fb59f4bbb43449cc.tar.gz
PrismLauncher-943090db98dbbe969afed8a4fb59f4bbb43449cc.tar.bz2
PrismLauncher-943090db98dbbe969afed8a4fb59f4bbb43449cc.zip
refactor: allow tracking multiple mod loaders
Diffstat (limited to 'launcher/minecraft/PackProfile.cpp')
-rw-r--r--launcher/minecraft/PackProfile.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/launcher/minecraft/PackProfile.cpp b/launcher/minecraft/PackProfile.cpp
index 87d11c4c..125048f0 100644
--- a/launcher/minecraft/PackProfile.cpp
+++ b/launcher/minecraft/PackProfile.cpp
@@ -978,8 +978,10 @@ void PackProfile::disableInteraction(bool disable)
}
}
-ModAPI::ModLoaderType PackProfile::getModLoader()
+ModAPI::ModLoaderTypes PackProfile::getModLoaders()
{
+ ModAPI::ModLoaderTypes result = ModAPI::Unspecified;
+
QMapIterator<QString, ModAPI::ModLoaderType> i(modloaderMapping);
while (i.hasNext())
@@ -987,8 +989,8 @@ ModAPI::ModLoaderType PackProfile::getModLoader()
i.next();
Component* c = getComponent(i.key());
if (c != nullptr && c->isEnabled()) {
- return i.value();
+ result |= i.value();
}
}
- return ModAPI::Unspecified;
+ return result;
}