Skip to content
Snippets Groups Projects
Commit e65c5ca9 authored by Kyle's avatar Kyle
Browse files

nodeboxes now show which sides connect

parent b0142a74
No related branches found
No related tags found
No related merge requests found
......@@ -8,12 +8,29 @@ for g in ipairs(gates) do gate = gates[g]
{x=-1, y=0, z=0},
{x=1, y=0, z=0},
}
node_box = {
type = "fixed",
fixed = {
{-6/16, -8/16, -6/16, 6/16, -7/16, 6/16 },
{6/16, -8/16, -2/16, 8/16, -7/16, 2/16 },
{-8/16, -8/16, -2/16, -6/16, -7/16, 2/16 },
},
}
else
rules = {
{x=0, y=0, z=1},
{x=0, y=0, z=-1},
{x=1, y=0, z=0},
}
node_box = {
type = "fixed",
fixed = {
{-6/16, -8/16, -6/16, 6/16, -7/16, 6/16 },
{6/16, -8/16, -2/16, 8/16, -7/16, 2/16 },
{-2/16, -8/16, 6/16, 2/16, -7/16, 8/16 },
{-2/16, -8/16, -8/16, 2/16, -7/16, -6/16 },
},
}
end
for on=0,1 do
nodename = "mesecons_gates:"..gate
......@@ -32,11 +49,6 @@ for g in ipairs(gates) do gate = gates[g]
--mesecon:add_receptor_node_off(nodename, rules)
end
node_box = {
type = "fixed",
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
}
tiles = "jeija_microcontroller_bottom.png^"..
"jeija_gate_"..onoff..".png^"..
"jeija_gate_"..gate..".png"
......@@ -88,7 +100,6 @@ end
function set_gate(pos, on)
gate = get_gate(pos)
local meta = minetest.env:get_meta(pos)
local rules = {{x=1, y=0, z=0}}
if on ~= gate_state(pos) then
yc_heat(meta)
minetest.after(0.5, yc_cool, meta)
......@@ -105,9 +116,9 @@ function set_gate(pos, on)
local meta2 = minetest.env:get_meta(pos)
meta2:set_int("heat", heat)
if on then
mesecon:receptor_on(pos, rules)
mesecon:receptor_on(pos, outrules)
else
mesecon:receptor_off(pos, rules)
mesecon:receptor_off(pos, outrules)
end
end
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment