Fix possible crash with stairsplus

This commit is contained in:
Wuzzy 2023-07-29 18:08:57 +02:00
parent 5a96e4a09d
commit 82333bd707
2 changed files with 6 additions and 3 deletions

View File

@ -160,7 +160,7 @@ end
-- Registers aliases for a node that had a name collision
-- with a node from the moreblocks mod
function xdecor.register_moreblocks_aliases(original_basename, new_basename)
function xdecor.register_legacy_aliases(original_basename, new_basename)
minetest.register_alias("xdecor:"..original_basename, "xdecor:"..new_basename)
minetest.register_alias("xdecor:"..original_basename.."_panel", "xdecor:"..new_basename.."_panel")
minetest.register_alias("xdecor:"..original_basename.."_doublepanel", "xdecor:"..new_basename.."_doublepanel")
@ -176,5 +176,8 @@ function xdecor.register_moreblocks_aliases(original_basename, new_basename)
minetest.register_alias("stairs:stair_outer_"..original_basename, "stairs:stair_outer_"..new_basename)
minetest.register_alias("stairs:stair_inner_"..original_basename, "stairs:stair_inner"..new_basename)
end
if minetest.get_modpath("stairsplus") and minetest.global_exists("stairsplus") and stairsplus.api then
stairsplus.api.register_alias_all("xdecor:"..original_basename, "xdecor:"..new_basename)
end
end

View File

@ -767,7 +767,7 @@ register_hard_node("stone_rune", S("Runestone"))
register_hard_node("stone_tile_x", S("Polished Stone Block"), {
tiles = {"xdecor_stone_tile.png"},
})
xdecor.register_moreblocks_aliases("stone_tile", "stone_tile_x")
xdecor.register_legacy_aliases("stone_tile", "stone_tile_x")
register_hard_node("packed_ice", S("Packed Ice"), {
groups = {cracky = 1, cools_lava = 1, slippery = 3},
@ -781,7 +781,7 @@ register_hard_node("wood_tile_x", S("Wooden Tile"), {
sounds = default.node_sound_wood_defaults(),
tiles = {"xdecor_wood_tile.png"},
})
xdecor.register_moreblocks_aliases("wood_tile", "wood_tile_x")
xdecor.register_legacy_aliases("wood_tile", "wood_tile_x")
xdecor.register("table", {
description = S("Table"),