mirror of
https://github.com/sirrobzeroone/elepower.git
synced 2024-08-20 12:54:05 +02:00
Add compressor, plate recipes and turbine recipe
This commit is contained in:
parent
017255cc1f
commit
ea58027dad
@ -50,6 +50,8 @@ end
|
||||
--------------
|
||||
|
||||
local keywords = { _ingot = 1, _lump = 2, _block = 9, block = 9 }
|
||||
local ingot_map = {}
|
||||
local block_map = {}
|
||||
for mat, data in pairs(elepd.registered_dusts) do
|
||||
local kwfound = nil
|
||||
for keyword,count in pairs(keywords) do
|
||||
@ -57,6 +59,8 @@ for mat, data in pairs(elepd.registered_dusts) do
|
||||
if found then
|
||||
if keyword == "_ingot" and not kwfound then
|
||||
kwfound = found
|
||||
elseif keyword == "_block" or keyword == "block" and not block_map[mat] then
|
||||
block_map[mat] = data.item
|
||||
end
|
||||
|
||||
-- Grind recipe for material
|
||||
@ -71,6 +75,7 @@ for mat, data in pairs(elepd.registered_dusts) do
|
||||
|
||||
-- Add dust -> ingot smelting
|
||||
if kwfound then
|
||||
ingot_map[mat] = kwfound
|
||||
minetest.register_craft({
|
||||
type = "cooking",
|
||||
recipe = data.item,
|
||||
@ -100,6 +105,23 @@ elepm.register_craft({
|
||||
time = 18,
|
||||
})
|
||||
|
||||
-----------------
|
||||
-- Compressing --
|
||||
-----------------
|
||||
|
||||
for mat, ingot in pairs(ingot_map) do
|
||||
local plate = "elepower_dynamics:" .. mat .. "_plate"
|
||||
|
||||
if minetest.registered_items[plate] then
|
||||
elepm.register_craft({
|
||||
type = "compress",
|
||||
recipe = { ingot .. " 2" },
|
||||
output = plate,
|
||||
time = 4,
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
-------------
|
||||
-- Sawmill --
|
||||
-------------
|
||||
@ -333,3 +355,52 @@ minetest.register_craft({
|
||||
{"elepower_dynamics:invar_gear", "elepower_dynamics:servo_valve", "elepower_dynamics:invar_gear"},
|
||||
},
|
||||
})
|
||||
|
||||
-- Compressor Piston
|
||||
minetest.register_craft({
|
||||
output = "elepower_machines:compressor_piston",
|
||||
recipe = {
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"default:bronze_ingot", "default:bronze_ingot", "default:bronze_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
minetest.register_craft({
|
||||
output = "elepower_machines:compressor_piston",
|
||||
recipe = {
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "default:steel_ingot", ""},
|
||||
{"", "elepower_dynamics:bronze_plate", ""},
|
||||
}
|
||||
})
|
||||
|
||||
-- Compressor
|
||||
minetest.register_craft({
|
||||
output = "elepower_machines:compressor",
|
||||
recipe = {
|
||||
{"elepower_dynamics:integrated_circuit", "elepower_machines:compressor_piston", "elepower_dynamics:wound_copper_coil"},
|
||||
{"elepower_dynamics:steel_gear", "elepower_machines:machine_block", "elepower_dynamics:steel_gear"},
|
||||
{"default:steel_ingot", "elepower_machines:compressor_piston", "default:steel_ingot"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Turbine blades
|
||||
minetest.register_craft({
|
||||
output = "elepower_machines:turbine_blades",
|
||||
recipe = {
|
||||
{"elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate"},
|
||||
{"elepower_dynamics:steel_plate", "default:steel_ingot", "elepower_dynamics:steel_plate"},
|
||||
{"elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate", "elepower_dynamics:steel_plate"},
|
||||
}
|
||||
})
|
||||
|
||||
-- Steam Turbine
|
||||
minetest.register_craft({
|
||||
output = "elepower_machines:steam_turbine",
|
||||
recipe = {
|
||||
{"elepower_dynamics:induction_coil", "elepower_machines:turbine_blades", "elepower_dynamics:induction_coil"},
|
||||
{"elepower_dynamics:steel_plate", "elepower_machines:machine_block", "elepower_dynamics:steel_plate"},
|
||||
{"elepower_dynamics:invar_gear", "elepower_machines:turbine_blades", "elepower_dynamics:invar_gear"},
|
||||
}
|
||||
})
|
||||
|
10
elepower_machines/craftitems.lua
Normal file
10
elepower_machines/craftitems.lua
Normal file
@ -0,0 +1,10 @@
|
||||
|
||||
minetest.register_craftitem("elepower_machines:compressor_piston", {
|
||||
description = "Compressor Piston",
|
||||
inventory_image = "elepower_compressor_piston.png"
|
||||
})
|
||||
|
||||
minetest.register_craftitem("elepower_machines:turbine_blades", {
|
||||
description = "Turbine Blades",
|
||||
inventory_image = "elepower_turbine.png"
|
||||
})
|
@ -14,6 +14,7 @@ dofile(modpath.."/machines/init.lua")
|
||||
|
||||
-- Other
|
||||
dofile(modpath.."/nodes.lua")
|
||||
dofile(modpath.."/craftitems.lua")
|
||||
|
||||
-- Crafting recipes
|
||||
dofile(modpath.."/crafting.lua")
|
||||
|
17
elepower_machines/machines/compressor.lua
Normal file
17
elepower_machines/machines/compressor.lua
Normal file
@ -0,0 +1,17 @@
|
||||
|
||||
elepm.register_craft_type("compress", {
|
||||
description = "Compressing",
|
||||
inputs = 1,
|
||||
})
|
||||
|
||||
elepm.register_crafter("elepower_machines:compressor", {
|
||||
description = "Compressor",
|
||||
craft_type = "compress",
|
||||
ele_usage = 32,
|
||||
tiles = {
|
||||
"elepower_machine_top.png^elepower_power_port.png", "elepower_machine_base.png^elepower_power_port.png",
|
||||
"elepower_compressor.png", "elepower_compressor.png", "elepower_compressor.png", "elepower_compressor.png",
|
||||
},
|
||||
ele_no_automatic_ports = true,
|
||||
groups = {oddly_breakable_by_hand = 1}
|
||||
})
|
@ -22,6 +22,7 @@ dofile(mp .. "grindstone.lua")
|
||||
dofile(mp .. "alloy_furnace.lua")
|
||||
dofile(mp .. "coal_alloy_furnace.lua")
|
||||
dofile(mp .. "solderer.lua")
|
||||
dofile(mp .. "compressor.lua")
|
||||
|
||||
-- Other
|
||||
dofile(mp .. "accumulator.lua")
|
||||
|
BIN
elepower_machines/textures/elepower_compressor.png
Normal file
BIN
elepower_machines/textures/elepower_compressor.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 6.5 KiB |
BIN
elepower_machines/textures/elepower_compressor_piston.png
Normal file
BIN
elepower_machines/textures/elepower_compressor_piston.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.9 KiB |
BIN
elepower_machines/textures/elepower_turbine.png
Normal file
BIN
elepower_machines/textures/elepower_turbine.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 19 KiB |
Loading…
Reference in New Issue
Block a user