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

@ -1,11 +1,7 @@
local function insulated_wire_get_rules(node)
local rules = {{x = 1, y = 0, z = 0},
{x =-1, y = 0, z = 0}}
if node.param2 == 1 or node.param2 == 3 then
return mesecon.rotate_rules_right(rules)
end
return rules
end
local insulated_wire_get_rules = mesecon.horiz_rules_getter({
{x = 1, y = 0, z = 0},
{x = -1, y = 0, z = 0},
})
minetest.register_node("mesecons_insulated:insulated_on", {
drawtype = "nodebox",