mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-01 07:30:43 +02:00
make use of i3's "compression" feature
This commit is contained in:
@ -1,4 +1,4 @@
|
|||||||
-- luacheck: read globals i3
|
-- luacheck: globals i3
|
||||||
|
|
||||||
if not stairsplus.has.i3 then
|
if not stairsplus.has.i3 then
|
||||||
return
|
return
|
||||||
@ -91,6 +91,14 @@ local function on_register_single(node, shaped_name)
|
|||||||
result = shaped_name,
|
result = shaped_name,
|
||||||
items = {node},
|
items = {node},
|
||||||
})
|
})
|
||||||
|
|
||||||
|
local micronode = api.get_micronode(node)
|
||||||
|
if shaped_name ~= micronode then
|
||||||
|
local compress_groups = i3.compress_groups[micronode] or {}
|
||||||
|
table.insert(compress_groups, shaped_name)
|
||||||
|
i3.compress_groups[micronode] = compress_groups
|
||||||
|
i3.compressed[shaped_name] = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
for _, single in ipairs(api.registered_singles) do
|
for _, single in ipairs(api.registered_singles) do
|
||||||
|
Reference in New Issue
Block a user