Remove duplicate ABM
authorShadowNinja <shadowninja@minetest.net>
Tue, 17 Dec 2013 19:24:06 +0000 (14:24 -0500)
committerShadowNinja <shadowninja@minetest.net>
Tue, 17 Dec 2013 19:24:06 +0000 (14:24 -0500)
technic/tools/tree_tap.lua
technic_worldgen/rubber.lua

index ab539551aa3ebeb41b4bb8441cb7b6a777cb7a35..3e6b6740ae91c038716ab3eab17395a43b606bad 100644 (file)
@@ -65,8 +65,11 @@ minetest.register_abm({
        interval = 60,
        chance = 15,
        action = function(pos, node)
-               node.name = "moretrees:rubber_tree_trunk"
-               minetest.set_node(pos, node)
+               local meta = minetest.get_meta(pos)
+               if meta:get_int("placed") ~= 0 then
+                       return
+               end
+               minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"})
        end
 })
 
index e47ba514c9e43e7740f0f2514724fc16cd1a9f0e..0e6d18221297705306706abacef102dd7d85d47c 100644 (file)
@@ -44,19 +44,6 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
        end,
 })
 
-minetest.register_abm({
-       nodenames = {"moretrees:rubber_tree_trunk_empty"},
-       interval = 60,
-       chance = 15,
-       action = function(pos, node)
-               local meta = minetest.get_meta(pos)
-               if meta:get_int("placed") ~= 0 then
-                       return
-               end
-               minetest.set_node(pos, {name="moretrees:rubber_tree_trunk"})
-       end
-})
-
 minetest.register_node(":moretrees:rubber_tree_leaves", {
        drawtype = "allfaces_optional",
        tiles = {"technic_rubber_leaves.png"},