Skip to content

Commit

Permalink
Gates: Add OR and NOR gate
Browse files Browse the repository at this point in the history
Jeija committed Nov 20, 2015
1 parent b89fe52 commit 75bd081
Showing 3 changed files with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions mesecons_gates/init.lua
Original file line number Diff line number Diff line change
@@ -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 added mesecons_gates/textures/jeija_gate_nor.png

Unable to render rich display

Invalid image source.

Binary file added mesecons_gates/textures/jeija_gate_or.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 75bd081

Please sign in to comment.