Skip to content

Commit 967bde2

Browse files
WuzzyJeija
Wuzzy
authored andcommittedMar 7, 2017
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
1 parent d80c788 commit 967bde2

File tree

15 files changed

+48
-38
lines changed

15 files changed

+48
-38
lines changed
 

‎mesecons_extrawires/vertical.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ end
7777

7878
-- Vertical wire
7979
mesecon.register_node("mesecons_extrawires:vertical", {
80-
description = "Vertical mesecon",
80+
description = "Vertical Mesecon",
8181
drawtype = "nodebox",
8282
walkable = false,
8383
paramtype = "light",
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
And gates power their output if both inputs (from left and right) are powered.
1+
AND gates power their output if both inputs (from left and right) are powered.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Mesecon diodes, just like real ones, only transfer power (signals) in one direction only.
1+
Diodes conduct signals in one direction only.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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.
1+
NAND gates do not power their output if both inputs (from left and right) are powered, but power it in every other case.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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.
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.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Not gates invert signals, just like a mesecon torch does, but faster. The input is at the opposite side of the output.
1+
NOT gates invert signals, just like a mesecon torch does, but faster. The input is at the opposite side of the output.
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +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.
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.

‎mesecons_gates/init.lua

+16-9
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ local function update_gate(pos, node, link, newstate)
5454
end
5555
end
5656

57-
local function register_gate(name, inputnumber, assess, recipe)
57+
local function register_gate(name, inputnumber, assess, recipe, description)
5858
local get_inputrules = inputnumber == 2 and gate_get_input_rules_twoinputs or
5959
gate_get_input_rules_oneinput
60-
local description = "Mesecons Logic Gate: "..name
60+
description = "Logic Gate: "..name
6161

6262
local basename = "mesecons_gates:"..name
6363
mesecon.register_node(basename, {
@@ -103,32 +103,39 @@ local function register_gate(name, inputnumber, assess, recipe)
103103
end
104104

105105
register_gate("diode", 1, function (input) return input end,
106-
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}})
106+
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons_torch:mesecon_torch_on"}},
107+
"Diode")
107108

108109
register_gate("not", 1, function (input) return not input end,
109-
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}})
110+
{{"mesecons:mesecon", "mesecons_torch:mesecon_torch_on", "mesecons:mesecon"}},
111+
"NOT Gate")
110112

111113
register_gate("and", 2, function (val1, val2) return val1 and val2 end,
112114
{{"mesecons:mesecon", "", ""},
113115
{"", "mesecons_materials:silicon", "mesecons:mesecon"},
114-
{"mesecons:mesecon", "", ""}})
116+
{"mesecons:mesecon", "", ""}},
117+
"AND Gate")
115118

116119
register_gate("nand", 2, function (val1, val2) return not (val1 and val2) end,
117120
{{"mesecons:mesecon", "", ""},
118121
{"", "mesecons_materials:silicon", "mesecons_torch:mesecon_torch_on"},
119-
{"mesecons:mesecon", "", ""}})
122+
{"mesecons:mesecon", "", ""}},
123+
"NAND Gate")
120124

121125
register_gate("xor", 2, function (val1, val2) return (val1 or val2) and not (val1 and val2) end,
122126
{{"mesecons:mesecon", "", ""},
123127
{"", "mesecons_materials:silicon", "mesecons_materials:silicon"},
124-
{"mesecons:mesecon", "", ""}})
128+
{"mesecons:mesecon", "", ""}},
129+
"XOR Gate")
125130

126131
register_gate("nor", 2, function (val1, val2) return not (val1 or val2) end,
127132
{{"mesecons:mesecon", "", ""},
128133
{"", "mesecons:mesecon", "mesecons_torch:mesecon_torch_on"},
129-
{"mesecons:mesecon", "", ""}})
134+
{"mesecons:mesecon", "", ""}},
135+
"NOR Gate")
130136

131137
register_gate("or", 2, function (val1, val2) return (val1 or val2) end,
132138
{{"mesecons:mesecon", "", ""},
133139
{"", "mesecons:mesecon", "mesecons:mesecon"},
134-
{"mesecons:mesecon", "", ""}})
140+
{"mesecons:mesecon", "", ""}},
141+
"OR Gate")

‎mesecons_insulated/init.lua

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ end
99

