mirror of
https://github.com/minetest-mods/moreblocks.git
synced 2025-07-02 08:00:44 +02:00
compatability and legacy mostly done. schema recipes are all messed up for some reason.
This commit is contained in:
@ -15,6 +15,24 @@ function api.register_alias_all(old_node, new_node)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_custom(old_node, new_node, list)
|
||||
for _, shape in ipairs(list) do
|
||||
api.register_alias_single(old_node, new_node, shape)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_group(old_node, new_node, group)
|
||||
for _, shape in ipairs(api.shapes_by_group[group] or {}) do
|
||||
api.register_alias_single(old_node, new_node, shape)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_groups(old_node, new_node, groups)
|
||||
for _, group in ipairs(groups) do
|
||||
api.register_alias_group(old_node, new_node, group)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_force_single(old_node, new_node, shape)
|
||||
local old_shaped_node = api.format_name(old_node, shape)
|
||||
local new_shaped_node = api.format_name(new_node, shape)
|
||||
@ -48,3 +66,21 @@ function api.register_alias_force_all(old_node, new_node)
|
||||
api.register_alias_force_single(old_node, new_node, shape)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_force_custom(old_node, new_node, list)
|
||||
for _, shape in ipairs(list) do
|
||||
api.register_alias_force_single(old_node, new_node, shape)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_force_group(old_node, new_node, group)
|
||||
for _, shape in ipairs(api.shapes_by_group[group] or {}) do
|
||||
api.register_alias_force_single(old_node, new_node, shape)
|
||||
end
|
||||
end
|
||||
|
||||
function api.register_alias_force_groups(old_node, new_node, groups)
|
||||
for _, group in ipairs(groups) do
|
||||
api.register_alias_force_group(old_node, new_node, group)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user