aliases.lua 2.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. -- The following function where taken out of moreblocks, and is licenced under zlib license
  2. -- Modified to fit into darkage purpose
  3. -- Thats the realy old conversation of stairsplus. some of them may be never used in darkage. comment them out.
  4. local function register_stairsplus_alias(origin, new)
  5. local originmod = origin:split(":")[1]
  6. local originnode = origin:split(":")[2]
  7. local newmod = new:split(":")[1]
  8. local newnode = new:split(":")[2]
  9. local ra = minetest.register_alias
  10. ra(originmod.. ":slab_" ..originnode, newmod..":slab_" ..newnode)
  11. ra(originmod.. ":slab_" ..originnode.. "_quarter", newmod..":slab_" ..newnode.. "_quarter")
  12. ra(originmod.. ":slab_" ..originnode.. "_three_quarter", newmod..":slab_" ..newnode.. "_three_quarter")
  13. ra(originmod.. ":stair_" ..originnode, newmod..":stair_" ..newnode)
  14. ra(originmod.. ":stair_" ..originnode.. "_inverted", newmod..":stair_" ..newnode)
  15. ra(originmod.. ":stair_" ..originnode.. "_wall", newmod..":stair_" ..newnode.. "_wall")
  16. ra(originmod.. ":stair_" ..originnode.. "_wall_half", newmod..":stair_" ..newnode.. "_wall_half")
  17. ra(originmod.. ":stair_" ..originnode.. "_half", newmod..":stair_" ..newnode.. "_half")
  18. ra(originmod.. ":stair_" ..originnode.. "_right_half", newmod..":stair_" ..newnode.. "_right_half")
  19. ra(originmod.. ":stair_" ..originnode.. "_inner", newmod..":stair_" ..newnode.. "_inner")
  20. ra(originmod.. ":stair_" ..originnode.. "_outer", newmod..":stair_" ..newnode.. "_outer")
  21. end
  22. -- Sandstone cobble
  23. minetest.register_alias( "darkage:sandstone_cobble","default:sandstonebrick")
  24. register_stairsplus_alias("darkage:sandstone_cobble","default:sandstonebrick")
  25. -- Desert Stone cobble
  26. minetest.register_alias( "darkage:desert_stone_cobble","default:desert_stonebrick")
  27. register_stairsplus_alias("darkage:desert_stone_cobble","default:desert_stonebrick")
  28. -- Slate Tile
  29. minetest.register_alias( "darkage:slate_tale","darkage:slate_tile")
  30. register_stairsplus_alias("darkage:slate_tale","darkage:slate_tile")