fixed error with mymonths check.
parent
f65aca7e29
commit
d448fa3391
|
@ -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 can_replace = minetest.find_nodes_in_area(pos0, pos1, replacing)
|
||||||
local replace_num = #can_replace
|
local replace_num = #can_replace
|
||||||
if replace_num >= needed_air then --increase to decrease number of plants.
|
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)
|
local face_ran = math.random(0,3)
|
||||||
minetest.set_node(location, {name = nodename, param2 = face_ran})
|
minetest.set_node(location, {name = nodename, param2 = face_ran})
|
||||||
end
|
end
|
||||||
|
|
3
init.lua
3
init.lua
|
@ -1,7 +1,8 @@
|
||||||
desert_life = {}
|
desert_life = {}
|
||||||
|
|
||||||
if minetest.get_modpath('mymonths') then
|
if minetest.get_modpath('mymonths') then
|
||||||
desert_life_bloom = true
|
desert_life.bloom = true
|
||||||
|
print 'mymonths is here, lets make things bloom.'
|
||||||
end
|
end
|
||||||
|
|
||||||
dofile(minetest.get_modpath('desert_life')..'/functions.lua')
|
dofile(minetest.get_modpath('desert_life')..'/functions.lua')
|
||||||
|
|
|
@ -74,7 +74,7 @@ for i in ipairs (prickly_pear_table) do
|
||||||
end
|
end
|
||||||
})
|
})
|
||||||
|
|
||||||
if desert_life_bloom == true then
|
if desert_life.bloom == true then
|
||||||
minetest.register_node('desert_life:prickly_pear_'..num..'_bloom', {
|
minetest.register_node('desert_life:prickly_pear_'..num..'_bloom', {
|
||||||
description = 'Blooming Prickly Pear',
|
description = 'Blooming Prickly Pear',
|
||||||
drawtype = 'mesh',
|
drawtype = 'mesh',
|
||||||
|
@ -178,7 +178,8 @@ minetest.register_abm{
|
||||||
end,
|
end,
|
||||||
}
|
}
|
||||||
|
|
||||||
if desert_life_bloom == true then
|
if desert_life.bloom == true then
|
||||||
|
print 'mymonths is enabled.'
|
||||||
minetest.register_abm{
|
minetest.register_abm{
|
||||||
nodenames = {"group:dl_pp"},
|
nodenames = {"group:dl_pp"},
|
||||||
interval = 1,
|
interval = 1,
|
||||||
|
|
Loading…
Reference in New Issue