mirror of
https://github.com/minetest-mods/areas.git
synced 2025-07-06 01:50:23 +02:00
Add factions support
This commit is contained in:
5
api.lua
5
api.lua
@ -94,6 +94,11 @@ function areas:canInteract(pos, name)
|
||||
for _, area in pairs(self:getAreasAtPos(pos)) do
|
||||
if area.owner == name or area.open then
|
||||
return true
|
||||
elseif factions 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
|
||||
end
|
||||
else
|
||||
owned = true
|
||||
end
|
||||
|
Reference in New Issue
Block a user