summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Stevenson <everamzah@gmail.com>2016-09-09 10:52:38 -0400
committerJames Stevenson <everamzah@gmail.com>2016-09-09 10:52:38 -0400
commit877ef09eedba7663b2c8e5be1e017499a6ffd5c0 (patch)
treef089dd3b428450cea8104cdbf7c46837b36d8a78
parent2d68136604d6e78ea7d0ecf6fc2418a1d281a332 (diff)
PvP by Default default false.
-rw-r--r--init.lua5
-rw-r--r--settingtypes.txt2
2 files changed, 2 insertions, 5 deletions
diff --git a/init.lua b/init.lua
index 3859448..9c6268e 100644
--- a/init.lua
+++ b/init.lua
@@ -8,10 +8,7 @@ local pvp_areas_modname = minetest.get_current_modname()
local pvp_areas_store = AreaStore()
pvp_areas_store:from_file(pvp_areas_worlddir .. "/pvp_areas_store.dat")
-local pvp_default = minetest.setting_getbool("pvp_areas_enable_pvp")
-if pvp_default == nil then
- pvp_default = true
-end
+local pvp_default = minetest.is_yes(minetest.setting_getbool("pvp_areas_enable_pvp"))
minetest.log("action", "[" .. pvp_areas_modname .. "] PvP by Default: " .. tostring(pvp_default))
local pvp_areas_players = {}
diff --git a/settingtypes.txt b/settingtypes.txt
index 213d74f..d0c30d5 100644
--- a/settingtypes.txt
+++ b/settingtypes.txt
@@ -1,2 +1,2 @@
# Allow PvP by default.
-pvp_areas_enable_pvp (PvP by Default) bool true
+pvp_areas_enable_pvp (PvP by Default) bool false