summaryrefslogtreecommitdiff
path: root/mesecons_gates
diff options
context:
space:
mode:
authorJeija <norrepli@gmail.com>2015-11-20 20:13:59 +0100
committerJeija <norrepli@gmail.com>2015-11-20 20:13:59 +0100
commit75bd081a67a2ac52b8a0eea1e051a456d288c71d (patch)
treebb9add61dcd6b4c51e3681e05cfcd43e06f732ab /mesecons_gates
parentb89fe524693296be57400f4ae74ef27bd7cc46d3 (diff)
downloadmesecons-75bd081a67a2ac52b8a0eea1e051a456d288c71d.tar
mesecons-75bd081a67a2ac52b8a0eea1e051a456d288c71d.tar.gz
mesecons-75bd081a67a2ac52b8a0eea1e051a456d288c71d.tar.bz2
mesecons-75bd081a67a2ac52b8a0eea1e051a456d288c71d.tar.xz
mesecons-75bd081a67a2ac52b8a0eea1e051a456d288c71d.zip
Gates: Add OR and NOR gate
Diffstat (limited to 'mesecons_gates')
-rw-r--r--mesecons_gates/init.lua10
-rw-r--r--mesecons_gates/textures/jeija_gate_nor.pngbin0 -> 251 bytes
-rw-r--r--mesecons_gates/textures/jeija_gate_or.pngbin0 -> 243 bytes
3 files changed, 10 insertions, 0 deletions
diff --git a/mesecons_gates/init.lua b/mesecons_gates/init.lua
index 78a3e83..dde85bf 100644
--- a/mesecons_gates/init.lua
+++ b/mesecons_gates/init.lua
@@ -122,3 +122,13 @@ register_gate("xor", 2, function (val1, val2) return (val1 or val2) and not (val
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_materials:silicon"},
{"mesecons:mesecon", "", ""}})
+
+register_gate("nor", 2, function (val1, val2) return not (val1 or val2) end,
+ {{"mesecons:mesecon", "", ""},
+ {"", "mesecons_materials:mesecon_torch_on", "mesecons_materials:silicon"},
+ {"mesecons:mesecon", "", ""}})
+
+register_gate("or", 2, function (val1, val2) return (val1 or val2) end,
+ {{"mesecons:mesecon", "", ""},
+ {"", "mesecons:mesecon", "mesecons:mesecon"},
+ {"mesecons:mesecon", "", ""}})
diff --git a/mesecons_gates/textures/jeija_gate_nor.png b/mesecons_gates/textures/jeija_gate_nor.png
new file mode 100644
index 0000000..c4298e3
--- /dev/null
+++ b/mesecons_gates/textures/jeija_gate_nor.png
Binary files differ
diff --git a/mesecons_gates/textures/jeija_gate_or.png b/mesecons_gates/textures/jeija_gate_or.png
new file mode 100644
index 0000000..09f0661
--- /dev/null
+++ b/mesecons_gates/textures/jeija_gate_or.png
Binary files differ