summaryrefslogtreecommitdiff
path: root/mesecons_gates
diff options
context:
space:
mode:
authorWuzzy <almikes@aol.com>2017-02-15 19:52:29 +0100
committerJeija <norrepli@gmail.com>2017-03-07 19:04:05 +0100
commit967bde284a7ba12584c4529d303f5593b2679da3 (patch)
tree415c9c92ac4bfcf9127678057106b9701e0aa17d /mesecons_gates
parentd80c788fab91d20928bb4dedaf6018a310544ca9 (diff)
downloadmesecons-967bde284a7ba12584c4529d303f5593b2679da3.tar
mesecons-967bde284a7ba12584c4529d303f5593b2679da3.tar.gz
mesecons-967bde284a7ba12584c4529d303f5593b2679da3.tar.bz2
mesecons-967bde284a7ba12584c4529d303f5593b2679da3.tar.xz
mesecons-967bde284a7ba12584c4529d303f5593b2679da3.zip
Spell-check and clarify item names
* Fix inconsistent insulated mesecon names * Clarify lightstone names * Rename meselamp to "Mesecon Lamp" * Use capitalization "Luacontroller" consistently * Cleanup / improvements for logic gate naming
Diffstat (limited to 'mesecons_gates')
-rw-r--r--mesecons_gates/doc/and/description.html2
-rw-r--r--mesecons_gates/doc/diode/description.html2
-rw-r--r--mesecons_gates/doc/nand/description.html2
-rw-r--r--mesecons_gates/doc/nor/description.html2
-rw-r--r--mesecons_gates/doc/not/description.html2
-rw-r--r--mesecons_gates/doc/or/description.html2
-rw-r--r--mesecons_gates/init.lua25
7 files changed, 22 insertions, 15 deletions
diff --git a/mesecons_gates/doc/and/description.html b/mesecons_gates/doc/and/description.html
index eafbeda..528839c 100644
--- a/mesecons_gates/doc/and/description.html
+++ b/mesecons_gates/doc/and/description.html
@@ -1 +1 @@
-And gates power their output if both inputs (from left and right) are powered.
+AND gates power their output if both inputs (from left and right) are powered.
diff --git a/mesecons_gates/doc/diode/description.html b/mesecons_gates/doc/diode/description.html
index 174fd64..5f82706 100644
--- a/mesecons_gates/doc/diode/description.html
+++ b/mesecons_gates/doc/diode/description.html
@@ -1 +1 @@
-Mesecon diodes, just like real ones, only transfer power (signals) in one direction only.
+Diodes conduct signals in one direction only.
diff --git a/mesecons_gates/doc/nand/description.html b/mesecons_gates/doc/nand/description.html
index a520fd2..69c1d4f 100644
--- a/mesecons_gates/doc/nand/description.html
+++ b/mesecons_gates/doc/nand/description.html
@@ -1 +1 @@
-Nand gates do not power their output if both inputs (from left and right) are powered, but power it in every other case.
+NAND gates do not power their output if both inputs (from left and right) are powered, but power it in every other case.
diff --git a/mesecons_gates/doc/nor/description.html b/mesecons_gates/doc/nor/description.html
index cfcd4c0..28d66a4 100644
--- a/mesecons_gates/doc/nor/description.html
+++ b/mesecons_gates/doc/nor/description.html
@@ -1 +1 @@
-Nor gates only power their output if none of their two inputs is powered. They are basically or gates with a not gate at their output.
+NOR gates only power their output if none of their two inputs is powered. They are basically OR gates with a NOT gate at their output.
diff --git a/mesecons_gates/doc/not/description.html b/mesecons_gates/doc/not/description.html
index 8bd6795..7538dc9 100644
--- a/mesecons_gates/doc/not/description.html
+++ b/mesecons_gates/doc/not/description.html
@@ -1 +1 @@
-Not gates invert signals, just like a mesecon torch does, but faster. The input is at the opposite side of the output.
+NOT gates invert signals, just like a mesecon torch does, but faster. The input is at the opposite side of the output.
diff --git a/mesecons_gates/doc/or/description.html b/mesecons_gates/doc/or/description.html
index 0a74abd..f7f5539 100644
--- a/mesecons_gates/doc/or/description.html
+++ b/mesecons_gates/doc/or/description.html
@@ -1 +1 @@
-Or gates power their output if either of their inputs (or both) are powered. You could basically get the same behaviour with two diodes, but or gates save some space.
+OR gates power their output if either of their inputs (or both) are powered. You could basically get the same behaviour with two diodes, but OR gates save some space.
diff --git a/mesecons_gates/init.lua b/mesecons_gates/init.lua
index 57815ef..13e583b 100644
--- a/mesecons_gates/init.lua
+++ b/mesecons_gates/init.lua
@@ -54,10 +54,10 @@ local function update_gate(pos, node, link, newstate)
end
end
-local function register_gate(name, inputnumber, assess, recipe)
+local function register_gate(name, inputnumber, assess, recipe, description)
local get_inputrules = inputnumber == 2 and gate_get_input_rules_twoinputs or
gate_get_input_rules_oneinput
- local description = "Mesecons Logic Gate: "..name
+ description = "Logic Gate: "..name
local basename = "mesecons_gates:"..name
mesecon.register_node(basename, {
@@ -103,32 +103,39 @@ local function register_gate(name, inputnumber, assess, recipe)
end
register_gate("diode", 1, function (input) return input end,
- {{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}})
+ {{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}},
+ "Diode")
register_gate("not", 1, function (input) return not input end,
- {{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}})
+ {{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}},
+ "NOT Gate")
register_gate("and", 2, function (val1, val2) return val1 and val2 end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons:mesecon"},
- {"mesecons:mesecon", "", ""}})
+ {"mesecons:mesecon", "", ""}},
+ "AND Gate")
register_gate("nand", 2, function (val1, val2) return not (val1 and val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_torch:mesecon_torch_on"},
- {"mesecons:mesecon", "", ""}})
+ {"mesecons:mesecon", "", ""}},
+ "NAND Gate")
register_gate("xor", 2, function (val1, val2) return (val1 or val2) and not (val1 and val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons_materials:silicon", "mesecons_materials:silicon"},
- {"mesecons:mesecon", "", ""}})
+ {"mesecons:mesecon", "", ""}},
+ "XOR Gate")
register_gate("nor", 2, function (val1, val2) return not (val1 or val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons:mesecon", "mesecons_torch:mesecon_torch_on"},
- {"mesecons:mesecon", "", ""}})
+ {"mesecons:mesecon", "", ""}},
+ "NOR Gate")
register_gate("or", 2, function (val1, val2) return (val1 or val2) end,
{{"mesecons:mesecon", "", ""},
{"", "mesecons:mesecon", "mesecons:mesecon"},
- {"mesecons:mesecon", "", ""}})
+ {"mesecons:mesecon", "", ""}},
+ "OR Gate")