2021-03-26 22:15:20 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaType>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
2023-04-14 21:02:33 +01:00
|
|
|
#include "modplatform/ModIndex.h"
|
2021-03-26 22:15:20 +00:00
|
|
|
|
|
|
|
namespace Flame {
|
|
|
|
|
|
|
|
struct ModpackAuthor {
|
|
|
|
QString name;
|
|
|
|
QString url;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedVersion {
|
|
|
|
int addonId;
|
|
|
|
int fileId;
|
|
|
|
QString version;
|
2023-05-27 00:23:43 +01:00
|
|
|
ModPlatform::IndexedVersionType version_type;
|
2021-03-26 22:15:20 +00:00
|
|
|
QString mcVersion;
|
|
|
|
QString downloadUrl;
|
|
|
|
};
|
|
|
|
|
2022-05-24 16:27:32 +01:00
|
|
|
struct ModpackExtra {
|
|
|
|
QString websiteUrl;
|
|
|
|
QString wikiUrl;
|
|
|
|
QString issuesUrl;
|
|
|
|
QString sourceUrl;
|
|
|
|
};
|
|
|
|
|
2023-04-14 21:02:33 +01:00
|
|
|
struct IndexedPack {
|
2021-03-26 22:15:20 +00:00
|
|
|
int addonId;
|
|
|
|
QString name;
|
|
|
|
QString description;
|
|
|
|
QList<ModpackAuthor> authors;
|
|
|
|
QString logoName;
|
|
|
|
QString logoUrl;
|
|
|
|
|
|
|
|
bool versionsLoaded = false;
|
|
|
|
QVector<IndexedVersion> versions;
|
2022-05-24 16:27:32 +01:00
|
|
|
|
|
|
|
bool extraInfoLoaded = false;
|
|
|
|
ModpackExtra extra;
|
2021-03-26 22:15:20 +00:00
|
|
|
};
|
|
|
|
|
2023-04-14 21:02:33 +01:00
|
|
|
void loadIndexedPack(IndexedPack& m, QJsonObject& obj);
|
2022-05-24 16:27:32 +01:00
|
|
|
void loadIndexedInfo(IndexedPack&, QJsonObject&);
|
2023-04-14 21:02:33 +01:00
|
|
|
void loadIndexedPackVersions(IndexedPack& m, QJsonArray& arr);
|
|
|
|
} // namespace Flame
|
2021-03-26 22:15:20 +00:00
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(Flame::IndexedPack)
|