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
|
|
@ -1,11 +1,17 @@
|
|||
#include "ContentBuilder.hpp"
|
||||
|
||||
#include "../objects/rigging.hpp"
|
||||
|
||||
ContentBuilder::~ContentBuilder() {}
|
||||
|
||||
void ContentBuilder::add(std::unique_ptr<ContentPackRuntime> pack) {
|
||||
packs[pack->getId()] = std::move(pack);
|
||||
}
|
||||
|
||||
void ContentBuilder::add(std::unique_ptr<rigging::RigConfig> rig) {
|
||||
rigs[rig->getName()] = std::move(rig);
|
||||
}
|
||||
|
||||
BlockMaterial& ContentBuilder::createBlockMaterial(const std::string& id) {
|
||||
blockMaterials[id] = std::make_unique<BlockMaterial>();
|
||||
auto& material = *blockMaterials[id];
|
||||
|
|
@ -68,7 +74,8 @@ std::unique_ptr<Content> ContentBuilder::build() {
|
|||
items.build(),
|
||||
entities.build(),
|
||||
std::move(packs),
|
||||
std::move(blockMaterials)
|
||||
std::move(blockMaterials),
|
||||
std::move(rigs)
|
||||
);
|
||||
|
||||
// Now, it's time to resolve foreign keys
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue