mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-12 22:41:49 +00:00
add EnumMetadata
This commit is contained in:
parent
d888ddec4c
commit
7749675a61
20 changed files with 156 additions and 206 deletions
|
|
@ -1,3 +1,4 @@
|
|||
#define VC_ENABLE_REFLECTION
|
||||
#include "WorldFiles.hpp"
|
||||
|
||||
#include <cassert>
|
||||
|
|
@ -182,8 +183,9 @@ bool WorldFiles::readResourcesData(const Content& content) {
|
|||
}
|
||||
auto root = io::read_json(file);
|
||||
for (const auto& [key, arr] : root.asObject()) {
|
||||
if (auto resType = ResourceType_from(key)) {
|
||||
read_resources_data(content, arr, *resType);
|
||||
ResourceType type;
|
||||
if (ResourceTypeMeta.getItem(key, type)) {
|
||||
read_resources_data(content, arr, type);
|
||||
} else {
|
||||
logger.warning() << "unknown resource type: " << key;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue