projects
/
oweals
/
minetest_game.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9bbde07
)
Add support for walkable plants
author
hdastwb
<hdastwb@hdastwb.heliohost.org>
Thu, 27 Jun 2013 18:08:51 +0000
(14:08 -0400)
committer
PilzAdam
<pilzadam@minetest.net>
Thu, 11 Jul 2013 00:44:37 +0000
(
02:44
+0200)
mods/farming/init.lua
patch
|
blob
|
history
diff --git
a/mods/farming/init.lua
b/mods/farming/init.lua
index 3c378015658afcfd957f37030b0469f5d35d4ab0..9508596e550be3f86e4584727b280b8773e5f507 100644
(file)
--- 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