Tweak the Luacheck configuration file and fix many warnings
This commit is contained in:
parent
daec458fc6
commit
1649f91156
39
.luacheckrc
39
.luacheckrc
@ -1,14 +1,35 @@
|
|||||||
|
std = "lua51+minetest"
|
||||||
unused_args = false
|
unused_args = false
|
||||||
allow_defined_top = true
|
allow_defined_top = true
|
||||||
|
max_line_length = 999
|
||||||
|
|
||||||
read_globals = {
|
stds.minetest = {
|
||||||
"DIR_DELIM",
|
read_globals = {
|
||||||
"minetest", "core",
|
"DIR_DELIM",
|
||||||
"dump",
|
"minetest",
|
||||||
"vector", "nodeupdate",
|
"core",
|
||||||
"VoxelManip", "VoxelArea",
|
"dump",
|
||||||
"PseudoRandom", "ItemStack",
|
"vector",
|
||||||
"intllib",
|
"nodeupdate",
|
||||||
"default",
|
"VoxelManip",
|
||||||
|
"VoxelArea",
|
||||||
|
"PseudoRandom",
|
||||||
|
"ItemStack",
|
||||||
|
"default",
|
||||||
|
table = {
|
||||||
|
fields = {
|
||||||
|
"copy",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
read_globals = {
|
||||||
|
"intllib",
|
||||||
|
"protector",
|
||||||
|
"isprotect",
|
||||||
|
"IsPlayerNodeOwner",
|
||||||
|
"HasOwner",
|
||||||
|
"getLastOwner",
|
||||||
|
"GetNodeOwnerName",
|
||||||
|
}
|
||||||
|
@ -5,8 +5,6 @@ Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
|||||||
Licensed under the zlib license. See LICENSE.md for more information.
|
Licensed under the zlib license. See LICENSE.md for more information.
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local S = moreblocks.intllib
|
|
||||||
|
|
||||||
--[[
|
--[[
|
||||||
Subset table should have the following format: (You can remove entries as needed.)
|
Subset table should have the following format: (You can remove entries as needed.)
|
||||||
|
|
||||||
@ -75,22 +73,22 @@ function register_custom_subset(subset, modname, subname, recipeitem, groups, im
|
|||||||
end
|
end
|
||||||
|
|
||||||
function stairsplus:register_custom_subset_alias(subset, modname_old, subname_old, modname_new, subname_new)
|
function stairsplus:register_custom_subset_alias(subset, modname_old, subname_old, modname_new, subname_new)
|
||||||
local subset = table.copy(subset)
|
local subset_copy = table.copy(subset)
|
||||||
for k, v in pairs(subset) do
|
for k, v in pairs(subset_copy) do
|
||||||
minetest.register_alias(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
|
minetest.register_alias(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function stairsplus:register_custom_subset_alias_force(subset, modname_old, subname_old, modname_new, subname_new)
|
function stairsplus:register_custom_subset_alias_force(subset, modname_old, subname_old, modname_new, subname_new)
|
||||||
local subset = table.copy(subset)
|
local subset_copy = table.copy(subset)
|
||||||
for k, v in pairs(subset) do
|
for k, v in pairs(subset_copy) do
|
||||||
minetest.register_alias_force(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
|
minetest.register_alias_force(modname_old .. ":" .. v[1] .. "_" .. subname_old .. v[2], modname_new .. ":" .. v[1] .. "_" .. subname_new .. v[2])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
function stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)
|
function stairsplus:register_custom_subset(subset, modname, subname, recipeitem, fields)
|
||||||
local subset = table.copy(subset)
|
local subset_copy = table.copy(subset)
|
||||||
for k, v in pairs(subset) do
|
for k, v in pairs(subset_copy) do
|
||||||
stairsplus.register_single(v[1], v[2], stairsplus.defs[v[1]][v[2]], modname, subname, recipeitem, fields)
|
stairsplus.register_single(v[1], v[2], stairsplus.defs[v[1]][v[2]], modname, subname, recipeitem, fields)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
@ -5,8 +5,6 @@ Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
|||||||
Licensed under the zlib license. See LICENSE.md for more information.
|
Licensed under the zlib license. See LICENSE.md for more information.
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local S = moreblocks.intllib
|
|
||||||
|
|
||||||
-- Node will be called <modname>:micro_<subname>
|
-- Node will be called <modname>:micro_<subname>
|
||||||
|
|
||||||
function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
function register_micro(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
|
@ -5,8 +5,6 @@ Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
|||||||
Licensed under the zlib license. See LICENSE.md for more information.
|
Licensed under the zlib license. See LICENSE.md for more information.
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local S = moreblocks.intllib
|
|
||||||
|
|
||||||
-- Node will be called <modname>:panel_<subname>
|
-- Node will be called <modname>:panel_<subname>
|
||||||
|
|
||||||
function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
|
function register_panel(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
|
@ -5,8 +5,6 @@ Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
|||||||
Licensed under the zlib license. See LICENSE.md for more information.
|
Licensed under the zlib license. See LICENSE.md for more information.
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local S = moreblocks.intllib
|
|
||||||
|
|
||||||
-- Node will be called <modname>:slope_<subname>
|
-- Node will be called <modname>:slope_<subname>
|
||||||
|
|
||||||
function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
|
function register_slope(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
|
@ -5,8 +5,6 @@ Copyright (c) 2011-2018 Hugo Locurcio and contributors.
|
|||||||
Licensed under the zlib license. See LICENSE.md for more information.
|
Licensed under the zlib license. See LICENSE.md for more information.
|
||||||
--]]
|
--]]
|
||||||
|
|
||||||
local S = moreblocks.intllib
|
|
||||||
|
|
||||||
-- Node will be called <modname>:stair_<subname>
|
-- Node will be called <modname>:stair_<subname>
|
||||||
|
|
||||||
function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
|
function register_stair(modname, subname, recipeitem, groups, images, description, drop, light)
|
||||||
|
Loading…
Reference in New Issue
Block a user