refactor: allow tracking multiple mod loaders
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ public:
|
||||
// todo(merged): is this the best approach
|
||||
void appendComponent(ComponentPtr component);
|
||||
|
||||
ModAPI::ModLoaderType getModLoader();
|
||||
ModAPI::ModLoaderTypes getModLoaders();
|
||||
|
||||
private:
|
||||
void scheduleSave();
|
||||
|
Reference in New Issue
Block a user