Compare commits
5 Commits
d13da31cac
...
188f98478c
Author | SHA1 | Date |
---|---|---|
Nathan Salapat | 188f98478c | |
Cam B | 106ade57dd | |
Cam B | 8c12363909 | |
NathanSalapat | d448fa3391 | |
NathanSalapat | f65aca7e29 |
|
@ -0,0 +1 @@
|
|||
config.lua
|
|
@ -74,8 +74,8 @@ minetest.register_decoration({
|
|||
|
||||
minetest.register_abm{
|
||||
nodenames = {"group:dl_bc"},
|
||||
interval = 1,
|
||||
chance = 1,
|
||||
interval = 40,
|
||||
chance = 30,
|
||||
action = function(pos)
|
||||
local node = minetest.get_node(pos)
|
||||
if node.name == 'desert_life:barrel_cacti_1_sp' then
|
||||
|
|
|
@ -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
|
|
@ -43,7 +43,6 @@ function desert_life.spread(nodename, pos, spread, undernode, replacing, needed_
|
|||
local can_replace = minetest.find_nodes_in_area(pos0, pos1, replacing)
|
||||
local replace_num = #can_replace
|
||||
if replace_num >= needed_air then --increase to decrease number of plants.
|
||||
print ('spreading plant because found '..replace_num..' of '..needed_air..' air.')
|
||||
local face_ran = math.random(0,3)
|
||||
minetest.set_node(location, {name = nodename, param2 = face_ran})
|
||||
end
|
||||
|
|
5
init.lua
5
init.lua
|
@ -1,9 +1,12 @@
|
|||
desert_life = {}
|
||||
|
||||
if minetest.get_modpath('mymonths') then
|
||||
desert_life_bloom = true
|
||||
desert_life.bloom = true
|
||||
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)
|
||||
|
|
|
@ -74,7 +74,7 @@ for i in ipairs (prickly_pear_table) do
|
|||
end
|
||||
})
|
||||
|
||||
if desert_life_bloom == true then
|
||||
if desert_life.bloom == true then
|
||||
minetest.register_node('desert_life:prickly_pear_'..num..'_bloom', {
|
||||
description = 'Blooming Prickly Pear',
|
||||
drawtype = 'mesh',
|
||||
|
@ -178,7 +178,8 @@ minetest.register_abm{
|
|||
end,
|
||||
}
|
||||
|
||||
if desert_life_bloom == true then
|
||||
if desert_life.bloom == true then
|
||||
print 'mymonths is enabled.'
|
||||
minetest.register_abm{
|
||||
nodenames = {"group:dl_pp"},
|
||||
interval = 1,
|
||||
|
|
Loading…
Reference in New Issue