Strange ABM problem again

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

Strange ABM problem again

by neko259 » Sat Dec 08, 2012 16:46

In my nature mod, there is an ABM for trees growing and blossoming. You can see its code here: https://bitbucket.org/neko259/nature/src/92628d00968229c64b506438c3f321129dda66fd/nature/tree_growth.lua?at=default

It's intended to work on every 20th block of leaves in the area. But when I come to an area with trees, they grow infinitely up (well, not infinitely, just to the ABM distance), just like every new spawn block triggers the ABM on itself. So, it seems to work like this:

1. A leaf grows into a trunk.
2. The new trunk is surrounded by new leaves.
3. The upper new leaf grows into a new trunk, go to 1)

And so on. How can I prevent the newly grown nodes from growing again?
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Sat Dec 08, 2012 17:13

give them metadata
If you can think it, you can make it.
 

User avatar
neko259
Member
 
Posts: 769
Joined: Sun Jun 19, 2011 06:51

by neko259 » Sat Dec 08, 2012 17:18

Already suggested on the IRC, thanks :)
Bitcoin donations: 18r66dJmUjwTmWRTFnorpGMzs8d4B8jzbw
 


Return to Minetest Problems

Who is online

Users browsing this forum: No registered users and 9 guests

cron