diff options
author | Jeija <norrepli@gmail.com> | 2012-12-10 17:19:30 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-12-10 17:19:30 +0100 |
commit | d5825f9602cc293f5a6724b9f83e549ded1d4f83 (patch) | |
tree | aa6d5a1bdb681f2c9e547c1029b7090738df88f7 /mesecons_insulated | |
parent | 05def1540a0defb99234bce994352a05f632f69f (diff) |
Fix insulated mesecon
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 |