fix: check for Quilt as Fabric-compatible loader
This commit is contained in:
@ -15,7 +15,7 @@ class ModAPI {
|
||||
virtual ~ModAPI() = default;
|
||||
|
||||
// https://docs.curseforge.com/?http#tocS_ModLoaderType
|
||||
enum ModLoaderType { Any = 0, Forge = 1, Cauldron = 2, LiteLoader = 3, Fabric = 4 };
|
||||
enum ModLoaderType { Any = 0, Forge = 1, Cauldron = 2, LiteLoader = 3, Fabric = 4, Quilt = 5 };
|
||||
|
||||
struct SearchArgs {
|
||||
int offset;
|
||||
|
@ -69,6 +69,7 @@ void FlameMod::loadIndexedPackVersions(ModPlatform::IndexedPack& pack,
|
||||
for (auto m : modules) {
|
||||
auto fname = Json::requireString(m.toObject(), "foldername");
|
||||
// FIXME: This does not work properly when a mod supports more than one mod loader, since
|
||||
// FIXME: This also doesn't deal with Quilt mods at the moment
|
||||
// they bundle the meta files for all of them in the same arquive, even when that version
|
||||
// doesn't support the given mod loader.
|
||||
if (hasFabric) {
|
||||
|
@ -55,11 +55,13 @@ class ModrinthAPI : public NetworkModAPI {
|
||||
{
|
||||
switch (modLoader) {
|
||||
case Any:
|
||||
return "fabric, forge";
|
||||
return "fabric, forge, quilt";
|
||||
case Forge:
|
||||
return "forge";
|
||||
case Fabric:
|
||||
return "fabric";
|
||||
case Quilt:
|
||||
return "quilt";
|
||||
default:
|
||||
return "";
|
||||
}
|
||||
@ -67,7 +69,7 @@ class ModrinthAPI : public NetworkModAPI {
|
||||
|
||||
inline auto validateModLoader(ModLoaderType modLoader) const -> bool
|
||||
{
|
||||
return modLoader == Any || modLoader == Forge || modLoader == Fabric;
|
||||
return modLoader == Any || modLoader == Forge || modLoader == Fabric || modLoader == Quilt;
|
||||
}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user