summaryrefslogtreecommitdiff
path: root/mesecons_gates/init.lua
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/init.lua
parentb89fe524693296be57400f4ae74ef27bd7cc46d3 (diff)
Gates: Add OR and NOR gate
Diffstat (limited to 'mesecons_gates/init.lua')
-rw-r--r--mesecons_gates/init.lua10
1 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", "", ""}})