sfan5 wrote:Mod moved back, because Forum guidelines not followed
mauvebic wrote:(...)You could always write an ABM to get rid of the nodes too. But there isn't a huge difference between both versions
minetest.register_abm({
nodenames = {"hydroponics:wild_"..plant.name},
interval = 0,
chance = 1,
action = function(pos)
minetest.env:remove_node(pos)
end
})
-- Removing old wildplants
minetest.register_abm({
nodenames = {"hydroponics:wild_habanero"},
interval = 0,
chance = 1,
action = function(pos)
minetest.env:remove_node(pos)
end
})
minetest.register_abm({
nodenames = {"hydroponics:wild_peas"},
interval = 0,
chance = 1,
action = function(pos)
minetest.env:remove_node(pos)
end
})
minetest.register_abm({
nodenames = {"hydroponics:wild_tomato"},
interval = 0,
chance = 1,
action = function(pos)
minetest.env:remove_node(pos)
end
})
plants = {
tomato = {name='tomato',growtype='tall'},
peas = {name='peas',growtype='tall'},
habanero = {name='habanero',growtype='tall'},
}
Users browsing this forum: No registered users and 55 guests