mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-06 11:31:49 +00:00
refactor a bit
This commit is contained in:
parent
5fdff1f8f6
commit
29021d1178
6 changed files with 14 additions and 6 deletions
|
|
@ -272,11 +272,12 @@ void AssetsLoader::addDefaults(AssetsLoader& loader, const Content* content) {
|
|||
}
|
||||
}
|
||||
for (const auto& [_, def] : content->blocks.getDefs()) {
|
||||
add_variant(loader, def->defaults);
|
||||
if (def->variants) {
|
||||
for (const auto& variant : def->variants->variants) {
|
||||
add_variant(loader, variant);
|
||||
}
|
||||
} else {
|
||||
add_variant(loader, def->defaults);
|
||||
}
|
||||
}
|
||||
for (const auto& [_, def] : content->items.getDefs()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue