mirror of
https://github.com/minetest-mods/mesecons.git
synced 2025-06-28 05:50:17 +02:00
Add .luacheckrc and fix issues it pointed out (#589)
This commit is contained in:
committed by
GitHub
parent
c9dd323207
commit
fb255d292e
@ -96,7 +96,7 @@ plg.register_nodes({
|
||||
meta:set_int("valid", 0)
|
||||
meta:set_string("infotext", "FPGA")
|
||||
end,
|
||||
on_rightclick = function(pos, node, clicker)
|
||||
on_rightclick = function(pos, _, clicker)
|
||||
if not minetest.is_player(clicker) then
|
||||
return
|
||||
end
|
||||
@ -113,7 +113,7 @@ plg.register_nodes({
|
||||
mesecons = {
|
||||
effector = {
|
||||
rules = {}, -- replaced later
|
||||
action_change = function(pos, node, rule, newstate)
|
||||
action_change = function(pos, _, rule, newstate)
|
||||
plg.ports_changed(pos, rule, newstate)
|
||||
plg.update(pos)
|
||||
end
|
||||
@ -129,7 +129,7 @@ plg.register_nodes({
|
||||
end
|
||||
end,
|
||||
on_blast = mesecon.on_blastnode,
|
||||
on_rotate = function(pos, node, user, mode)
|
||||
on_rotate = function(pos, _, user, mode)
|
||||
local abcd1 = {"A", "B", "C", "D"}
|
||||
local abcd2 = {A = 1, B = 2, C = 3, D = 4}
|
||||
local ops = {"op1", "op2", "dst"}
|
||||
|
@ -10,10 +10,10 @@ local operations = {
|
||||
-- unary: Whether this gate only has one input
|
||||
{ gate = "and", short = "&", fs_name = " AND", func = function(a, b) return a and b end },
|
||||
{ gate = "or", short = "|", fs_name = " OR", func = function(a, b) return a or b end },
|
||||
{ gate = "not", short = "~", fs_name = " NOT", func = function(a, b) return not b end, unary = true },
|
||||
{ gate = "not", short = "~", fs_name = " NOT", func = function(_, b) return not b end, unary = true },
|
||||
{ gate = "xor", short = "^", fs_name = " XOR", func = function(a, b) return a ~= b end },
|
||||
{ gate = "nand", short = "?", fs_name = "NAND", func = function(a, b) return not (a and b) end },
|
||||
{ gate = "buf", short = "_", fs_name = " =", func = function(a, b) return b end, unary = true },
|
||||
{ gate = "buf", short = "_", fs_name = " =", func = function(_, b) return b end, unary = true },
|
||||
{ gate = "xnor", short = "=", fs_name = "XNOR", func = function(a, b) return a == b end },
|
||||
{ gate = "nor", short = "!", fs_name = " NOR", func = function(a, b) return not (a or b) end },
|
||||
}
|
||||
|
Reference in New Issue
Block a user