Files
BiLauncher/gamedirimport.h
T

29 lines
715 B
C++
Raw Normal View History

#pragma once
#include <QJsonObject>
#include <QString>
#include <optional>
namespace GameDirImport {
struct LoaderInfo
{
QString key; // "" | forge | fabric | neoforge | quilt
QString version; // в том же виде, что и в каталоге ModLoaderVersionService
};
struct Detected
{
QString minecraftVersion; // inheritsFrom профиля, а без него — сам id
QString resolvedVersionId; // id профиля, если он наследует другую версию
QString loader;
QString loaderVersion;
QString source;
};
LoaderInfo loaderOf(const QJsonObject &versionJson);
std::optional<Detected> detect(const QString &gameDir);
}