summaryrefslogtreecommitdiff
path: root/node_defs.lua
diff options
context:
space:
mode:
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-04-26 20:12:22 -0400
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>2013-04-26 20:12:22 -0400
commitc41195acc8c02f1899e7435e91fce2ec52df30a5 (patch)
tree0f4226f671a44da1cc5c11fd3c9f86e20dbca9f5 /node_defs.lua
parentae09c948ff25503ef6bb7a32d354d21fc0f161d2 (diff)
deleted sideways, empty rubber tree trunk, added conversion abm for it
Diffstat (limited to 'node_defs.lua')
-rw-r--r--node_defs.lua25
1 files changed, 10 insertions, 15 deletions
diff --git a/node_defs.lua b/node_defs.lua
index a0523dc..651e0cf 100644
--- a/node_defs.lua
+++ b/node_defs.lua
@@ -229,24 +229,19 @@ minetest.register_node("moretrees:rubber_tree_trunk_empty", {
is_ground_content = true,
groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
sounds = default.node_sound_wood_defaults(),
-})
-
-minetest.register_node("moretrees:rubber_tree_trunk_empty_sideways", {
- description = "Sideways Rubber Tree Trunk (Empty)",
- tiles = {
- "moretrees_rubber_tree_trunk_empty.png^[transformR90",
- "moretrees_rubber_tree_trunk_empty.png^[transformR90",
- "moretrees_rubber_tree_trunk_top.png",
- "moretrees_rubber_tree_trunk_top.png",
- "moretrees_rubber_tree_trunk_empty.png^[transformR90",
- "moretrees_rubber_tree_trunk_empty.png^[transformR90"
- },
- is_ground_content = true,
- groups = {tree=1,snappy=1,choppy=2,oddly_breakable_by_hand=1,flammable=2},
- sounds = default.node_sound_wood_defaults(),
paramtype2 = "facedir",
})
+minetest.register_abm({
+ nodenames = { "moretrees:rubber_tree_trunk_empty_sideways" },
+ interval = 1,
+ chance = 1,
+ action = function(pos, node, active_object_count, active_object_count_wider)
+ local fdir = node.param2 or 0
+ nfdir = dirs2[fdir+1]
+ minetest.env:add_node(pos, {name = "moretrees:rubber_tree_trunk_empty", param2 = nfdir})
+ end,
+})
-- For compatibility with old nodes and recently-changed nodes.