diff options
Diffstat (limited to 'mesecons_insulated')
-rw-r--r-- | mesecons_insulated/init.lua | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/mesecons_insulated/init.lua b/mesecons_insulated/init.lua index fe929d6..8bf75c7 100644 --- a/mesecons_insulated/init.lua +++ b/mesecons_insulated/init.lua @@ -1,3 +1,12 @@ +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 + minetest.register_node("mesecons_insulated:insulated_on", { drawtype = "nodebox", description = "insulated mesecons", @@ -73,12 +82,3 @@ minetest.register_craft({ mesecon:add_rules("insulated", { {x = 1, y = 0, z = 0}, {x =-1, y = 0, z = 0}}) - -function insulated_wire_get_rules(node) - local rules = {{x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}} - if param2 == 1 or param2 == 3 then - return mesecon:rotate_rules_right(rules) - end - return rules -end |