1
0
mirror of https://github.com/sys4-fr/server-nalc.git synced 2024-11-16 15:30:30 +01:00

fixed mobs.protected disabled when "mobs_spawn_protected" not in minetest.conf

This commit is contained in:
crabman77 2015-07-26 16:48:59 +02:00
parent ec05e1a14c
commit 99b2c31b9a

View File

@ -9,7 +9,7 @@ mobs.protected = 1
local damage_enabled = minetest.setting_getbool("enable_damage") local damage_enabled = minetest.setting_getbool("enable_damage")
local peaceful_only = minetest.setting_getbool("only_peaceful_mobs") local peaceful_only = minetest.setting_getbool("only_peaceful_mobs")
local enable_blood = minetest.setting_getbool("mobs_enable_blood") or true local enable_blood = minetest.setting_getbool("mobs_enable_blood") or true
mobs.protected = tonumber(minetest.setting_get("mobs_spawn_protected")) or 0 mobs.protected = tonumber(minetest.setting_get("mobs_spawn_protected")) or mobs.protected
function mobs:register_mob(name, def) function mobs:register_mob(name, def)
minetest.register_entity(name, { minetest.register_entity(name, {