mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
fix: block/item.properties not inheriting parent content unit properties
This commit is contained in:
parent
91a1fc1210
commit
a9d185256a
1 changed files with 7 additions and 0 deletions
|
|
@ -16,6 +16,13 @@ end
|
|||
-- remove undefined properties and build tags set
|
||||
local function process_properties(lib)
|
||||
for id, props in pairs(lib.properties) do
|
||||
if props.parent then
|
||||
for propname, value in pairs(lib.properties[block.index(props.parent)]) do
|
||||
if not props[propname] then
|
||||
props[propname] = value
|
||||
end
|
||||
end
|
||||
end
|
||||
for propname, _ in pairs(props) do
|
||||
if not table.has(names, propname) then
|
||||
props[propname] = nil
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue