Add bronze ingot and block

This commit is contained in:
mrkubax10 2023-02-23 21:47:40 +01:00
parent 5bc315e0e8
commit b888b4da8a
2 changed files with 45 additions and 2 deletions

View File

@ -17,7 +17,7 @@
local S=minetest.get_translator("industrialtest") local S=minetest.get_translator("industrialtest")
industrialtest.mtgAvailable=minetest.get_modpath("default") industrialtest.mtgAvailable=minetest.get_modpath("default")
industrialtest.mclAvailable=minetest.get_modpath("mcl_core") industrialtest.mclAvailable=minetest.get_modpath("mcl_core") and minetest.get_modpath("mcl_copper")
industrialtest.elementKeys={} industrialtest.elementKeys={}
@ -110,6 +110,48 @@ if industrialtest.mclAvailable then
industrialtest.registerMetal("tin","Tin",3,3) industrialtest.registerMetal("tin","Tin",3,3)
industrialtest.elementKeys.tinIngot="industrialtest:tin_ingot" industrialtest.elementKeys.tinIngot="industrialtest:tin_ingot"
--register other items that are not available in MCL
minetest.register_craftitem("industrialtest:bronze_ingot",{
description=S("Bronze Ingot"),
inventory_image="industrialtest_mcl_bronze_ingot.png"
})
minetest.register_craft({
type="shaped",
output="industrialcraft:bronze_ingot 9",
recipe={
{"mcl_copper:copper_ingot","mcl_copper:copper_ingot","mcl_copper:copper_ingot"},
{"mcl_copper:copper_ingot","industrialtest:tin_ingot","mcl_copper:copper_ingot"},
{"mcl_copper:copper_ingot","mcl_copper:copper_ingot","mcl_copper:copper_ingot"}
}
})
industrialtest.elementKeys.bronzeIngot="industrialtest:bronze_ingot"
--register other blocks that are not availabe in MCL
minetest.register_node("industrialtest:bronze_block",{
description=S("Block of Bronze"),
tiles={"industrialtest_mcl_bronze_block.png"},
groups={pickaxey=2,building_block=1},
sounds=mcl_sounds.node_sound_metal_defaults(),
_mcl_blast_resistance=3,
_mcl_hardness=3,
})
minetest.register_craft({
type="shaped",
output="industrialtest:bronze_block",
recipe={
{"industrialtest:bronze_ingot","industrialtest:bronze_ingot","industrialtest:bronze_ingot"},
{"industrialtest:bronze_ingot","industrialtest:bronze_ingot","industrialtest:bronze_ingot"},
{"industrialtest:bronze_ingot","industrialtest:bronze_ingot","industrialtest:bronze_ingot"}
}
})
minetest.register_craft({
type="shapeless",
output="industrialtest:bronze_ingot 9",
recipe={
"industrialtest:bronze_block"
}
})
-- ore generation is game-dependent so register it there -- ore generation is game-dependent so register it there
local stonelike={"mcl_core:stone","mcl_core:diorite","mcl_core:andesite","mcl_core:granite"} local stonelike={"mcl_core:stone","mcl_core:diorite","mcl_core:andesite","mcl_core:granite"}
minetest.register_ore({ minetest.register_ore({
@ -185,6 +227,7 @@ elseif industrialtest.mtgAvailable then
}) })
end end
industrialtest.elementKeys.tinIngot="default:tin_ingot" industrialtest.elementKeys.tinIngot="default:tin_ingot"
industrialtest.elementKeys.bronzeIngot="default:bronze_ingot"
-- ore generation is game-dependent so register it there -- ore generation is game-dependent so register it there
minetest.register_ore({ minetest.register_ore({

View File

@ -1,5 +1,5 @@
name=industrialtest name=industrialtest
description=Adds various machinery description=Adds various machinery
optional_depends=default,mcl_core optional_depends=default,mcl_core,mcl_copper
author=IndustrialTest Team author=IndustrialTest Team
title=IndustrialTest title=IndustrialTest