summaryrefslogtreecommitdiff
path: root/mesecons_extrawires/tjunction.lua
diff options
context:
space:
mode:
Diffstat (limited to 'mesecons_extrawires/tjunction.lua')
-rw-r--r--mesecons_extrawires/tjunction.lua27
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",