Gates: Add OR and NOR gate

This commit is contained in:
Jeija 2015-11-20 20:13:59 +01:00
parent b89fe52469
commit 75bd081a67
3 changed files with 10 additions and 0 deletions

@ -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", "", ""}})

Binary file not shown.

After

Width:  |  Height:  |  Size: 251 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 B