From 02bfcae53db8d3b2c9bc03348db3bb6d9f7b95dc Mon Sep 17 00:00:00 2001
From: hdastwb <hdastwb@hdastwb.heliohost.org>
Date: Thu, 27 Jun 2013 14:08:51 -0400
Subject: [PATCH] Add support for walkable plants
---
mods/farming/init.lua | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/mods/farming/init.lua b/mods/farming/init.lua
index 3c37801..9508596 100644
--- a/mods/farming/init.lua
+++ b/mods/farming/init.lua
@@ -30,7 +30,10 @@ 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
+ minetest.get_item_group(nn, "plant") == 0
+ then
minetest.set_node(pos, {name="default:dirt"})
end
-- check if there is water nearby