Spawn config options added

master^2
Cam B 2020-01-25 00:42:03 +00:00
parent d448fa3391
commit 8c12363909
4 changed files with 30 additions and 3 deletions

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
config.lua

24
config.lua Normal file
View File

@ -0,0 +1,24 @@
--[[ DEFAULTS: --
spawn_on = {"group:soil", "group:stone"},
spawn_near = {"air"},
spawn_min_light = 0,
spawn_max_light = 15,
spawn_interval = 30,
spawn_chance = 5000,
spawn_active_object_count = 1,
spawn_min_height = -31000,
spawn_max_height = 31000,
]]
local config = {}
config.spawn_enabled_ostrich = true
config.spawn_on_ostrich = {"default:desert_sand", "default:desert_stone"}
config.spawn_max_light_ostrich = 20
config.spawn_min_light_ostrich = 10
config.spawn_chance_ostrich = 1500
config.spawn_active_object_count_ostrich = 1
config.spawn_max_height_ostrich = 31000
global_desert_life = config

View File

@ -5,6 +5,8 @@ if minetest.get_modpath('mymonths') then
print 'mymonths is here, lets make things bloom.'
end
dofile(minetest.get_modpath('desert_life').."/config.lua") -- Oversword
dofile(minetest.get_modpath('desert_life')..'/functions.lua')
dofile(minetest.get_modpath('desert_life')..'/prickly_pear.lua')
dofile(minetest.get_modpath('desert_life')..'/barrel_cacti.lua')

View File

@ -54,8 +54,8 @@ mobs:register_mob("desert_life:ostrich", {
replace_with = 'air',
replace_rate = 1,
})
mobs:register_spawn("desert_life:ostrich",
{"default:desert_sand", "default:desert_stone"}, 20, 10, 1500, 1, 31000, true)
if global_desert_life.spawn_enabled_ostrich then
mobs:register_spawn("desert_life:ostrich", global_desert_life.spawn_on_ostrich, global_desert_life.spawn_max_light_ostrich, global_desert_life.spawn_min_light_ostrich, global_desert_life.spawn_chance_ostrich, global_desert_life.spawn_active_object_count_ostrich, global_desert_life.spawn_max_height_ostrich, true)
end
mobs:register_egg("desert_life:ostrich", S("Ostrich"), "dl_ostrich_inv.png", 0)