From 5bf17dda642e0eb34344908d969ab0fec515a878 Mon Sep 17 00:00:00 2001 From: Wuzzy Date: Mon, 5 Jun 2017 19:21:14 +0200 Subject: [PATCH] Add stair/slab aliases for compability with 0.21.0 --- mods/ITEMS/mcl_stairs/alias.lua | 20 ++++++++++++++++++++ mods/ITEMS/mcl_stairs/init.lua | 1 + 2 files changed, 21 insertions(+) create mode 100644 mods/ITEMS/mcl_stairs/alias.lua diff --git a/mods/ITEMS/mcl_stairs/alias.lua b/mods/ITEMS/mcl_stairs/alias.lua new file mode 100644 index 0000000000..1b2d938419 --- /dev/null +++ b/mods/ITEMS/mcl_stairs/alias.lua @@ -0,0 +1,20 @@ +-- Aliases for backwards-compability with 0.21.0 + +local materials = { + "wood", "junglewood", "sprucewood", "acaciawood", "birchwood", "darkwood", + "cobble", "brick_block", "sandstone", "redsandstone", "stonebrick", + "quartzblock", "purpur_block", "nether_brick" +} + +for m=1, #materials do + local mat = materials[m] + minetest.register_alias("stairs:slab_"..mat, "mcl_stairs:slab_"..mat) + minetest.register_alias("stairs:stair_"..mat, "mcl_stairs:stair_"..mat) + + -- mcstair + minetest.register_alias("stairs:stair_"..mat.."_inner", "mcl_stairs:stair_"..mat.."_inner") + minetest.register_alias("stairs:stair_"..mat.."_outer", "mcl_stairs:stair_"..mat.."_outer") +end + +minetest.register_alias("stairs:slab_stone", "mcl_stairs:slab_stone") +minetest.register_alias("stairs:slab_stone_double", "mcl_stairs:slab_stone_double") diff --git a/mods/ITEMS/mcl_stairs/init.lua b/mods/ITEMS/mcl_stairs/init.lua index 1bc0bbd271..ca6f5755b2 100644 --- a/mods/ITEMS/mcl_stairs/init.lua +++ b/mods/ITEMS/mcl_stairs/init.lua @@ -10,3 +10,4 @@ mcl_stairs = {} dofile(minetest.get_modpath("mcl_stairs").."/api.lua") dofile(minetest.get_modpath("mcl_stairs").."/register.lua") dofile(minetest.get_modpath("mcl_stairs").."/crafting.lua") +dofile(minetest.get_modpath("mcl_stairs").."/alias.lua")