mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
make BlockMaterial serializable
This commit is contained in:
parent
862ac496a8
commit
9e28b783fd
4 changed files with 26 additions and 9 deletions
|
|
@ -243,7 +243,7 @@ void scripting::on_content_load(Content* content) {
|
|||
const auto& materials = content->getBlockMaterials();
|
||||
lua::createtable(L, 0, materials.size());
|
||||
for (const auto& [name, material] : materials) {
|
||||
lua::pushvalue(L, material->serialize());
|
||||
lua::pushvalue(L, material->toTable());
|
||||
lua::setfield(L, name);
|
||||
}
|
||||
lua::setfield(L, "materials");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue