Make treetap work with moretrees rubber tree.
authorRealBadAngel <mk@realbadangel.pl>
Wed, 29 May 2013 01:59:25 +0000 (03:59 +0200)
committerRealBadAngel <mk@realbadangel.pl>
Wed, 29 May 2013 01:59:25 +0000 (03:59 +0200)
Add moretrees as dependency

technic/depends.txt
technic/tree_tap.lua

index 3859f8ae732e41820626dda804f97f39ef8c6daa..7d2e8c3f365521a6c0c59619bb953b736fe9edc2 100644 (file)
@@ -2,3 +2,4 @@ default
 moreores
 pipeworks
 mesecons
+moretrees
index 107faedd40fea52c096a17a0e925daddedee1c58..9d805d52c6d00bb41cd0d69d3de54ea49359859a 100644 (file)
@@ -7,7 +7,8 @@
                             local pos=minetest.get_pointed_thing_position(pointed_thing,above)
                             local node=minetest.env:get_node(pos)
                             local node_name=node.name
-                            if node_name == "farming_plus:rubber_tree_full" or node_name == "farming:rubber_tree_full" or node_name == "technic:rubber_tree_full" then
+                            if node_name == "moretrees:rubber_tree_trunk" then
+                                    node.name = "moretrees:rubber_tree_trunk_empty"
                                     user:get_inventory():add_item("main",ItemStack("technic:raw_latex"))
                                     minetest.env:set_node(pos,node)
                                     local item=itemstack:to_table()
             description = "Rubber Fiber",
             inventory_image = "technic_rubber.png",
     })
+
+minetest.register_abm({
+       nodenames = {"moretrees:rubber_tree_trunk_empty"},
+       interval = 60,
+       chance = 15,
+       action = function(pos, node)
+               node.name = "moretrees:rubber_tree_trunk"
+               minetest.env:set_node(pos, node)
+       end
+})