forked from nalc/homedecor_modpack
Building Blocks create file alias
This commit is contained in:
parent
9921efeeef
commit
14697ef71b
58
building_blocks/alias.lua
Normal file
58
building_blocks/alias.lua
Normal file
@ -0,0 +1,58 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_marble", "stairs:slab_Marble")
|
||||
minetest.register_alias("building_blocks:stair_marble", "stairs:stair_Marble")
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
minetest.register_alias("building_blocks:stair_tar", "stairs:stair_Tar")
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
end
|
||||
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
@ -1,4 +1,7 @@
|
||||
local S = homedecor_i18n.gettext
|
||||
local modpath = minetest.get_modpath("building_blocks")
|
||||
|
||||
dofile(modpath.."/alias.lua")
|
||||
|
||||
local function building_blocks_stairs(nodename, def)
|
||||
minetest.register_node(nodename, def)
|
||||
@ -41,12 +44,6 @@ local function building_blocks_stairs(nodename, def)
|
||||
end
|
||||
end
|
||||
|
||||
if minetest.get_modpath("moreblocks") or minetest.get_modpath("stairs") then
|
||||
minetest.register_alias("building_blocks:slab_marble", "stairs:slab_Marble")
|
||||
minetest.register_alias("building_blocks:stair_marble", "stairs:stair_Marble")
|
||||
minetest.register_alias("building_blocks:slab_tar", "stairs:slab_Tar")
|
||||
minetest.register_alias("building_blocks:stair_tar", "stairs:stair_Tar")
|
||||
end
|
||||
|
||||
building_blocks_stairs("building_blocks:Adobe", {
|
||||
tiles = {"building_blocks_Adobe.png"},
|
||||
@ -348,19 +345,7 @@ building_blocks_stairs("building_blocks:hardwood", {
|
||||
sounds = default.node_sound_wood_defaults(),
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_alias_all("building_blocks", "tar", "building_blocks", "Tar")
|
||||
stairsplus:register_alias_all("building_blocks", "marble", "building_blocks", "Marble")
|
||||
for _, i in ipairs(stairsplus.shapes_list) do
|
||||
local class = i[1]
|
||||
local cut = i[2]
|
||||
minetest.unregister_item("moreblocks:"..class.."tar"..cut)
|
||||
minetest.register_alias("moreblocks:"..class.."tar"..cut, "building_blocks:"..class.."tar"..cut)
|
||||
|
||||
end
|
||||
minetest.unregister_item("moreblocks:tar")
|
||||
minetest.register_alias("moreblocks:tar", "building_blocks:Tar")
|
||||
end
|
||||
|
||||
|
||||
minetest.register_craft({
|
||||
@ -399,15 +384,6 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_alias("tar", "building_blocks:Tar")
|
||||
minetest.register_alias("fakegrass", "building_blocks:fakegrass")
|
||||
minetest.register_alias("tar_knife", "building_blocks:knife")
|
||||
minetest.register_alias("adobe", "building_blocks:Adobe")
|
||||
minetest.register_alias("building_blocks_roofing", "building_blocks:Roofing")
|
||||
minetest.register_alias("hardwood", "building_blocks:hardwood")
|
||||
minetest.register_alias("sticks", "building_blocks:sticks")
|
||||
minetest.register_alias("building_blocks:faggot", "building_blocks:sticks")
|
||||
minetest.register_alias("marble", "building_blocks:Marble")
|
||||
|
||||
building_blocks_stairs("building_blocks:Tar", {
|
||||
description = S("Tar"),
|
||||
@ -461,29 +437,4 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
if not minetest.get_modpath("technic") then
|
||||
minetest.register_node( ":technic:granite", {
|
||||
description = S("Granite"),
|
||||
tiles = { "technic_granite.png" },
|
||||
is_ground_content = true,
|
||||
groups = {cracky=1},
|
||||
sounds = default.node_sound_stone_defaults(),
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "technic:granite 9",
|
||||
recipe = {
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" },
|
||||
{ "group:marble", "group:tar_block", "group:marble" },
|
||||
{ "group:tar_block", "group:marble", "group:tar_block" }
|
||||
},
|
||||
})
|
||||
|
||||
if minetest.get_modpath("moreblocks") then
|
||||
stairsplus:register_all("technic", "granite", "technic:granite", {
|
||||
description=S("Granite"),
|
||||
groups={cracky=1, not_in_creative_inventory=1},
|
||||
tiles={"technic_granite.png"},
|
||||
})
|
||||
end
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user