elepower/elepower_machines/machines/steam_turbine.lua

46 lines
1.4 KiB
Lua
Raw Normal View History

-- 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]"..
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]"..
epr.get_hotbar_bg(0, 4.25)
2018-07-28 14:29:56 +00:00
end
ele.register_fluid_generator("elepower_machines:steam_turbine", {
description = "Steam Turbine",
2018-07-28 14:29:56 +00:00
ele_usage = 128,
ele_output = 128,
tiles = {
"elepower_machine_top.png^elepower_power_port.png", "elepower_machine_base.png", "elepower_machine_side.png",
"elepower_machine_side.png", "elepower_machine_side.png^elepower_turbine_side.png", "elepower_machine_side.png^elepower_turbine_side.png",
},
ele_active_node = true,
ele_active_nodedef = {
tiles = {
"elepower_machine_top.png^elepower_power_port.png", "elepower_machine_base.png", "elepower_machine_side.png",
"elepower_machine_side.png", "elepower_machine_side.png^elepower_turbine_side.png", "elepower_machine_side.png^elepower_turbine_side.png",
},
},
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,
})