2021-03-26 22:15:20 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QList>
|
|
|
|
#include <QMetaType>
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
|
|
|
|
|
|
|
namespace Flame {
|
|
|
|
|
|
|
|
struct ModpackAuthor {
|
|
|
|
QString name;
|
|
|
|
QString url;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedVersion {
|
|
|
|
int addonId;
|
|
|
|
int fileId;
|
|
|
|
QString version;
|
|
|
|
QString mcVersion;
|
|
|
|
QString downloadUrl;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct IndexedPack
|
|
|
|
{
|
|
|
|
int addonId;
|
|
|
|
QString name;
|
|
|
|
QString description;
|
|
|
|
QList<ModpackAuthor> authors;
|
|
|
|
QString logoName;
|
|
|
|
QString logoUrl;
|
|
|
|
QString websiteUrl;
|
|
|
|
|
|
|
|
bool versionsLoaded = false;
|
|
|
|
QVector<IndexedVersion> versions;
|
|
|
|
};
|
|
|
|
|
2021-07-25 17:11:59 +00:00
|
|
|
void loadIndexedPack(IndexedPack & m, QJsonObject & obj);
|
|
|
|
void loadIndexedPackVersions(IndexedPack & m, QJsonArray & arr);
|
2021-03-26 22:15:20 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
Q_DECLARE_METATYPE(Flame::IndexedPack)
|