From a615b80a22c9d0ed51b87ce0d4dbb5a0bd0709c1 Mon Sep 17 00:00:00 2001 From: Supergoat666 <47240900+Supergoat666@users.noreply.github.com> Date: Fri, 21 Aug 2020 00:08:13 +0200 Subject: [PATCH] fix luaCheck --- api.lua | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/api.lua b/api.lua index c5b3399..5f1084c 100644 --- a/api.lua +++ b/api.lua @@ -92,14 +92,13 @@ function areas:canInteract(pos, name) if area.owner == name or area.open then return true elseif areas.factions_available and area.faction_open then - local faction_name = nil 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 return true end else - factions_names = area.faction_open + local factions_names = area.faction_open if factions_names ~= nil then for _, fname in ipairs(factions_names) do if factions.player_is_in_faction(fname, name) then