Add electronic circuit craft

This commit is contained in:
mrkubax10 2023-03-17 18:58:14 +01:00
parent 5d08a76ff0
commit 20952b751a

View File

@ -28,7 +28,7 @@ minetest.register_craft({
type="shaped", type="shaped",
output="industrialtest:re_battery", output="industrialtest:re_battery",
recipe={ recipe={
{"","industrialtest:copper_cable",""}, {"","industrialtest:insulated_copper_cable",""},
{industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.powerCarrier,industrialtest.elementKeys.tinIngot}, {industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.powerCarrier,industrialtest.elementKeys.tinIngot},
{industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.powerCarrier,industrialtest.elementKeys.tinIngot} {industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.powerCarrier,industrialtest.elementKeys.tinIngot}
} }
@ -73,6 +73,15 @@ minetest.register_craftitem("industrialtest:electronic_circuit",{
description=S("Electronic Circuit"), description=S("Electronic Circuit"),
inventory_image="industrialtest_electronic_circuit.png" inventory_image="industrialtest_electronic_circuit.png"
}) })
minetest.register_craft({
type="shaped",
output="industrialtest:electronic_circuit",
recipe={
{"industrialtest:insulated_copper_cable","industrialtest:insulated_copper_cable","industrialtest:insulated_copper_cable"},
{industrialtest.elementKeys.powerCarrier,"industrialtest:refined_iron_ingot",industrialtest.elementKeys.powerCarrier},
{"industrialtest:insulated_copper_cable","industrialtest:insulated_copper_cable","industrialtest:insulated_copper_cable"}
}
})
-- Item callbacks -- Item callbacks
minetest.register_on_player_inventory_action(function(player,action,inventory,info) minetest.register_on_player_inventory_action(function(player,action,inventory,info)
@ -86,5 +95,5 @@ minetest.register_on_craft(function(itemstack)
if industrialtest.api.preparePowerStorageItem(itemstack) then if industrialtest.api.preparePowerStorageItem(itemstack) then
return return
end end
industrialtest.api.prepareItemTool(itemstack) industrialtest.api.prepareToolItem(itemstack)
end) end)