diff options
author | Jeija <norrepli@gmail.com> | 2012-12-31 18:32:46 +0100 |
---|---|---|
committer | Jeija <norrepli@gmail.com> | 2012-12-31 18:32:46 +0100 |
commit | ec07fc27d7ef76114fd977283c36a20afe26f13f (patch) | |
tree | e8eab0fd457abdd33adaebbd46c4cf77e2fefd1c /mesecons_extrawires/tjunction.lua | |
parent | 5921f6d46caa18310435046a22d5aa0f529998f0 (diff) | |
parent | 52ddd4bdc931a1f806ea581002b0f39ba83158bc (diff) |
Merge branch 'nextgen'
Conflicts:
mesecons/wires.lua
Diffstat (limited to 'mesecons_extrawires/tjunction.lua')
-rw-r--r-- | mesecons_extrawires/tjunction.lua | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/mesecons_extrawires/tjunction.lua b/mesecons_extrawires/tjunction.lua index cb16cfb..5146b0c 100644 --- a/mesecons_extrawires/tjunction.lua +++ b/mesecons_extrawires/tjunction.lua @@ -11,28 +11,25 @@ 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 minetest.register_node("mesecons_extrawires:tjunction_on", { drawtype = "nodebox", tiles = { - "jeija_insulated_wire_sides.png", - "jeija_insulated_wire_sides.png", + "jeija_insulated_wire_tjunction_tb_on.png", + "jeija_insulated_wire_tjunction_tb_on.png^[transformR180", "jeija_insulated_wire_ends_on.png", "jeija_insulated_wire_ends_on.png", - "jeija_insulated_wire_sides.png", + "jeija_insulated_wire_sides_on.png", "jeija_insulated_wire_ends_on.png" }, paramtype = "light", @@ -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, @@ -55,11 +52,11 @@ minetest.register_node("mesecons_extrawires:tjunction_off", { drawtype = "nodebox", description = "T-junction", tiles = { - "jeija_insulated_wire_sides.png", - "jeija_insulated_wire_sides.png", + "jeija_insulated_wire_tjunction_tb_off.png", + "jeija_insulated_wire_tjunction_tb_off.png^[transformR180", "jeija_insulated_wire_ends_off.png", "jeija_insulated_wire_ends_off.png", - "jeija_insulated_wire_sides.png", + "jeija_insulated_wire_sides_off.png", "jeija_insulated_wire_ends_off.png" }, paramtype = "light", |