Add advanced machine block craft

This commit is contained in:
mrkubax10 2023-11-23 08:44:06 +01:00
parent c2384c6c1b
commit f697cfbcc4
3 changed files with 77 additions and 7 deletions

View File

@ -585,15 +585,15 @@ end
-- \param registerCompressorRecipe If true compressor recipe for plate will be registered
-- \returns nil
industrialtest.api.registerPlate=function(name,displayName,resources,color,registerCompressorRecipe)
minetest.register_craftitem("industrialtest:"..name.."_plate",{
description=S(displayName.." Plate"),
minetest.register_craftitem("industrialtest:"..name,{
description=displayName,
inventory_image="industrialtest_plate.png",
color=color
})
if registerCompressorRecipe then
for _,value in ipairs(resources) do
industrialtest.api.registerCompressorRecipe({
output="industrialtest:"..name.."_plate "..(value.count or 1),
output="industrialtest:"..name.." "..(value.count or 1),
recipe=value.resource
})
end

View File

@ -103,6 +103,20 @@ minetest.register_craft({
}
})
minetest.register_craftitem("industrialtest:mixed_metal_ingot",{
description=S("Mixed Metal Ingot"),
inventory_image="industrialtest_"..industrialtest.gameTexturePrefix.."_mixed_metal_ingot.png"
})
minetest.register_craft({
type="shaped",
output="industrialtest:mixed_metal_ingot",
recipe={
{"industrialtest:refined_iron_ingot","industrialtest:refined_iron_ingot","industrialtest:refined_iron_ingot",},
{industrialtest.elementKeys.bronzeIngot,industrialtest.elementKeys.bronzeIngot,industrialtest.elementKeys.bronzeIngot},
{industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.tinIngot}
}
})
minetest.register_craftitem("industrialtest:sticky_resin",{
description=S("Sticky Resin"),
inventory_image="industrialtest_sticky_resin.png"
@ -130,6 +144,34 @@ industrialtest.api.registerExtractorRecipe({
recipe="industrialtest:sticky_resin"
})
minetest.register_craftitem("industrialtest:raw_carbon_fibre",{
description=S("Raw Carbon Fibre"),
inventory_image="industrialtest_raw_carbon_fibre.png"
})
minetest.register_craft({
type="shapeless",
output="industrialtest:raw_carbon_fibre",
recipe={
"industrialtest:coal_dust",
"industrialtest:coal_dust",
"industrialtest:coal_dust",
"industrialtest:coal_dust"
}
})
minetest.register_craftitem("industrialtest:raw_carbon_mesh",{
description=S("Raw Carbon Mesh"),
inventory_image="industrialtest_raw_carbon_mesh.png"
})
minetest.register_craft({
type="shapeless",
output="industrialtest:raw_carbon_mesh",
recipe={
"industrialtest:raw_carbon_fibre",
"industrialtest:raw_carbon_fibre"
}
})
-- Dust
local resources={
{
@ -375,19 +417,34 @@ industrialtest.api.registerResourceDust("lead","Lead",{},"#eafef8ff",false)
-- TODO: Add lead ore
-- Plates
industrialtest.api.registerPlate("bronze","Bronze",{
industrialtest.api.registerPlate("bronze_plate",S("Bronze Plate"),{
{
resource=industrialtest.elementKeys.bronzeIngot,
count=1
}
},"#e48e88ff",true)
industrialtest.api.registerPlate("copper","Copper",{
industrialtest.api.registerPlate("copper_plate",S("Copper Plate"),{
{
resource=industrialtest.elementKeys.copperIngot,
count=1
}
},"#f48e44ff",true)
industrialtest.api.registerPlate("advanced_alloy",S("Advanced Alloy"),{
{
resource="industrialtest:mixed_metal_ingot",
count=1
}
},"#908372ff",true)
industrialtest.api.registerPlate("carbon_plate",S("Carbon Plate"),{
{
resource="industrialtest:raw_carbon_mesh",
count=1
}
},"#272725ff",true)
-- Cells
minetest.register_craftitem("industrialtest:empty_cell",{
description=S("Empty Cell"),

View File

@ -41,17 +41,30 @@ minetest.register_craft({
definition={
description=S("Advanced Machine Block"),
tiles={"industrialtest_advanced_machine_block.png"}
tiles={"industrialtest_advanced_machine_block.png"},
groups={
_industrialtest_wrenchUnmountable=1
}
}
if industrialtest.mtgAvailable then
definition.sounds=default.node_sound_metal_defaults()
definition.groups={cracky=2,level=2}
definition.groups.cracky=2
definition.groups.level=2
elseif industrialtest.mclAvailable then
definition.sounds=mcl_sounds.node_sound_metal_defaults()
definition._mcl_blast_resistance=7
definition._mcl_hardness=5
end
minetest.register_node("industrialtest:advanced_machine_block",definition)
minetest.register_craft({
type="shaped",
output="industrialtest:advanced_machine_block",
recipe={
{"","industrialtest:advanced_alloy",""},
{"industrialtest:carbon_plate","industrialtest:machine_block","industrialtest:carbon_plate"},
{"","industrialtest:advanced_alloy",""}
}
})
definition={
description=S("Rubber Wood"),