From e1fbfae3041a937aa08e19771fe9b88e8530e61b Mon Sep 17 00:00:00 2001 From: sys4 Date: Sat, 27 Jun 2020 17:48:49 +0200 Subject: [PATCH] Ajoute alias manquants --- items.lua | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/items.lua b/items.lua index 4093fb7..04afdc6 100644 --- a/items.lua +++ b/items.lua @@ -37,6 +37,12 @@ local function add_more_nodes(name) end end +local function add_aliases(old, new) + minetest.register_alias("nether:"..old, "hell:"..new) + minetest.register_alias("nether"..":stair_"..old, "hell"..":stair_"..new) + minetest.register_alias("nether"..":slab_"..old, "hell"..":slab_"..new) +end + --[[ local function add_fence(name) local def = minetest.registered_nodes[name] @@ -86,7 +92,7 @@ minetest.register_node("hell:hellrack", { end, }) add_more_nodes("hellrack") -minetest.register_alias("nether:netherrack", "hell:hellrack") +add_aliases("netherrack", "hellrack") minetest.register_node("hell:hellrack_tiled", { description = "Tiled Hellrack", @@ -98,7 +104,7 @@ minetest.register_node("hell:hellrack_tiled", { end, }) add_more_nodes("hellrack_tiled") -minetest.register_alias("nether:netherrack_tiled", "hell:hellrack_tiled") +add_aliases("netherrack_tiled", "hellrack_tiled") minetest.register_node("hell:hellrack_soil", { description = "Dirty Hellrack", @@ -109,7 +115,7 @@ minetest.register_node("hell:hellrack_soil", { return digging_allowed(player, 2) end, }) -minetest.register_alias("nether:netherrack_soil", "hell:hellrack_soil") +add_aliases("netherrack_soil", "hellrack_soil") minetest.register_node("hell:hellrack_black", { description = "Black Hellrack", @@ -121,7 +127,7 @@ minetest.register_node("hell:hellrack_black", { end, }) add_more_nodes("hellrack_black") -minetest.register_alias("nether:netherrack_black", "hell:hellrack_black") +add_aliases("netherrack_black", "hellrack_black") minetest.register_node("hell:hellrack_blue", { description = "Blue Hellrack", @@ -133,7 +139,7 @@ minetest.register_node("hell:hellrack_blue", { end, }) add_more_nodes("hellrack_blue") -minetest.register_alias("nether:netherrack_blue", "hell:hellrack_blue") +add_aliases("netherrack_blue", "hellrack_blue") -- Hellbrick minetest.register_node("hell:hellrack_brick", { @@ -146,7 +152,7 @@ minetest.register_node("hell:hellrack_brick", { end, }) add_more_nodes("hellrack_brick") -minetest.register_alias("nether:netherrack_brick", "hell:hellrack_brick") +add_aliases("netherrack_brick", "hellrack_brick") minetest.register_node("hell:hellrack_brick_blue", { description = "Blue Hellrack Brick", @@ -158,7 +164,7 @@ minetest.register_node("hell:hellrack_brick_blue", { end, }) add_more_nodes("hellrack_brick_blue") -minetest.register_alias("nether:netherrack_brick_blue", "hell:hellrack_brick_blue") +add_aliases("netherrack_brick_blue", "hellrack_brick_blue") minetest.register_node("hell:hellrack_brick_black", { description = "Black Hellrack Brick", @@ -170,7 +176,7 @@ minetest.register_node("hell:hellrack_brick_black", { end, }) add_more_nodes("hellrack_brick_black") -minetest.register_alias("nether:netherrack_brick_black", "hell:hellrack_brick_black") +add_aliases("netherrack_brick_black", "hellrack_brick_black") minetest.register_node("hell:white", { description = "Siwtonic block",