2018-07-11 19:01:31 +00:00
|
|
|
|
2021-08-11 10:25:00 +00:00
|
|
|
-- see elepower_papi >> external_nodes_items.lua for explanation
|
|
|
|
-- shorten table ref
|
|
|
|
local epr = ele.external.ref
|
|
|
|
|
2018-08-11 12:47:25 +00:00
|
|
|
local function get_formspec(power, percent, buffer, state)
|
2018-07-28 14:29:56 +00:00
|
|
|
return "size[8,8.5]"..
|
2021-08-11 10:25:00 +00:00
|
|
|
epr.gui_bg..
|
|
|
|
epr.gui_bg_img..
|
|
|
|
epr.gui_slots..
|
2018-07-28 14:29:56 +00:00
|
|
|
ele.formspec.power_meter(power)..
|
2018-08-11 12:47:25 +00:00
|
|
|
ele.formspec.state_switcher(3.5, 1.5, state)..
|
2018-07-28 14:29:56 +00:00
|
|
|
ele.formspec.fluid_bar(7, 0, buffer)..
|
|
|
|
"list[current_player;main;0,4.25;8,1;]"..
|
|
|
|
"list[current_player;main;0,5.5;8,3;8]"..
|
2021-08-11 10:25:00 +00:00
|
|
|
epr.get_hotbar_bg(0, 4.25)
|
2018-07-28 14:29:56 +00:00
|
|
|
end
|
|
|
|
|
2018-07-11 19:01:31 +00:00
|
|
|
ele.register_fluid_generator("elepower_machines:steam_turbine", {
|
|
|
|
description = "Steam Turbine",
|
2018-07-28 14:29:56 +00:00
|
|
|
ele_usage = 128,
|
2019-01-22 15:07:04 +00:00
|
|
|
ele_output = 128,
|
2018-07-11 19:01:31 +00:00
|
|
|
tiles = {
|
|
|
|
"elepower_machine_top.png^elepower_power_port.png", "elepower_machine_base.png", "elepower_machine_side.png",
|
2020-04-28 17:52:57 +00:00
|
|
|
"elepower_machine_side.png", "elepower_machine_side.png^elepower_turbine_side.png", "elepower_machine_side.png^elepower_turbine_side.png",
|
2018-07-11 19:01:31 +00:00
|
|
|
},
|
|
|
|
ele_active_node = true,
|
|
|
|
ele_active_nodedef = {
|
|
|
|
tiles = {
|
|
|
|
"elepower_machine_top.png^elepower_power_port.png", "elepower_machine_base.png", "elepower_machine_side.png",
|
2020-04-28 17:52:57 +00:00
|
|
|
"elepower_machine_side.png", "elepower_machine_side.png^elepower_turbine_side.png", "elepower_machine_side.png^elepower_turbine_side.png",
|
2018-07-11 19:01:31 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
fluid_buffers = {
|
|
|
|
steam = {
|
|
|
|
capacity = 8000,
|
|
|
|
accepts = {"elepower_dynamics:steam"},
|
|
|
|
drainable = false
|
|
|
|
}
|
|
|
|
},
|
|
|
|
tube = false,
|
|
|
|
ele_no_automatic_ports = true,
|
2018-07-28 14:29:56 +00:00
|
|
|
fuel_burn_time = 2,
|
|
|
|
get_formspec = get_formspec,
|
2018-07-11 19:01:31 +00:00
|
|
|
})
|