Fix warnings in new luacheck
This commit is contained in:
parent
6b8049f1aa
commit
e3b12312e5
3 changed files with 4 additions and 3 deletions
|
@ -9,6 +9,7 @@ exclude_files = {
|
|||
"mods/treasurer",
|
||||
}
|
||||
|
||||
ignore = {"631"}
|
||||
|
||||
globals = {
|
||||
"crafting", "vector", "table", "minetest",
|
||||
|
|
|
@ -29,7 +29,7 @@ end, {
|
|||
}
|
||||
})
|
||||
|
||||
function table.map_inplace(t, f)
|
||||
function table.map_inplace(t, f) -- luacheck: ignore
|
||||
for key, value in pairs(t) do
|
||||
t[key] = f(value)
|
||||
end
|
||||
|
|
|
@ -11,13 +11,13 @@ math.randomseed(os.time())
|
|||
random_messages = {}
|
||||
random_messages.messages = {} --This table contains all messages.
|
||||
|
||||
function table.count( t )
|
||||
function table.count( t ) -- luacheck: ignore
|
||||
local i = 0
|
||||
for k in pairs( t ) do i = i + 1 end
|
||||
return i
|
||||
end
|
||||
|
||||
function table.random( t )
|
||||
function table.random( t ) -- luacheck: ignore
|
||||
local rk = math.random( 1, table.count( t ) )
|
||||
local i = 1
|
||||
for k, v in pairs( t ) do
|
||||
|
|
Loading…
Reference in a new issue