deleted sideways, empty rubber tree trunk, added conversion abm for it
authorVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Sat, 27 Apr 2013 00:12:22 +0000 (20:12 -0400)
committerVanessa Ezekowitz <vanessaezekowitz@gmail.com>
Sat, 27 Apr 2013 00:12:22 +0000 (20:12 -0400)
node_defs.lua

index a0523dcba033149d403d4eee993afb06d349655d..651e0cff73a84c5a994c6548ab148c9d6c3c3162 100644 (file)
@@ -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.