Alias usless and add old node in redefinition

This commit is contained in:
Jat 2014-03-19 06:06:34 +01:00
parent efd9866ff7
commit 9b4970622a

View File

@ -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,