Update factions.lua

This commit is contained in:
agrecascino 2016-08-19 22:48:52 -04:00 committed by GitHub
parent c75e6baf5d
commit fca049d379

View File

@ -770,6 +770,7 @@ minetest.register_on_respawnplayer(
local default_is_protected = minetest.is_protected local default_is_protected = minetest.is_protected
minetest.is_protected = function(pos, player) minetest.is_protected = function(pos, player)
if pos.y < factions.protection_max_depth then if pos.y < factions.protection_max_depth then
@ -798,25 +799,14 @@ minetest.is_protected = function(pos, player)
-- no faction -- no faction
if not parcel_faction then if not parcel_faction then
return default_is_protected(pos, player) return default_is_protected(pos, player)
<<<<<<< HEAD
elseif not player_faction then
return true
else
if not not player_faction then
=======
elseif player_faction then elseif player_faction then
>>>>>>> 4d53e4cc4017fc499bf9c966cd3a6de5cacbe0e8
if parcel_faction.name == player_faction.name then if parcel_faction.name == player_faction.name then
return not parcel_faction:has_permission(player, "build") return not parcel_faction:has_permission(player, "build")
else else
return not parcel_faction:parcel_is_attacked_by(parcelpos, player_faction) return not parcel_faction:parcel_is_attacked_by(parcelpos, player_faction)
end end
<<<<<<< HEAD
end
=======
else else
return true return true
>>>>>>> 4d53e4cc4017fc499bf9c966cd3a6de5cacbe0e8
end end
end end