fixed error with mymonths check.

master
NathanSalapat 2017-01-01 14:39:10 -06:00
parent f65aca7e29
commit d448fa3391
3 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -1,7 +1,8 @@
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')..'/functions.lua')

View File

@ -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,