From: ShadowNinja Date: Tue, 17 Dec 2013 19:24:06 +0000 (-0500) Subject: Remove duplicate ABM X-Git-Url: http://81.2.79.47:8989/gitweb/?a=commitdiff_plain;h=64db3d14d894396580972cb2b6bb3a79befdd1c0;p=zefram%2Fminetest%2Ftechnic.git Remove duplicate ABM --- diff --git a/technic/tools/tree_tap.lua b/technic/tools/tree_tap.lua index ab53955..3e6b674 100644 --- a/technic/tools/tree_tap.lua +++ b/technic/tools/tree_tap.lua @@ -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 }) diff --git a/technic_worldgen/rubber.lua b/technic_worldgen/rubber.lua index e47ba51..0e6d182 100644 --- a/technic_worldgen/rubber.lua +++ b/technic_worldgen/rubber.lua @@ -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"},