Add missing power storage nodes crafts
This commit is contained in:
parent
6c829e5d47
commit
2205b320cd
23
api.lua
23
api.lua
@ -382,6 +382,29 @@ industrialtest.api.registerResourceDust=function(name,displayName,resources,colo
|
||||
end
|
||||
end
|
||||
end
|
||||
-- \brief Registers plate of certain resource
|
||||
-- \param name Technical name of resource
|
||||
-- \param displayName Display name of resource
|
||||
-- \param resources List of tables with following keys: <output>, <recipe>, [count(1)]
|
||||
-- <> - required, [] - optional, () - default value
|
||||
-- \param color HTML color of plate
|
||||
-- \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"),
|
||||
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),
|
||||
recipe=value.resource
|
||||
})
|
||||
end
|
||||
end
|
||||
end
|
||||
-- \brief Registers cell with certain fluid
|
||||
-- \param name Technical name of cell
|
||||
-- \param displayName Display name of cell
|
||||
|
@ -28,12 +28,29 @@ minetest.register_craft({
|
||||
type="shaped",
|
||||
output="industrialtest:re_battery",
|
||||
recipe={
|
||||
{"","industrialtest:insulated_copper_cable",""},
|
||||
{"","industrialtest:insulated_tin_cable",""},
|
||||
{industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.powerCarrier,industrialtest.elementKeys.tinIngot},
|
||||
{industrialtest.elementKeys.tinIngot,industrialtest.elementKeys.powerCarrier,industrialtest.elementKeys.tinIngot}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_tool("industrialtest:advanced_re_battery",{
|
||||
description=S("Advanced RE-Battery"),
|
||||
inventory_image="industrialtest_advanced_re_battery.png",
|
||||
_industrialtest_powerStorage=true,
|
||||
_industrialtest_powerCapacity=100000,
|
||||
_industrialtest_powerFlow=industrialtest.api.mvPowerFlow
|
||||
})
|
||||
minetest.register_craft({
|
||||
type="shaped",
|
||||
output="industrialtest:advanced_re_battery",
|
||||
recipe={
|
||||
{"industrialtest:insulated_copper_cable",industrialtest.elementKeys.bronzeIngot,"industrialtest:insulated_copper_cable"},
|
||||
{industrialtest.elementKeys.bronzeIngot,"industrialtest:sulfur_dust",industrialtest.elementKeys.bronzeIngot},
|
||||
{industrialtest.elementKeys.bronzeIngot,"industrialtest:lead_dust",industrialtest.elementKeys.bronzeIngot}
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_tool("industrialtest:energy_crystal",{
|
||||
description=S("Energy Crystal"),
|
||||
inventory_image="industrialtest_energy_crystal.png",
|
||||
@ -353,6 +370,17 @@ minetest.register_craft({
|
||||
output=industrialtest.elementKeys.bronzeIngot,
|
||||
recipe="industrialtest:bronze_dust"
|
||||
})
|
||||
industrialtest.api.registerResourceDust("sulfur","Sulfur",{},"#e3ff33ff",false)
|
||||
industrialtest.api.registerResourceDust("lead","Lead",{},"#eafef8ff",false)
|
||||
-- TODO: Add lead ore
|
||||
|
||||
-- Plates
|
||||
industrialtest.api.registerPlate("bronze","Bronze",{
|
||||
{
|
||||
resource=industrialtest.elementKeys.bronzeIngot,
|
||||
count=1
|
||||
}
|
||||
},"#e48e88ff",true)
|
||||
|
||||
-- Cells
|
||||
minetest.register_craftitem("industrialtest:empty_cell",{
|
||||
|
30
machines.lua
30
machines.lua
@ -1938,7 +1938,15 @@ registerPowerStorageNode({
|
||||
machineBlockTexture="industrialtest_bronze_machine_block.png",
|
||||
requiresWrench=false
|
||||
})
|
||||
-- TODO: CESU craft
|
||||
minetest.register_craft({
|
||||
type="shaped",
|
||||
output="industrialtest:cesu",
|
||||
recipe={
|
||||
{"industrialtest:bronze_plate","industrialtest:insulated_copper_cable","industrialtest:bronze_plate"},
|
||||
{"industrialtest:advanced_re_battery","industrialtest:advanced_re_battery","industrialtest:advanced_re_battery"},
|
||||
{"industrialtest:bronze_plate","industrialtest:bronze_plate","industrialtest:bronze_plate"}
|
||||
}
|
||||
})
|
||||
|
||||
registerPowerStorageNode({
|
||||
name="mfe",
|
||||
@ -1949,7 +1957,15 @@ registerPowerStorageNode({
|
||||
machineBlockTexture="industrialtest_machine_block.png",
|
||||
requiresWrench=true
|
||||
})
|
||||
-- TODO: MFE craft
|
||||
minetest.register_craft({
|
||||
type="shaped",
|
||||
output="industrialtest:mfe",
|
||||
recipe={
|
||||
{"industrialtest:insulated_gold_cable","industrialtest:energy_crystal","industrialtest:insulated_gold_cable"},
|
||||
{"industrialtest:energy_crystal","industrialtest:machine_block","industrialtest:energy_crystal"},
|
||||
{"industrialtest:insulated_gold_cable","industrialtest:energy_crystal","industrialtest:insulated_gold_cable"}
|
||||
}
|
||||
})
|
||||
|
||||
registerPowerStorageNode({
|
||||
name="mfsu",
|
||||
@ -1960,4 +1976,12 @@ registerPowerStorageNode({
|
||||
machineBlockTexture="industrialtest_advanced_machine_block.png",
|
||||
requiresWrench=false
|
||||
})
|
||||
-- TODO: MFSU craft
|
||||
minetest.register_craft({
|
||||
type="shaped",
|
||||
output="industrialtest:mfsu",
|
||||
recipe={
|
||||
{"industrialtest:lapotron_crystal","industrialtest:advanced_electronic_circuit","industrialtest:lapotron_crystal"},
|
||||
{"industrialtest:lapotron_crystal","industrialtest:mfe","industrialtest:lapotron_crystal"},
|
||||
{"industrialtest:lapotron_crystal","industrialtest:advanced_machine_block","industrialtest:lapotron_crystal"}
|
||||
}
|
||||
})
|
||||
|
14
nodes.lua
14
nodes.lua
@ -39,6 +39,20 @@ minetest.register_craft({
|
||||
}
|
||||
})
|
||||
|
||||
definition={
|
||||
description=S("Advanced Machine Block"),
|
||||
tiles={"industrialtest_advanced_machine_block.png"}
|
||||
}
|
||||
if industrialtest.mtgAvailable then
|
||||
definition.sounds=default.node_sound_metal_defaults()
|
||||
definition.groups={cracky=2,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)
|
||||
|
||||
definition={
|
||||
description=S("Rubber Wood"),
|
||||
tiles={
|
||||
|
Loading…
Reference in New Issue
Block a user