mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 02:51:49 +00:00
refactor
This commit is contained in:
parent
2580b9dc2f
commit
3f3ff2a1f7
4 changed files with 48 additions and 36 deletions
|
|
@ -80,3 +80,20 @@ ContentLUT* ContentLUT::create(const fs::path& filename,
|
|||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<contententry> ContentLUT::getMissingContent() const {
|
||||
std::vector<contententry> entries;
|
||||
for (size_t i = 0; i < blocks.size(); i++) {
|
||||
if (blocks[i] == BLOCK_VOID) {
|
||||
auto& name = blockNames[i];
|
||||
entries.push_back(contententry {contenttype::block, name});
|
||||
}
|
||||
}
|
||||
for (size_t i = 0; i < items.size(); i++) {
|
||||
if (items[i] == ITEM_VOID) {
|
||||
auto& name = itemNames[i];
|
||||
entries.push_back(contententry {contenttype::item, name});
|
||||
}
|
||||
}
|
||||
return entries;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue