Consolidate horizontal rules getters (#602)

This commit is contained in:
Jude Melton-Houghton
2022-06-05 05:19:18 -04:00
committed by GitHub
parent 58305f52bc
commit 0a4a88b1b9
8 changed files with 49 additions and 89 deletions

View File

@ -3,17 +3,10 @@ local corner_selectionbox = {
fixed = { -16/32, -16/32, -16/32, 5/32, -12/32, 5/32 },
}
local corner_get_rules = function (node)
local rules =
{{x = 1, y = 0, z = 0},
{x = 0, y = 0, z = -1}}
for i = 0, node.param2 do
rules = mesecon.rotate_rules_left(rules)
end
return rules
end
local corner_get_rules = mesecon.horiz_rules_getter({
{x = 0, y = 0, z = -1},
{x = -1, y = 0, z = 0},
})
minetest.register_node("mesecons_extrawires:corner_on", {
drawtype = "mesh",