1
0
mirror of https://codeberg.org/tenplus1/mobs_redo.git synced 2024-12-25 10:10:21 +01:00

change mobs_spawn_protected to bool (true by default)

This commit is contained in:
TenPlus1 2017-07-13 14:36:50 +01:00
parent 7fba32b8d9
commit fc1960f5c9

View File

@ -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