Added Mineclone2 support apart from special machines own recipes within the machines

This commit is contained in:
James David Clarke
2023-12-20 08:20:56 +00:00
parent b221d69717
commit cfe2ee2133
68 changed files with 902 additions and 495 deletions

View File

@ -1,18 +1,18 @@
minetest.register_craft({
output = 'technic:copper_chest 1',
recipe = {
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'},
{'default:copper_ingot','technic:iron_chest','default:copper_ingot'},
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'},
{copper_ingrediant,copper_ingrediant,copper_ingrediant},
{copper_ingrediant,'technic:iron_chest',copper_ingrediant},
{copper_ingrediant,copper_ingrediant,copper_ingrediant},
}
})
minetest.register_craft({
output = 'technic:copper_locked_chest 1',
recipe = {
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'},
{'default:copper_ingot','technic:iron_locked_chest','default:copper_ingot'},
{'default:copper_ingot','default:copper_ingot','default:copper_ingot'},
{copper_ingrediant,copper_ingrediant,copper_ingrediant},
{copper_ingrediant,'technic:iron_locked_chest',copper_ingrediant},
{copper_ingrediant,copper_ingrediant,copper_ingrediant},
}
})

View File

@ -11,18 +11,18 @@ for _, material in ipairs(material_list) do
minetest.register_craft({
output = 'technic:gold_chest',
recipe = {
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'},
{'default:gold_ingot',"technic:"..material.."_chest",'default:gold_ingot'},
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'},
{gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant},
{gold_ingot_ingrediant,"technic:"..material.."_chest",gold_ingot_ingrediant},
{gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant},
}
})
minetest.register_craft({
output = 'technic:gold_locked_chest',
recipe = {
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'},
{'default:gold_ingot',"technic:"..material.."_locked_chest",'default:gold_ingot'},
{'default:gold_ingot','default:gold_ingot','default:gold_ingot'},
{gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant},
{gold_ingot_ingrediant,"technic:"..material.."_locked_chest",gold_ingot_ingrediant},
{gold_ingot_ingrediant,gold_ingot_ingrediant,gold_ingot_ingrediant},
}
})
end

View File

@ -4,6 +4,65 @@
local modpath = minetest.get_modpath("technic_chests")
-- Mineclone2 Support
stone_sounds = nil
if minetest.get_modpath("mcl_sounds") then
stone_sounds = mcl_sounds.node_sound_stone_defaults()
else
stone_sounds = default.node_sound_stone_defaults()
end
node_sounds = nil
if minetest.get_modpath("mcl_sounds") then
node_sounds = mcl_sounds.node_sound_defaults()
else
node_sounds = default.node_sound_defaults()
end
wood_sounds = nil
if minetest.get_modpath("mcl_sounds") then
wood_sounds = mcl_sounds.node_sound_wood_defaults()
else
wood_sounds = default.node_sound_wood_defaults()
end
-- Mineclone2 Recipes
chest_ingrediant = nil
if minetest.get_modpath("mcl_core") then
chest_ingrediant = "mcl_chests:chest"
else
chest_ingrediant = "default:chest"
end
copper_ingrediant = nil
if minetest.get_modpath("mcl_core") then
copper_ingrediant = "mcl_copper:copper_ingot"
else
copper_ingrediant = 'default:copper_ingot'
end
gold_ingot_ingrediant = nil
if minetest.get_modpath("mcl_core") then
gold_ingot_ingrediant = "mcl_core:gold_ingot"
else
gold_ingot_ingrediant = 'default:gold_ingot'
end
granite_ingrediant = nil
if minetest.get_modpath("mcl_core") then
granite_ingrediant = "mcl_core:granite"
else
granite_ingrediant = 'technic:granite'
end
granite_bricks_ingrediant = nil
if minetest.get_modpath("mcl_core") then
granite_bricks_ingrediant = "mcl_core:granite_smooth"
else
granite_bricks_ingrediant = 'technic:granite_bricks'
end
technic = rawget(_G, "technic") or {}
technic.chests = {}

View File

@ -9,11 +9,12 @@ minetest.register_craft({
output = 'technic:iron_chest 1',
recipe = {
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
{cast_iron_ingot,'default:chest',cast_iron_ingot},
{cast_iron_ingot,chest_ingrediant,cast_iron_ingot},
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
}
})
if minetest.get_modpath("default") then
minetest.register_craft({
output = 'technic:iron_locked_chest 1',
recipe = {
@ -22,6 +23,7 @@ minetest.register_craft({
{cast_iron_ingot,cast_iron_ingot,cast_iron_ingot},
}
})
end
minetest.register_craft({
output = 'technic:iron_locked_chest 1',

View File

@ -1,3 +1,4 @@
name = technic_chests
depends = default, basic_materials
optional_depends = moreblocks, moreores, pipeworks, intllib, tubelib
depends = basic_materials
optional_depends = moreblocks, moreores, pipeworks, intllib, tubelib, default, mcl_core
supported_games = minetest_game,mineclone2

View File

@ -298,7 +298,7 @@ function technic.chests:definition(name, data)
groups = self.groups,
tube = self.tube,
legacy_facedir_simple = true,
sounds = default.node_sound_wood_defaults(),
sounds = wood_sounds,
after_place_node = locked_after_place,
after_dig_node = pipeworks.after_dig,