Items intruduced (WIP)

This commit is contained in:
MihailRis
2024-01-08 01:11:22 +03:00
parent 4f6ba8cca6
commit 4a57e71e81
12 changed files with 269 additions and 58 deletions
+12
View File
@@ -5,16 +5,28 @@
#include <filesystem>
class Block;
class ItemDef;
class ContentPack;
class ContentBuilder;
namespace json {
class JObject;
}
class ContentLoader {
const ContentPack* pack;
Block* loadBlock(std::string name);
ItemDef* loadItem(std::string name);
public:
ContentLoader(ContentPack* pack);
bool fixPackIndices(std::filesystem::path folder,
json::JObject* indicesRoot,
std::string contentSection);
void fixPackIndices();
Block* loadBlock(std::string name, std::filesystem::path file);
ItemDef* loadItem(std::string name, std::filesystem::path file);
void load(ContentBuilder* builder);
};