Add a metadata flag that's set when an empty rubber tree is placed in
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 27 Nov 2013 22:23:15 +0000 (17:23 -0500)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Wed, 27 Nov 2013 22:23:15 +0000 (17:23 -0500)
the world (keeps it from regrowing into a full one)

node_defs.lua

index d9e04794e5cfd14627c74e96479cc3f471b8eba6..1e9bf426518d11712702e95fb139222f7b3e3e95 100644 (file)
@@ -451,6 +451,8 @@ minetest.register_node("moretrees:rubber_tree_trunk_empty", {
                if not moretrees:node_is_owned(pos, placer) then
                        minetest.rotate_and_place(itemstack, placer, pointed_thing,
                                moretrees.expect_infinite_stacks, { invert_wall = keys.sneak })
+                       local meta = minetest.get_meta(pos)
+                       meta:set_int("placed", 1)
                end
                return itemstack
        end