yl_spawnit/mobs_ghost_redo.lua

46 lines
1.2 KiB
Lua

local ghost_bones_only = minetest.settings:get_bool("mobs_ghost_redo_bones_only", false)
if ghost_bones_only then
spawnit.register({
entity_name = "mobs_ghost_redo:ghost",
groups = { monster = 1 },
chance = yl_spawnit.base_chance,
within = { "not walkable" },
on = { "any" },
near = { "bones:bones" },
max_node_light = 10,
max_in_area = 2,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
else
spawnit.register({
entity_name = "mobs_ghost_redo:ghost",
groups = { monster = 1 },
chance = yl_spawnit.base_chance * 3,
within = { "not walkable" },
on = { "any" },
near = { "any" },
max_node_light = 10,
max_in_area = 2,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
spawnit.register({
entity_name = "mobs_ghost_redo:ghost",
groups = { monster = 1 },
chance = yl_spawnit.base_chance * 3,
within = { "not walkable" },
on = { "any" },
near = { "bones:bones" },
max_node_light = 10,
max_in_area = 4,
max_any_in_area = 6,
min_player_distance = 12,
spawn_in_protected = false,
}, yl_spawnit.settings.check_nodes)
end