add block.properties, item.properties (experimental)

This commit is contained in:
MihailRis
2024-11-22 11:08:36 +03:00
parent b40c8c4b4c
commit cd630463b3
4 changed files with 31 additions and 0 deletions
+2
View File
@@ -191,6 +191,7 @@ void ContentLoader::loadBlock(
Block& def, const std::string& name, const fs::path& file
) {
auto root = files::read_json(file);
def.properties = root;
if (root.has("parent")) {
const auto& parentName = root["parent"].asString();
@@ -360,6 +361,7 @@ void ContentLoader::loadItem(
ItemDef& def, const std::string& name, const fs::path& file
) {
auto root = files::read_json(file);
def.properties = root;
if (root.has("parent")) {
const auto& parentName = root["parent"].asString();