fix luaCheck
This commit is contained in:
parent
d7148727fd
commit
a615b80a22
5
api.lua
5
api.lua
|
@ -92,14 +92,13 @@ function areas:canInteract(pos, name)
|
||||||
if area.owner == name or area.open then
|
if area.owner == name or area.open then
|
||||||
return true
|
return true
|
||||||
elseif areas.factions_available and area.faction_open then
|
elseif areas.factions_available and area.faction_open then
|
||||||
local faction_name = nil
|
|
||||||
if factions.version == nil or factions.version < 2 then
|
if factions.version == nil or factions.version < 2 then
|
||||||
faction_name = factions.get_player_faction(area.owner)
|
local faction_name = factions.get_player_faction(area.owner)
|
||||||
if faction_name ~= nil and faction_name == factions.get_player_faction(name) then
|
if faction_name ~= nil and faction_name == factions.get_player_faction(name) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
factions_names = area.faction_open
|
local factions_names = area.faction_open
|
||||||
if factions_names ~= nil then
|
if factions_names ~= nil then
|
||||||
for _, fname in ipairs(factions_names) do
|
for _, fname in ipairs(factions_names) do
|
||||||
if factions.player_is_in_faction(fname, name) then
|
if factions.player_is_in_faction(fname, name) then
|
||||||
|
|
Loading…
Reference in New Issue