summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTenPlus1 <kinsellaja@yahoo.com>2017-07-13 14:36:50 +0100
committerTenPlus1 <kinsellaja@yahoo.com>2017-07-13 14:36:50 +0100
commitfc1960f5c9745e3802b37f2aa133d8ae5bff96fc (patch)
treef582a5757293e1ae29eba83c56fa382bfdd2379b
parent7fba32b8d9933dc1dbb73774f192d13d209b0746 (diff)
change mobs_spawn_protected to bool (true by default)
-rw-r--r--api.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/api.lua b/api.lua
index 359325c..a8bf523 100644
--- a/api.lua
+++ b/api.lua
@@ -48,7 +48,7 @@ local damage_enabled = minetest.setting_getbool("enable_damage")
local peaceful_only = minetest.setting_getbool("only_peaceful_mobs")
local disable_blood = minetest.setting_getbool("mobs_disable_blood")
local creative = minetest.setting_getbool("creative_mode")
-local spawn_protected = tonumber(minetest.setting_get("mobs_spawn_protected")) or 1
+local spawn_protected = minetest.setting_getbool("mobs_spawn_protected") ~= false
local remove_far = minetest.setting_getbool("remove_far_mobs")
local difficulty = tonumber(minetest.setting_get("mob_difficulty")) or 1.0
local show_health = minetest.setting_getbool("mob_show_health") ~= false
@@ -2772,7 +2772,7 @@ function mobs:spawn_specific(name, nodes, neighbors, min_light, max_light,
end
-- mobs cannot spawn in protected areas when enabled
- if spawn_protected == 1
+ if not spawn_protected
and minetest.is_protected(pos, "") then
--print ("--- inside protected area", name)
return