summaryrefslogtreecommitdiff
path: root/technic_worldgen/rubber.lua
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2014-08-13 23:13:52 +0100
committerZefram <zefram@fysh.org>2014-08-13 23:13:52 +0100
commit3b16a2858f83140601abfc05515529d0bf60ddfa (patch)
treec909336c4de28f94f92776a3611f16bbdef462f1 /technic_worldgen/rubber.lua
parentb001a679799bdc7d08eabcd1300271d0e1357b0a (diff)
Revise rules for regenerating latex
To ensure that only rubber tree trunk nodes that are part of trees regenerate, rather than those that are used as building blocks, check that they are sufficiently close to rubber tree leaves. This replaces the older rule that naturally-grown trunks regenerate (regardless of leaves) and manually-placed trunks don't (even though manually building a tree otherwise works). The detection of manually-placed trunks was in any case broken for users of moretrees, because that mod fails to set the flag signalling manual placement. Incidentally also fix a bug that caused rubber tree branches (horizontal trunk nodes) to turn vertical when regenerating latex. Rather than set the complete node structure, only switch the type name, as does the tree tap when emptying the node.
Diffstat (limited to 'technic_worldgen/rubber.lua')
-rw-r--r--technic_worldgen/rubber.lua8
1 files changed, 0 insertions, 8 deletions
diff --git a/technic_worldgen/rubber.lua b/technic_worldgen/rubber.lua
index f04be84..93b6d66 100644
--- a/technic_worldgen/rubber.lua
+++ b/technic_worldgen/rubber.lua
@@ -27,10 +27,6 @@ minetest.register_node(":moretrees:rubber_tree_trunk", {
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2},
sounds = default.node_sound_wood_defaults(),
- after_place_node = function(pos, placer, itemstack)
- local meta = minetest.get_meta(pos)
- meta:set_int("placed", 1)
- end,
})
minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
@@ -40,10 +36,6 @@ minetest.register_node(":moretrees:rubber_tree_trunk_empty", {
groups = {tree=1, snappy=1, choppy=2, oddly_breakable_by_hand=1,
flammable=2, not_in_creative_inventory=1},
sounds = default.node_sound_wood_defaults(),
- after_place_node = function(pos, placer, itemstack)
- local meta = minetest.get_meta(pos)
- meta:set_int("placed", 1)
- end,
})
minetest.register_node(":moretrees:rubber_tree_leaves", {