diff options
-rw-r--r-- | mesecons_gates/depends.txt | 2 | ||||
-rw-r--r-- | mesecons_gates/init.lua | 45 |
2 files changed, 47 insertions, 0 deletions
diff --git a/mesecons_gates/depends.txt b/mesecons_gates/depends.txt index 52fb260..4ed39f9 100644 --- a/mesecons_gates/depends.txt +++ b/mesecons_gates/depends.txt @@ -1,2 +1,4 @@ mesecons mesecons_microcontroller +mesecons_torch +mesecons_materials diff --git a/mesecons_gates/init.lua b/mesecons_gates/init.lua index 089d608..b58e0bc 100644 --- a/mesecons_gates/init.lua +++ b/mesecons_gates/init.lua @@ -140,3 +140,48 @@ mesecon:register_on_signal_change(function(pos,node) end end) +minetest.register_craft({ + output = 'mesecons_gates:diode_off', + recipe = { + {'', '', ''}, + {'mesecons:mesecon', 'mesecons_torch:mesecon_torch_on', 'mesecons_torch:mesecon_torch_on'}, + {'', '', ''}, + }, +}) + +minetest.register_craft({ + output = 'mesecons_gates:not_off', + recipe = { + {'', '', ''}, + {'mesecons:mesecon', 'mesecons_torch:mesecon_torch_on', 'mesecons:mesecon'}, + {'', '', ''}, + }, +}) + +minetest.register_craft({ + output = 'mesecons_gates:and_off', + recipe = { + {'mesecons:mesecon', '', ''}, + {'', 'mesecons_materials:silicon', 'mesecons:mesecon'}, + {'mesecons:mesecon', '', ''}, + }, +}) + +minetest.register_craft({ + output = 'mesecons_gates:nand_off', + recipe = { + {'mesecons:mesecon', '', ''}, + {'', 'mesecons_materials:silicon', 'mesecons_torch:mesecon_torch_on'}, + {'mesecons:mesecon', '', ''}, + }, +}) + +minetest.register_craft({ + output = 'mesecons_gates:xor_off', + recipe = { + {'mesecons:mesecon', '', ''}, + {'', 'mesecons_materials:silicon', 'mesecons_materials:silicon'}, + {'mesecons:mesecon', '', ''}, + }, +}) + |