From c41195acc8c02f1899e7435e91fce2ec52df30a5 Mon Sep 17 00:00:00 2001 From: Vanessa Ezekowitz Date: Fri, 26 Apr 2013 20:12:22 -0400 Subject: [PATCH] deleted sideways, empty rubber tree trunk, added conversion abm for it --- node_defs.lua | 25 ++++++++++--------------- 1 file 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. -- 2.30.2