2024-10-28 15:57:39 +01:00
|
|
|
// Luanti
|
|
|
|
// SPDX-License-Identifier: LGPL-2.1-or-later
|
|
|
|
// Copyright (C) 2018 rubenwardy <rw@rubenwardy.com>
|
2018-04-17 14:54:50 +01:00
|
|
|
|
|
|
|
#pragma once
|
2018-05-16 21:52:12 +01:00
|
|
|
#include "irrlichttypes.h"
|
2025-01-04 12:39:34 +01:00
|
|
|
#include <string>
|
2018-04-17 14:54:50 +01:00
|
|
|
|
2024-02-24 19:13:07 +00:00
|
|
|
enum class ContentType
|
|
|
|
{
|
|
|
|
UNKNOWN,
|
|
|
|
MOD,
|
|
|
|
MODPACK,
|
|
|
|
GAME,
|
|
|
|
TXP
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2018-04-17 14:54:50 +01:00
|
|
|
struct ContentSpec
|
|
|
|
{
|
|
|
|
std::string type;
|
|
|
|
std::string author;
|
2018-05-16 21:52:12 +01:00
|
|
|
u32 release = 0;
|
2022-05-21 16:23:30 +01:00
|
|
|
|
|
|
|
/// Technical name / Id
|
2018-04-17 14:54:50 +01:00
|
|
|
std::string name;
|
2022-05-21 16:23:30 +01:00
|
|
|
|
|
|
|
/// Human-readable title
|
|
|
|
std::string title;
|
|
|
|
|
|
|
|
/// Short description
|
2018-04-17 14:54:50 +01:00
|
|
|
std::string desc;
|
|
|
|
std::string path;
|
2024-02-24 19:13:07 +00:00
|
|
|
std::string textdomain;
|
2018-04-17 14:54:50 +01:00
|
|
|
};
|
|
|
|
|
2024-02-24 19:13:07 +00:00
|
|
|
|
|
|
|
ContentType getContentType(const std::string &path);
|
2018-04-17 14:54:50 +01:00
|
|
|
void parseContentInfo(ContentSpec &spec);
|