2017-02-24 23:32:58 +01:00
|
|
|
-- power/gen.lua
|
|
|
|
|
|
|
|
local me = microexpansion
|
2023-12-19 20:12:29 +01:00
|
|
|
local fuel_fired_generator_recipe = nil
|
|
|
|
if minetest.get_modpath("mcl_core") then
|
|
|
|
fuel_fired_generator_recipe = {
|
|
|
|
{ 1, {
|
|
|
|
{ "mcl_core:iron_ingot", "mcl_furnaces:furnace", "mcl_core:iron_ingot" },
|
|
|
|
{ "mcl_core:iron_ingot", "microexpansion:machine_casing", "mcl_core:iron_ingot" },
|
|
|
|
{ "mcl_core:iron_ingot", "mcl_core:iron_ingot", "mcl_core:iron_ingot" },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
fuel_fired_generator_recipe = {
|
|
|
|
{ 1, {
|
|
|
|
{ "default:steel_ingot", "default:furnace", "default:steel_ingot" },
|
|
|
|
{"default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot" },
|
|
|
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
|
|
|
},
|
|
|
|
}
|
|
|
|
}
|
|
|
|
end
|
2017-02-24 23:32:58 +01:00
|
|
|
|
|
|
|
-- [register node] Fuel Fired Generator
|
2017-07-25 19:47:25 +02:00
|
|
|
me.register_machine("fuel_fired_generator", {
|
|
|
|
description = "Fuel-Fired Generator",
|
|
|
|
tiles = {
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
2017-02-25 07:09:06 +01:00
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
2017-02-24 23:32:58 +01:00
|
|
|
"fuelgen_front",
|
2017-07-25 19:47:25 +02:00
|
|
|
},
|
2023-12-19 20:12:29 +01:00
|
|
|
recipe = fuel_fired_generator_recipe,
|
2017-07-25 19:47:25 +02:00
|
|
|
groups = { cracky = 1 },
|
|
|
|
connect_sides = "machine",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
status = "unstable",
|
|
|
|
machine = {
|
|
|
|
type = "provider",
|
2020-02-27 15:33:45 +01:00
|
|
|
on_survey = function() -- args: pos
|
2019-05-01 13:20:09 +02:00
|
|
|
--TODO: burn fuel
|
2017-07-25 19:47:25 +02:00
|
|
|
return 5 -- Generate 5 ME/tick
|
|
|
|
end,
|
|
|
|
},
|
2017-02-24 23:32:58 +01:00
|
|
|
})
|
2017-02-24 23:42:52 +01:00
|
|
|
|
2019-05-01 13:20:09 +02:00
|
|
|
--[[register node] Super Smelter
|
2017-02-24 23:42:52 +01:00
|
|
|
me.register_node("super_smelter", {
|
2017-07-25 19:47:25 +02:00
|
|
|
description = "Super Smelter",
|
|
|
|
tiles = {
|
2017-02-25 07:09:06 +01:00
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
2017-02-24 23:42:52 +01:00
|
|
|
"super_smelter_front",
|
|
|
|
},
|
2017-07-25 19:47:25 +02:00
|
|
|
recipe = {
|
|
|
|
{ 1, {
|
|
|
|
{ "default:furnace", "default:furnace", "default:furnace" },
|
|
|
|
{ "default:steel_ingot", "microexpansion:machine_casing", "default:steel_ingot" },
|
|
|
|
{ "default:steel_ingot", "default:steel_ingot", "default:steel_ingot" },
|
|
|
|
},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
groups = { cracky = 1, me_connect = 1, },
|
|
|
|
connect_sides = "machine",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
status = "unstable",
|
|
|
|
machine = {
|
|
|
|
type = "consumer",
|
|
|
|
on_survey = function(pos)
|
|
|
|
return 5 -- Consume 5 ME/tick
|
|
|
|
end,
|
|
|
|
},
|
2017-02-24 23:42:52 +01:00
|
|
|
})
|
2017-02-25 07:09:48 +01:00
|
|
|
|
|
|
|
-- [register item] Geothermal Generator
|
|
|
|
me.register_node("geo_generator", {
|
2017-07-25 19:47:25 +02:00
|
|
|
description = "Geothermal Generator",
|
|
|
|
tiles = {
|
2017-02-25 07:09:48 +01:00
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"machine_sides",
|
|
|
|
"geogen_front",
|
|
|
|
},
|
2017-07-25 19:47:25 +02:00
|
|
|
groups = { cracky = 1, me_connect = 1, },
|
|
|
|
connect_sides = "machine",
|
|
|
|
paramtype2 = "facedir",
|
|
|
|
status = "unstable",
|
|
|
|
machine = {
|
|
|
|
type = "provider",
|
|
|
|
on_survey = function(pos)
|
|
|
|
return 10 -- Generate 10 ME/tick
|
|
|
|
end,
|
|
|
|
},
|
2019-05-01 13:20:09 +02:00
|
|
|
})]]
|