mirror of
https://github.com/minetest-mods/areas.git
synced 2025-07-07 10:30:23 +02:00
fix remaining luacheck issues
This commit is contained in:
15
.luacheckrc
15
.luacheckrc
@ -1,5 +1,4 @@
|
|||||||
unused_args = false
|
unused_args = false
|
||||||
allow_defined_top = true
|
|
||||||
|
|
||||||
read_globals = {
|
read_globals = {
|
||||||
"DIR_DELIM",
|
"DIR_DELIM",
|
||||||
@ -10,9 +9,21 @@ read_globals = {
|
|||||||
"PseudoRandom", "ItemStack",
|
"PseudoRandom", "ItemStack",
|
||||||
"AreaStore",
|
"AreaStore",
|
||||||
"default",
|
"default",
|
||||||
|
"factions",
|
||||||
table = { fields = { "copy", "getn" } }
|
table = { fields = { "copy", "getn" } }
|
||||||
}
|
}
|
||||||
|
|
||||||
globals = {
|
globals = {
|
||||||
"minetest"
|
"minetest",
|
||||||
|
-- mod namespace
|
||||||
|
"areas",
|
||||||
|
-- legacy
|
||||||
|
"IsPlayerNodeOwner",
|
||||||
|
"GetNodeOwnerName",
|
||||||
|
"HasOwner",
|
||||||
|
"owner_defs"
|
||||||
|
}
|
||||||
|
|
||||||
|
files["legacy.lua"] = {
|
||||||
|
ignore = {"512"}
|
||||||
}
|
}
|
||||||
|
@ -294,7 +294,7 @@ if areas.factions_available then
|
|||||||
if not id then
|
if not id then
|
||||||
return false, S("Invalid usage, see /help @1.", "area_faction_open")
|
return false, S("Invalid usage, see /help @1.", "area_faction_open")
|
||||||
end
|
end
|
||||||
|
|
||||||
if not areas:isAreaOwner(id, name) then
|
if not areas:isAreaOwner(id, name) then
|
||||||
return false, S("Area @1 does not exist"
|
return false, S("Area @1 does not exist"
|
||||||
.." or is not owned by you.", id)
|
.." or is not owned by you.", id)
|
||||||
@ -386,7 +386,7 @@ minetest.register_chatcommand("area_info", {
|
|||||||
area_num = area_num + 1
|
area_num = area_num + 1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
table.insert(lines, S("You have @1 areas.", area_num))
|
table.insert(lines, S("You have @1 areas.", area_num))
|
||||||
|
|
||||||
-- Area limit
|
-- Area limit
|
||||||
local area_limit_line = privs.areas and
|
local area_limit_line = privs.areas and
|
||||||
|
Reference in New Issue
Block a user