1010
minetest.register_node("mesecons_insulated:insulated_on", {
1111
drawtype = "nodebox",
12-
description = "Insulated Mesecon",
12+
description = "Straight Insulated Mesecon",
1313
tiles = {
1414
"jeija_insulated_wire_sides_on.png",
1515
"jeija_insulated_wire_sides_on.png",
@@ -41,7 +41,7 @@ minetest.register_node("mesecons_insulated:insulated_on", {
4141

4242
minetest.register_node("mesecons_insulated:insulated_off", {
4343
drawtype = "nodebox",
44-
description = "Insulated Mesecon",
44+
description = "Straight Insulated Mesecon",
4545
tiles = {
4646
"jeija_insulated_wire_sides_off.png",
4747
"jeija_insulated_wire_sides_off.png",
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Lamps are effectors that if powered emit light.
1+
Mesecon lamps are effectors that if powered emit light.

‎mesecons_lamp/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ minetest.register_node("mesecons_lamp:lamp_off", {
4242
node_box = mesecon_lamp_box,
4343
selection_box = mesecon_lamp_box,
4444
groups = {dig_immediate=3, mesecon_receptor_off = 1, mesecon_effector_off = 1},
45-
description="Meselamp",
45+
description="Mesecon Lamp",
4646
sounds = default.node_sound_glass_defaults(),
4747
mesecons = {effector = {
4848
action_on = function (pos, node)

‎mesecons_lightstone/init.lua

+11-8
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,14 @@ local lightstone_rules = {
1414
{x=0, y=-1, z=0},
1515
}
1616

17-
function mesecon.lightstone_add(name, base_item, texture_off, texture_on)
17+
function mesecon.lightstone_add(name, base_item, texture_off, texture_on, desc)
18+
if not desc then
19+
desc = name .. " Lightstone"
20+
end
1821
minetest.register_node("mesecons_lightstone:lightstone_" .. name .. "_off", {
1922
tiles = {texture_off},
2023
groups = {cracky=2, mesecon_effector_off = 1, mesecon = 2},
21-
description=name.." Lightstone",
24+
description = desc,
2225
sounds = default.node_sound_stone_defaults(),
2326
mesecons = {effector = {
2427
rules = lightstone_rules,
@@ -52,9 +55,9 @@ function mesecon.lightstone_add(name, base_item, texture_off, texture_on)
5255
end
5356

5457

55-
mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png")
56-
mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png")
57-
mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png")
58-
mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png")
59-
mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png")
60-
mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png")
58+
mesecon.lightstone_add("red", "dye:red", "jeija_lightstone_red_off.png", "jeija_lightstone_red_on.png", "Red Lightstone")
59+
mesecon.lightstone_add("green", "dye:green", "jeija_lightstone_green_off.png", "jeija_lightstone_green_on.png", "Green Lightstone")
60+
mesecon.lightstone_add("blue", "dye:blue", "jeija_lightstone_blue_off.png", "jeija_lightstone_blue_on.png", "Blue Lightstone")
61+
mesecon.lightstone_add("gray", "dye:grey", "jeija_lightstone_gray_off.png", "jeija_lightstone_gray_on.png", "Grey Lightstone")
62+
mesecon.lightstone_add("darkgray", "dye:dark_grey", "jeija_lightstone_darkgray_off.png", "jeija_lightstone_darkgray_on.png", "Dark Grey Lightstone")
63+
mesecon.lightstone_add("yellow", "dye:yellow", "jeija_lightstone_yellow_off.png", "jeija_lightstone_yellow_on.png", "Yellow Lightstone")
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
The luacontroller is an advanced programmable component.
2-
You can simply code it in the language mesecons uses itself: Lua!
1+
The Luacontroller is an advanced programmable component.
2+
You can simply code it in the language Mesecons uses itself: Lua!
33
All the code runs in a sandbox, so it's completely safe (but I won't guarantee that for absolute certainty!).
44

55
<a href="http://mesecons.net/luacontroller/">Documentation is available here!</a>

‎mesecons_luacontroller/init.lua

+7-7
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
-- ports = get_real_port_states(pos): gets if inputs are powered from outside
1313
-- newport = merge_port_states(state1, state2): just does result = state1 or state2 for every port
1414
-- set_port(pos, rule, state): activates/deactivates the mesecons according to the port states
15-
-- set_port_states(pos, ports): Applies new port states to a LuaController at pos
15+
-- set_port_states(pos, ports): Applies new port states to a Luacontroller at pos
1616
-- run(pos): runs the code in the controller at pos
1717
-- reset_meta(pos, code, errmsg): performs a software-reset, installs new code and prints error messages
1818
-- resetn(pos): performs a hardware reset, turns off all ports
@@ -219,7 +219,7 @@ end
219219
local function safe_string_find(...)
220220
if (select(4, ...)) ~= true then
221221
debug.sethook() -- Clear hook
222-
error("string.find: 'plain' (fourth parameter) must always be true in a LuaController")
222+
error("string.find: 'plain' (fourth parameter) must always be true in a Luacontroller")
223223
end
224224

225225
return string.find(...)
@@ -232,7 +232,7 @@ local function remove_functions(x)
232232
end
233233

234234
-- Make sure to not serialize the same table multiple times, otherwise
235-
-- writing mem.test = mem in the LuaController will lead to infinite recursion
235+
-- writing mem.test = mem in the Luacontroller will lead to infinite recursion
236236
local seen = {}
237237

238238
local function rfuncs(x)
@@ -308,8 +308,8 @@ local function create_environment(pos, mem, event)
308308
for k, v in pairs(vports) do vports_copy[k] = v end
309309
local rports = get_real_port_states(pos)
310310

311-
-- Create new library tables on each call to prevent one LuaController
312-
-- from breaking a library and messing up other LuaControllers.
311+
-- Create new library tables on each call to prevent one Luacontroller
312+
-- from breaking a library and messing up other Luacontrollers.
313313
local env = {
314314
pin = merge_port_states(vports, rports),
315315
port = vports_copy,
@@ -595,7 +595,7 @@ for d = 0, 1 do
595595
}
596596

597597
minetest.register_node(node_name, {
598-
description = "LuaController",
598+
description = "Luacontroller",
599599
drawtype = "nodebox",
600600
tiles = {
601601
top,
@@ -636,7 +636,7 @@ end
636636
end
637637

638638
------------------------------
639-
-- Overheated LuaController --
639+
-- Overheated Luacontroller --
640640
------------------------------
641641

642642
minetest.register_node(BASENAME .. "_burnt", {

‎mesecons_stickyblocks/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33

44
-- All sides sticky block
55
minetest.register_node("mesecons_stickyblocks:sticky_block_all", {
6-
description = "All-sides sticky block",
6+
description = "All-Sides Sticky Block",
77
tiles = {"default_grass.png^default_footprint.png"},
88
groups = {dig_immediate=2},
99
mvps_sticky = function (pos, node)

0 commit comments

Comments
 (0)
Please sign in to comment.