added an exception to the solid node condition in reverting soil to dirt

This will make it possible to grow solid plants such as pumpkins (with the addition of a plant group to their specification).
This commit is contained in:
hdastwb 2013-06-27 14:08:51 -04:00
parent c4bb058421
commit 64a7c9402e

View file

@ -30,7 +30,7 @@ minetest.register_abm({
pos.y = pos.y+1
local nn = minetest.get_node(pos).name
pos.y = pos.y-1
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].walkable then
if minetest.registered_nodes[nn] and minetest.registered_nodes[nn].walkable and not minetest.registered_nodes[nn].groups.plant then
minetest.set_node(pos, {name="default:dirt"})
end
-- check if there is water nearby