mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
change rigs role from assets to content units
This commit is contained in:
parent
7dfda981a8
commit
49aa64a033
16 changed files with 67 additions and 70 deletions
|
|
@ -9,6 +9,7 @@
|
|||
#include "../debug/Logger.hpp"
|
||||
#include "../files/files.hpp"
|
||||
#include "../items/ItemDef.hpp"
|
||||
#include "../objects/rigging.hpp"
|
||||
#include "../logic/scripting/scripting.hpp"
|
||||
#include "../typedefs.hpp"
|
||||
#include "../util/listutil.hpp"
|
||||
|
|
@ -458,4 +459,14 @@ void ContentLoader::load() {
|
|||
loadBlockMaterial(builder.createBlockMaterial(name), file);
|
||||
}
|
||||
}
|
||||
|
||||
fs::path rigsDir = folder / fs::u8path("rigs");
|
||||
if (fs::is_directory(rigsDir)) {
|
||||
for (const auto& entry : fs::directory_iterator(rigsDir)) {
|
||||
const fs::path& file = entry.path();
|
||||
std::string name = pack->id+":"+file.stem().u8string();
|
||||
std::string text = files::read_string(file);
|
||||
builder.add(rigging::RigConfig::parse(text, file.u8string(), name));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue