mirror of
https://github.com/minetest-mods/mesecons.git
synced 2024-12-25 01:40:18 +01:00
registering the on receptor makes placing a mesecon on the out port of
the gate update the circuitry after it
This commit is contained in:
parent
0f7a87538d
commit
845c275121
@ -1,3 +1,6 @@
|
||||
outrules = {
|
||||
{x=1, y=0, z=0},
|
||||
}
|
||||
gates = {"diode", "not", "nand", "and", "xor"}
|
||||
for g in ipairs(gates) do gate = gates[g]
|
||||
if g < 3 then
|
||||
@ -13,20 +16,22 @@ for g in ipairs(gates) do gate = gates[g]
|
||||
}
|
||||
end
|
||||
for on=0,1 do
|
||||
nodename = "mesecons_gates:"..gate
|
||||
if on == 1 then
|
||||
onoff = "on"
|
||||
drop = nodename.."_off"
|
||||
groups = {dig_immediate=2, not_in_creative_inventory=1, mesecon = 3}
|
||||
drop = "mesecons_gates:"..gate.."_off"
|
||||
description = "You hacker you!"
|
||||
nodename = nodename.."_"..onoff
|
||||
mesecon:add_receptor_node(nodename, outrules)
|
||||
else
|
||||
onoff = "off"
|
||||
groups = {dig_immediate=2, mesecon = 3}
|
||||
drop = nodename
|
||||
description = gate.." Gate"
|
||||
nodename = nodename.."_"..onoff
|
||||
--mesecon:add_receptor_node_off(nodename, rules)
|
||||
end
|
||||
|
||||
nodename = "mesecons_gates:"..gate.."_"..onoff
|
||||
|
||||
node_box = {
|
||||
type = "fixed",
|
||||
fixed = { -8/16, -8/16, -8/16, 8/16, -7/16, 8/16 },
|
||||
|
Loading…
Reference in New Issue
Block a user