Merge pull request #2 from oversword/spawn-config
Spawn config options added
This commit is contained in:
commit
188f98478c
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
config.lua
|
24
config.lua
Normal file
24
config.lua
Normal 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
|
2
init.lua
2
init.lua
@ -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')
|
||||
|
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user