2017-04-20 08:52:04 +05:30
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <QString>
|
|
|
|
#include <QVector>
|
2018-01-21 08:19:54 +05:30
|
|
|
#include <QUrl>
|
2017-04-20 08:52:04 +05:30
|
|
|
|
2017-04-22 22:21:04 +05:30
|
|
|
namespace Flame
|
2017-04-20 08:52:04 +05:30
|
|
|
{
|
|
|
|
struct File
|
|
|
|
{
|
|
|
|
int projectId = 0;
|
|
|
|
int fileId = 0;
|
2017-09-08 12:32:27 +05:30
|
|
|
// NOTE: the opposite to 'optional'. This is at the time of writing unused.
|
2017-04-20 08:52:04 +05:30
|
|
|
bool required = true;
|
|
|
|
|
|
|
|
// our
|
|
|
|
bool resolved = false;
|
|
|
|
QString fileName;
|
2018-01-21 08:19:54 +05:30
|
|
|
QUrl url;
|
2017-09-08 12:32:27 +05:30
|
|
|
QString targetFolder = QLatin1Literal("mods");
|
|
|
|
enum class Type
|
|
|
|
{
|
|
|
|
Unknown,
|
|
|
|
Folder,
|
|
|
|
Ctoc,
|
|
|
|
SingleFile,
|
|
|
|
Cmod2,
|
|
|
|
Modpack,
|
|
|
|
Mod
|
|
|
|
} type = Type::Mod;
|
2017-04-20 08:52:04 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
struct Modloader
|
|
|
|
{
|
|
|
|
QString id;
|
|
|
|
bool primary = false;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Minecraft
|
|
|
|
{
|
|
|
|
QString version;
|
2017-04-22 03:59:24 +05:30
|
|
|
QString libraries;
|
2017-04-22 22:21:04 +05:30
|
|
|
QVector<Flame::Modloader> modLoaders;
|
2017-04-20 08:52:04 +05:30
|
|
|
};
|
|
|
|
|
|
|
|
struct Manifest
|
|
|
|
{
|
|
|
|
QString manifestType;
|
|
|
|
int manifestVersion = 0;
|
2017-04-22 22:21:04 +05:30
|
|
|
Flame::Minecraft minecraft;
|
2017-04-20 08:52:04 +05:30
|
|
|
QString name;
|
|
|
|
QString version;
|
|
|
|
QString author;
|
2017-04-22 22:21:04 +05:30
|
|
|
QVector<Flame::File> files;
|
2017-04-20 08:52:04 +05:30
|
|
|
QString overrides;
|
|
|
|
};
|
|
|
|
|
2017-04-22 22:21:04 +05:30
|
|
|
void loadManifest(Flame::Manifest & m, const QString &filepath);
|
2017-04-20 08:52:04 +05:30
|
|
|
}
|