mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
add core:obstacle block & move cameras from base to core & add new generator
This commit is contained in:
parent
d534207deb
commit
788ad1f6a6
19 changed files with 147 additions and 114 deletions
|
|
@ -528,6 +528,18 @@ void ContentLoader::load() {
|
|||
}
|
||||
}
|
||||
|
||||
fs::path resourcesFile = folder / fs::u8path("resources.json");
|
||||
if (fs::exists(resourcesFile)) {
|
||||
auto resRoot = files::read_json(resourcesFile);
|
||||
for (const auto& [key, arr] : resRoot.asObject()) {
|
||||
if (auto resType = ResourceType_from(key)) {
|
||||
loadResources(*resType, arr);
|
||||
} else {
|
||||
logger.warning() << "unknown resource type: " << key;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!fs::is_regular_file(pack->getContentFile())) return;
|
||||
|
||||
auto root = files::read_json(pack->getContentFile());
|
||||
|
|
@ -723,18 +735,6 @@ void ContentLoader::load() {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
fs::path resourcesFile = folder / fs::u8path("resources.json");
|
||||
if (fs::exists(resourcesFile)) {
|
||||
auto resRoot = files::read_json(resourcesFile);
|
||||
for (const auto& [key, arr] : resRoot.asObject()) {
|
||||
if (auto resType = ResourceType_from(key)) {
|
||||
loadResources(*resType, arr);
|
||||
} else {
|
||||
logger.warning() << "unknown resource type: " << key;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void ContentLoader::loadResources(ResourceType type, const dv::value& list) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue