Rename stone/wood_tile to stone/wood_tile_x
To fix naming collision with moreblocks stairs and slabs
This commit is contained in:
parent
b72a2cb9c4
commit
5b6970e94a
@ -157,3 +157,24 @@ function xdecor.register(name, def)
|
||||
end
|
||||
end
|
||||
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)
|
||||
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")
|
||||
minetest.register_alias("xdecor:"..original_basename.."_micropanel", "xdecor:"..new_basename.."_micropanel")
|
||||
minetest.register_alias("xdecor:"..original_basename.."_halfstair", "xdecor:"..new_basename.."_halfstair")
|
||||
minetest.register_alias("xdecor:"..original_basename.."_thinstair", "xdecor:"..new_basename.."_thinstair")
|
||||
minetest.register_alias("xdecor:"..original_basename.."_cube", "xdecor:"..new_basename.."_cube")
|
||||
minetest.register_alias("xdecor:"..original_basename.."_microslab", "xdecor:"..new_basename.."_microslab")
|
||||
minetest.register_alias("xdecor:"..original_basename.."_nanoslab", "xdecor:"..new_basename.."_nanoslab")
|
||||
if not minetest.get_modpath("moreblocks") then
|
||||
minetest.register_alias("stairs:slab_"..original_basename, "stairs:slab_"..new_basename)
|
||||
minetest.register_alias("stairs:stair_"..original_basename, "stairs:stair_"..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
|
||||
end
|
||||
|
||||
|
@ -748,7 +748,7 @@ local function register_hard_node(name, desc, def)
|
||||
def = def or {}
|
||||
xdecor.register(name, {
|
||||
description = desc,
|
||||
tiles = {"xdecor_" .. name .. ".png"},
|
||||
tiles = def.tiles or {"xdecor_" .. name .. ".png"},
|
||||
groups = def.groups or {cracky = 1},
|
||||
is_ground_content = false,
|
||||
sounds = def.sounds or default.node_sound_stone_defaults()
|
||||
@ -760,18 +760,28 @@ register_hard_node("coalstone_tile", S("Coal Stone Tile"))
|
||||
register_hard_node("desertstone_tile", S("Polished Desert Stone Block"))
|
||||
register_hard_node("hard_clay", S("Hardened Clay"))
|
||||
register_hard_node("moonbrick", S("Moon Brick"))
|
||||
register_hard_node("stone_tile", S("Polished Stone Block"))
|
||||
register_hard_node("stone_rune", S("Runestone"))
|
||||
|
||||
-- renamed from stone_tile to fix naming collision with moreblocks
|
||||
-- mod for the registrations under the 'stairs:' namespace
|
||||
register_hard_node("stone_tile_x", S("Polished Stone Block"), {
|
||||
tiles = {"xdecor_stone_tile.png"},
|
||||
})
|
||||
xdecor.register_moreblocks_aliases("stone_tile", "stone_tile_x")
|
||||
|
||||
register_hard_node("packed_ice", S("Packed Ice"), {
|
||||
groups = {cracky = 1, cools_lava = 1, slippery = 3},
|
||||
sounds = default.node_sound_glass_defaults()
|
||||
})
|
||||
|
||||
register_hard_node("wood_tile", S("Wooden Tile"), {
|
||||
-- renamed from wood_tile to fix naming collision with moreblocks
|
||||
-- mod for the registrations under the 'stairs:' namespace
|
||||
register_hard_node("wood_tile_x", S("Wooden Tile"), {
|
||||
groups = {choppy = 1, wood = 1, flammable = 2},
|
||||
sounds = default.node_sound_wood_defaults()
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
tiles = {"xdecor_wood_tile.png"},
|
||||
})
|
||||
xdecor.register_moreblocks_aliases("wood_tile", "wood_tile_x")
|
||||
|
||||
xdecor.register("table", {
|
||||
description = S("Table"),
|
||||
|
@ -205,7 +205,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:stone_tile",
|
||||
output = "xdecor:stone_tile_x",
|
||||
recipe = {
|
||||
{"default:stone_block"},
|
||||
}
|
||||
@ -273,7 +273,7 @@ minetest.register_craft({
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "xdecor:wood_tile 2",
|
||||
output = "xdecor:wood_tile_x 2",
|
||||
recipe = {
|
||||
{"", "group:wood", ""},
|
||||
{"group:wood", "", "group:wood"},
|
||||
@ -377,7 +377,7 @@ minetest.register_craft({
|
||||
})
|
||||
minetest.register_craft({
|
||||
type = "fuel",
|
||||
recipe = "xdecor:wood_tile",
|
||||
recipe = "xdecor:wood_tile_x",
|
||||
burntime = 10,
|
||||
})
|
||||
minetest.register_craft({
|
||||
|
Loading…
Reference in New Issue
Block a user