diff options
author | Jeija <norrepli@gmail.com> | 2012-12-27 09:54:19 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-12-27 09:54:19 +0100 |
commit | d1ace465c7d5c3153dcab84fd4ba2b9d235028a6 (patch) | |
tree | d16a38feac0102c16ffac81410290faa351b5052 /mesecons_extrawires/tjunction.lua | |
parent | 7fe4947056656982ee9af9fad8d67d14e7086c9a (diff) |
Add experimental 'corner' wire, an insulated bended wire (needs textures and maybe rename it)
Diffstat (limited to 'mesecons_extrawires/tjunction.lua')
-rw-r--r-- | mesecons_extrawires/tjunction.lua | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/mesecons_extrawires/tjunction.lua b/mesecons_extrawires/tjunction.lua index aa100f5..9188b5b 100644 --- a/mesecons_extrawires/tjunction.lua +++ b/mesecons_extrawires/tjunction.lua @@ -11,17 +11,14 @@ local tjunction_selectionbox = { local tjunction_get_rules = function (node) local rules = - {{x = 1, y = 0, z = 0}, - {x =-1, y = 0, z = 0}, - {x = 0, y = 0, z = -1}} + {{x = 0, y = 0, z = 1}, + {x = 1, y = 0, z = 0}, + {x = 0, y = 0, z = -1}} - if node.param2 == 1 then + for i = 0, node.param2 do rules = mesecon:rotate_rules_left(rules) - elseif node.param2 == 2 then - rules = mesecon:rotate_rules_right(mesecon:rotate_rules_right(rules)) - elseif node.param2 == 3 then - rules = mesecon:rotate_rules_right(rules) end + return rules end @@ -42,7 +39,7 @@ minetest.register_node("mesecons_extrawires:tjunction_on", { selection_box = tjunction_selectionbox, node_box = tjunction_nodebox, groups = {dig_immediate = 3, mesecon_conductor_craftable=1, not_in_creative_inventory = 1}, - drop = "mesecons_insulated:insulated_off", + drop = "mesecons_extrawires:tjunction_off", mesecons = {conductor = { state = mesecon.state.on, |