From 9b4970622a1e5b65930ae776522cc2cb9012bef0 Mon Sep 17 00:00:00 2001 From: Jat Date: Wed, 19 Mar 2014 06:06:34 +0100 Subject: [PATCH] Alias usless and add old node in redefinition --- init.lua | 30 ++++++++++++------------------ 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/init.lua b/init.lua index cb7577e..a03f624 100644 --- a/init.lua +++ b/init.lua @@ -160,30 +160,24 @@ minetest.register_craft({ } }) ---Alias -minetest.register_alias("more_signs:wall_right", "arrow_signs:wall_right") -minetest.register_alias("sign_right", "arrow_signs:wall_right") - -minetest.register_alias("more_signs:wall_left", "arrow_signs:wall_left") -minetest.register_alias("sign_left", "arrow_signs:wall_left") - -minetest.register_alias("more_signs:wall_up", "arrow_signs:wall_up") -minetest.register_alias("sign_up", "arrow_signs:wall_up") - -minetest.register_alias("more_signs:wall_down", "arrow_signs:wall_down") -minetest.register_alias("sign_down", "arrow_signs:wall_down") - --Redefinition minetest.register_abm({ - nodenames = {"arrow_signs:wall_right", "arrow_signs:wall_left", "arrow_signs:wall_up", "arrow_signs:wall_down"}, + nodenames = {"arrow_signs:wall_right", "arrow_signs:wall_left", "arrow_signs:wall_up", "arrow_signs:wall_down", + "more_signs:wall_right","more_signs:wall_left","more_signs:wall_up" ,"more_signs:wall_down" + }, interval = 1, chance = 1, action = function(pos, node) local convert_facedir={ - ["arrow_signs:wall_right"]={6,4,5,11,16,14}, - ["arrow_signs:wall_left"]={8,10,9,7,12,18}, - ["arrow_signs:wall_up"]={15,19,23,21,20,22}, - ["arrow_signs:wall_down"]={17,13,1,3,0,2} + ["arrow_signs:wall_right"] = {6,4,5,11,16,14}, + ["arrow_signs:wall_left"] = {8,10,9,7,12,18}, + ["arrow_signs:wall_up"] = {15,19,23,21,20,22}, + ["arrow_signs:wall_down"] = {17,13,1,3,0,2}, + -- For old mod + ["more_signs:wall_right"] = {6,4,5,11,16,14}, + ["more_signs:wall_left"] = {8,10,9,7,12,18}, + ["more_signs:wall_up"] = {15,19,23,21,20,22}, + ["more_signs:wall_down"] = {17,13,1,3,0,2}, } minetest.swap_node(pos, {name="arrow_signs:wall",param2=convert_facedir[node.name][node.param2+1]}) end,