diff --git a/config.lua b/config.lua index 5507573..8054b44 100644 --- a/config.lua +++ b/config.lua @@ -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.attack_parcel = minetest.settings:get_bool("attack_parcel") 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_height = 10000 @@ -42,5 +42,5 @@ factions_config.protection_depth_height_limit = true factions_config.enable_power_per_player = true factions_config.attack_parcel = false factions_config.faction_diplomacy = false -factions_config.protection_style = "classic" +factions_config.protection_style = "2d" --]] \ No newline at end of file diff --git a/factions.lua b/factions.lua index 686f2f5..74e69d2 100644 --- a/factions.lua +++ b/factions.lua @@ -670,9 +670,9 @@ function factions.Faction.on_revoke_invite(self, player) end 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) - 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) end end diff --git a/settingtypes.txt b/settingtypes.txt index 8b93c79..d214535 100644 --- a/settingtypes.txt +++ b/settingtypes.txt @@ -45,5 +45,5 @@ faction_diplomacy (Enable faction diplomacy) bool false protection_depth_height_limit (Enable protection depth height limit) bool true [StringSettings] -# Set the way that the parcel protection works (classic,pb-style). -protection_style (Protection style) string classic \ No newline at end of file +# 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 2d \ No newline at end of file