fix mineclone incompatabilities

This commit is contained in:
flux 2022-06-30 18:31:44 -07:00
parent 7a5022472b
commit 3c4a386dd3
3 changed files with 114 additions and 78 deletions

View File

@ -84,8 +84,10 @@ local default_nodes = { -- Default stairs/slabs/panels/microblocks:
for _, name in ipairs(default_nodes) do for _, name in ipairs(default_nodes) do
local node = ("default:%s"):format(name) local node = ("default:%s"):format(name)
if minetest.registered_nodes[node] then
stairsplus_legacy.register_legacy(node) stairsplus_legacy.register_legacy(node)
stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node) stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node)
end
end end
-- glass problems -- glass problems
@ -96,33 +98,43 @@ local glass = {
for _, name in ipairs(glass) do for _, name in ipairs(glass) do
local node = ("default:%s"):format(name) local node = ("default:%s"):format(name)
if minetest.registered_nodes[node] then
stairsplus_legacy.register_legacy(node, nil, {ignore_paramtype2 = true}) stairsplus_legacy.register_legacy(node, nil, {ignore_paramtype2 = true})
stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node) stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node)
end
end end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:glass"] then
stairsplus.api.register_crafts_for_shapes({
type = "cooking", type = "cooking",
output = "default:glass", output = "default:glass",
recipe = "group:sand", recipe = "group:sand",
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:stone"] and minetest.registered_nodes["default:cobble"] then
stairsplus.api.register_crafts_for_shapes({
type = "cooking", type = "cooking",
output = "default:stone", output = "default:stone",
recipe = "default:cobble", recipe = "default:cobble",
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:stone"] and minetest.registered_nodes["default:mossycobble"] then
stairsplus.api.register_crafts_for_shapes({
type = "cooking", type = "cooking",
output = "default:stone", output = "default:stone",
recipe = "default:mossycobble", recipe = "default:mossycobble",
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:desert_stone"] and minetest.registered_nodes["default:desert_cobble"] then
stairsplus.api.register_crafts_for_shapes({
type = "cooking", type = "cooking",
output = "default:desert_stone", output = "default:desert_stone",
recipe = "default:desert_cobble", recipe = "default:desert_cobble",
}) })
end
stairsplus.api.register_crafts_for_shapes({ stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
@ -130,35 +142,45 @@ stairsplus.api.register_crafts_for_shapes({
burntime = 30, burntime = 30,
}) })
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:tree"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:tree", recipe = "default:tree",
burntime = 30, burntime = 30,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:aspen_tree"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:aspen_tree", recipe = "default:aspen_tree",
burntime = 22, burntime = 22,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:pine_tree"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:pine_tree", recipe = "default:pine_tree",
burntime = 26, burntime = 26,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:acacia_tree"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:acacia_tree", recipe = "default:acacia_tree",
burntime = 34, burntime = 34,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:jungletree"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:jungletree", recipe = "default:jungletree",
burntime = 38, burntime = 38,
}) })
end
stairsplus.api.register_crafts_for_shapes({ stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
@ -166,32 +188,42 @@ stairsplus.api.register_crafts_for_shapes({
burntime = 7, burntime = 7,
}) })
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:wood"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:wood", recipe = "default:wood",
burntime = 7, burntime = 7,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:aspen_wood"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:aspen_wood", recipe = "default:aspen_wood",
burntime = 5, burntime = 5,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:pine_wood"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:pine_wood", recipe = "default:pine_wood",
burntime = 6, burntime = 6,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:acacia_wood"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:acacia_wood", recipe = "default:acacia_wood",
burntime = 8, burntime = 8,
}) })
end
stairsplus.api.register_crafts_for_shapes({ if minetest.registered_nodes["default:junglewood"] then
stairsplus.api.register_crafts_for_shapes({
type = "fuel", type = "fuel",
recipe = "default:junglewood", recipe = "default:junglewood",
burntime = 9, burntime = 9,
}) })
end

View File

@ -5,6 +5,8 @@ end
local farming_nodes = {"straw"} local farming_nodes = {"straw"}
for _, name in pairs(farming_nodes) do for _, name in pairs(farming_nodes) do
local node = ("farming:%s"):format(name) local node = ("farming:%s"):format(name)
if minetest.registered_nodes[node] then
stairsplus_legacy.register_legacy(node) stairsplus_legacy.register_legacy(node)
stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node) stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node)
end
end end

View File

@ -4,6 +4,8 @@ local dyes = {"white", "grey", "black", "red", "yellow", "green", "cyan",
for _, name in ipairs(dyes) do for _, name in ipairs(dyes) do
local node = ("wool:%s"):format(name) local node = ("wool:%s"):format(name)
if minetest.registered_nodes[node] then
stairsplus_legacy.register_legacy(node) stairsplus_legacy.register_legacy(node)
stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node) stairsplus.api.register_alias_all(("moreblocks:%s"):format(name), node)
end
end end