forked from mtcontrib/factions
Better args for protection style.
This commit is contained in:
parent
279d51037b
commit
67494969a3
@ -20,7 +20,7 @@ factions_config.protection_depth_height_limit = minetest.settings:get_bool("prot
|
|||||||
factions_config.enable_power_per_player = minetest.settings:get_bool("power_per_playerb") or true
|
factions_config.enable_power_per_player = minetest.settings:get_bool("power_per_playerb") or true
|
||||||
factions_config.attack_parcel = minetest.settings:get_bool("attack_parcel") or false
|
factions_config.attack_parcel = minetest.settings:get_bool("attack_parcel") or false
|
||||||
factions_config.faction_diplomacy = minetest.settings:get_bool("faction_diplomacy") or false
|
factions_config.faction_diplomacy = minetest.settings:get_bool("faction_diplomacy") or false
|
||||||
factions_config.protection_style = minetest.settings:get("protection_style") or "classic"
|
factions_config.protection_style = minetest.settings:get("protection_style") or "2d"
|
||||||
--[[
|
--[[
|
||||||
factions_config.protection_max_depth = -512
|
factions_config.protection_max_depth = -512
|
||||||
factions_config.protection_max_height = 10000
|
factions_config.protection_max_height = 10000
|
||||||
@ -42,5 +42,5 @@ factions_config.protection_depth_height_limit = true
|
|||||||
factions_config.enable_power_per_player = true
|
factions_config.enable_power_per_player = true
|
||||||
factions_config.attack_parcel = false
|
factions_config.attack_parcel = false
|
||||||
factions_config.faction_diplomacy = false
|
factions_config.faction_diplomacy = false
|
||||||
factions_config.protection_style = "classic"
|
factions_config.protection_style = "2d"
|
||||||
--]]
|
--]]
|
@ -670,9 +670,9 @@ function factions.Faction.on_revoke_invite(self, player)
|
|||||||
end
|
end
|
||||||
|
|
||||||
function factions.get_parcel_pos(pos)
|
function factions.get_parcel_pos(pos)
|
||||||
if factions_config.protection_style == "classic" then
|
if factions_config.protection_style == "2d" then
|
||||||
return math.floor(pos.x / factions_config.parcel_size)..","..math.floor(pos.z / factions_config.parcel_size)
|
return math.floor(pos.x / factions_config.parcel_size)..","..math.floor(pos.z / factions_config.parcel_size)
|
||||||
elseif factions_config.protection_style == "pb-style" then
|
elseif factions_config.protection_style == "3d" then
|
||||||
return math.floor(pos.x / factions_config.parcel_size)..","..math.floor(pos.y / factions_config.parcel_size)..","..math.floor(pos.z / factions_config.parcel_size)
|
return math.floor(pos.x / factions_config.parcel_size)..","..math.floor(pos.y / factions_config.parcel_size)..","..math.floor(pos.z / factions_config.parcel_size)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -45,5 +45,5 @@ faction_diplomacy (Enable faction diplomacy) bool false
|
|||||||
protection_depth_height_limit (Enable protection depth height limit) bool true
|
protection_depth_height_limit (Enable protection depth height limit) bool true
|
||||||
|
|
||||||
[StringSettings]
|
[StringSettings]
|
||||||
# Set the way that the parcel protection works (classic,pb-style).
|
# Set the way that the parcel protection works (2d,3d). 2d limits how far x and z can go but protection on the y goes up and down far. 3d limits all three axis.
|
||||||
protection_style (Protection style) string classic
|
protection_style (Protection style) string 2d
|
Loading…
Reference in New Issue
Block a user