mirror of
https://github.com/minetest-mods/areas.git
synced 2025-07-07 10:30:23 +02:00
Remove factions.version check if it is not necessary to allow opening for multiple factions to every version of playerfactions
This commit is contained in:
10
api.lua
10
api.lua
@ -93,9 +93,13 @@ function areas:canInteract(pos, name)
|
||||
return true
|
||||
elseif areas.factions_available and area.faction_open then
|
||||
if (factions.version or 0) < 2 then
|
||||
local faction_name = factions.get_player_faction(area.owner)
|
||||
if faction_name ~= nil and faction_name == factions.get_player_faction(name) then
|
||||
return true
|
||||
local faction_name = factions.get_player_faction(name)
|
||||
if faction_name then
|
||||
for _, fname in ipairs(area.faction_open or {}) do
|
||||
if faction_name == fname then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
else
|
||||
for _, fname in ipairs(area.faction_open or {}) do
|
||||
|
Reference in New Issue
Block a user