| 1019 | } |
| 1020 | |
| 1021 | std::optional<ModPlatform::ModLoaderTypes> PackProfile::getModLoaders() |
| 1022 | { |
| 1023 | ModPlatform::ModLoaderTypes result; |
| 1024 | bool has_any_loader = false; |
| 1025 | |
| 1026 | QMapIterator<QString, ModloaderMapEntry> i(Component::KNOWN_MODLOADERS); |
| 1027 | |
| 1028 | while (i.hasNext()) { |
| 1029 | i.next(); |
| 1030 | if (auto c = getComponent(i.key()); c != nullptr && c->isEnabled()) { |
| 1031 | result |= i.value().type; |
| 1032 | has_any_loader = true; |
| 1033 | } |
| 1034 | } |
| 1035 | |
| 1036 | if (!has_any_loader) |
| 1037 | return {}; |
| 1038 | return result; |
| 1039 | } |
| 1040 | |
| 1041 | std::optional<ModPlatform::ModLoaderTypes> PackProfile::getSupportedModLoaders() |
| 1042 | { |
no test coverage detected