Merge pull request #1334 from TheKodeToad/litemod-dl
LiteMod downloading
This commit is contained in:
		 TheKodeToad
					TheKodeToad
				
			
				
					committed by
					
						 Sefa Eyeoglu
						Sefa Eyeoglu
					
				
			
			
				
	
			
			
			 Sefa Eyeoglu
						Sefa Eyeoglu
					
				
			
						parent
						
							6f1d594f1c
						
					
				
				
					commit
					fe1ea7240e
				
			| @@ -21,6 +21,8 @@ class FlameAPI : public NetworkResourceAPI { | ||||
|  | ||||
|     [[nodiscard]] auto getSortingMethods() const -> QList<ResourceAPI::SortingMethod> override; | ||||
|  | ||||
|     static inline auto validateModLoaders(ModLoaderTypes loaders) -> bool { return loaders & (Forge | Fabric | Quilt); } | ||||
|  | ||||
|    private: | ||||
|     static int getClassId(ModPlatform::ResourceType type) | ||||
|     { | ||||
|   | ||||
| @@ -38,7 +38,7 @@ class ModrinthAPI : public NetworkResourceAPI { | ||||
|     static auto getModLoaderStrings(const ModLoaderTypes types) -> const QStringList | ||||
|     { | ||||
|         QStringList l; | ||||
|         for (auto loader : {Forge, Fabric, Quilt}) { | ||||
|         for (auto loader : { Forge, Fabric, Quilt, LiteLoader }) { | ||||
|             if (types & loader) { | ||||
|                 l << getModLoaderString(loader); | ||||
|             } | ||||
| @@ -93,7 +93,7 @@ class ModrinthAPI : public NetworkResourceAPI { | ||||
|     { | ||||
|         if (args.loaders.has_value()) { | ||||
|             if (!validateModLoaders(args.loaders.value())) { | ||||
|                 qWarning() << "Modrinth only have Forge and Fabric-compatible mods!"; | ||||
|                 qWarning() << "Modrinth - or our interface - does not support any the provided mod loaders!"; | ||||
|                 return {}; | ||||
|             } | ||||
|         } | ||||
| @@ -142,9 +142,6 @@ class ModrinthAPI : public NetworkResourceAPI { | ||||
|         return s.isEmpty() ? QString() : s; | ||||
|     } | ||||
|  | ||||
|     inline auto validateModLoaders(ModLoaderTypes loaders) const -> bool | ||||
|     { | ||||
|         return loaders & (Forge | Fabric | Quilt); | ||||
|     } | ||||
|     static inline auto validateModLoaders(ModLoaderTypes loaders) -> bool { return loaders & (Forge | Fabric | Quilt | LiteLoader); } | ||||
|  | ||||
| }; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user