Destroy L-system tree sapling on dig

This is an intermediate solution to this problem:
After digging a sapling, the metadata is lost
and when it is placed again, it won't grow a tree.
It is considered safer to not drop anything at all
instead to prevent buggy behaviour.

A better solution may be found later.
master
Wuzzy 2014-07-26 23:22:09 +02:00
parent 33a8efbf25
commit dad2adc297
1 changed files with 1 additions and 0 deletions

View File

@ -33,6 +33,7 @@ minetest.register_node("ltool:sapling", {
walkable = false,
buildable_to = true,
groups = { dig_immediate = 3, not_in_creative_inventory=1 },
drop = "",
after_place_node = function(pos, placer, itemstack, pointed_thing)
-- Transfer metadata and start timer
local nodemeta = minetest.get_meta(pos)