summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRealBadAngel <mk@realbadangel.pl>2013-05-29 03:59:25 +0200
committerRealBadAngel <mk@realbadangel.pl>2013-05-29 03:59:25 +0200
commit77254735e4a533bcce90e579f56fbae2c3c34359 (patch)
treed9f61afa0aebd9a15822c55cca019c5ef238b02f
parent0d81a3f42a96378ab0fa4d34737ad99de19b2f66 (diff)
Make treetap work with moretrees rubber tree.
Add moretrees as dependency
-rw-r--r--technic/depends.txt1
-rw-r--r--technic/tree_tap.lua13
2 files changed, 13 insertions, 1 deletions
diff --git a/technic/depends.txt b/technic/depends.txt
index 3859f8a..7d2e8c3 100644
--- a/technic/depends.txt
+++ b/technic/depends.txt
@@ -2,3 +2,4 @@ default
moreores
pipeworks
mesecons
+moretrees
diff --git a/technic/tree_tap.lua b/technic/tree_tap.lua
index 107faed..9d805d5 100644
--- a/technic/tree_tap.lua
+++ b/technic/tree_tap.lua
@@ -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()
@@ -47,3 +48,13 @@
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
+})