1 local tjunction_nodebox
= {
3 fixed
= {{ -16/32-0.001, -17/32, -3/32, 16/32+0.001, -13/32, 3/32 },
4 { -3/32, -17/32, -16/32+0.001, 3/32, -13/32, -3/32},}
7 local tjunction_selectionbox
= {
9 fixed
= { -16/32-0.001, -18/32, -16/32, 16/32+0.001, -12/32, 7/32 },
12 local tjunction_get_rules
= function (node
)
14 {{x
= 0, y
= 0, z
= 1},
15 {x
= 1, y
= 0, z
= 0},
16 {x
= 0, y
= 0, z
= -1}}
18 for i
= 0, node
.param2
do
19 rules
= mesecon
:rotate_rules_left(rules
)
25 minetest
.register_node("mesecons_extrawires:tjunction_on", {
28 "jeija_insulated_wire_tjunction_tb_on.png",
29 "jeija_insulated_wire_tjunction_tb_on.png^[transformR180",
30 "jeija_insulated_wire_ends_on.png",
31 "jeija_insulated_wire_ends_on.png",
32 "jeija_insulated_wire_sides_on.png",
33 "jeija_insulated_wire_ends_on.png"
36 paramtype2
= "facedir",
38 sunlight_propagates
= true,
39 selection_box
= tjunction_selectionbox
,
40 node_box
= tjunction_nodebox
,
41 groups
= {dig_immediate
= 3, mesecon_conductor_craftable
=1, not_in_creative_inventory
= 1},
42 drop
= "mesecons_extrawires:tjunction_off",
43 mesecons
= {conductor
=
45 state
= mesecon
.state
.on
,
46 rules
= tjunction_get_rules
,
47 offstate
= "mesecons_extrawires:tjunction_off"
51 minetest
.register_node("mesecons_extrawires:tjunction_off", {
53 description
= "Insulated Mesecon T-Junction",
55 "jeija_insulated_wire_tjunction_tb_off.png",
56 "jeija_insulated_wire_tjunction_tb_off.png^[transformR180",
57 "jeija_insulated_wire_ends_off.png",
58 "jeija_insulated_wire_ends_off.png",
59 "jeija_insulated_wire_sides_off.png",
60 "jeija_insulated_wire_ends_off.png"
63 paramtype2
= "facedir",
65 sunlight_propagates
= true,
66 selection_box
= tjunction_selectionbox
,
67 node_box
= tjunction_nodebox
,
68 groups
= {dig_immediate
= 3, mesecon_conductor_craftable
=1},
69 mesecons
= {conductor
=
71 state
= mesecon
.state
.off
,
72 rules
= tjunction_get_rules
,
73 onstate
= "mesecons_extrawires:tjunction_on"
77 minetest
.register_craft({
78 output
= "mesecons_extrawires:tjunction_off 3",
81 {"mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off", "mesecons_insulated:insulated_off"},
82 {"", "mesecons_insulated:insulated_off", ""},