better and formatted info
This commit is contained in:
parent
4095189450
commit
d1ef7d3391
|
@ -1,5 +1,6 @@
|
|||
-- user options
|
||||
local options = {
|
||||
compact = true,
|
||||
channels = 10,
|
||||
timeout = 15
|
||||
}
|
||||
|
@ -22,25 +23,29 @@ wait_for_components(options, system, 'BiggerReactors_Reactor', 'Bigger Reactor')
|
|||
function generate_message(buffer)
|
||||
-- read induction matrix values
|
||||
local a_raw = system.main.active()
|
||||
local b_raw = system.main.battery()
|
||||
local f_raw = system.main.fuelTank()
|
||||
local c_raw = system.main.coolantTank()
|
||||
local s_raw = system.main.battery().stored()
|
||||
local m_raw = system.main.battery().capacity()
|
||||
local f_raw = system.main.fuelTank().fuel()
|
||||
local c_raw = system.main.fuelTank().capacity()
|
||||
local ft_raw = system.main.fuelTemperature()
|
||||
local ct_raw = system.main.casingTemperature()
|
||||
|
||||
-- format and align reactor status and internal battery
|
||||
message_aligned(buffer, 'Status...:', a_raw, system.width)
|
||||
message_aligned(buffer, 'Battery..:', b_raw, system.width)
|
||||
message_aligned(buffer, 'Status...:', a_raw and 'ACTIVE' or 'OFFLINE', system.width)
|
||||
|
||||
message(buffer, '\n')
|
||||
message_aligned(buffer, 'Stored...:', format_energy(options, s_raw), system.width)
|
||||
message_aligned(buffer, 'Capacity.:', format_energy(options, m_raw), system.width)
|
||||
|
||||
-- format and align fuel and coolant fill
|
||||
message(buffer, '\n')
|
||||
message_aligned(buffer, 'Fuel.....:', f_raw, system.width)
|
||||
message_aligned(buffer, 'Coolant..:', c_raw, system.width)
|
||||
message_aligned(buffer, 'Fuel.....:', options.compact and compact_number(f_raw) or f_raw, system.width)
|
||||
message_aligned(buffer, 'Capacity.:', options.compact and compact_number(c_raw) or c_raw, system.width)
|
||||
|
||||
-- format and align temperatures
|
||||
message(buffer, '\n')
|
||||
message_aligned(buffer, 'Fuel Temp:', ft_raw, system.width)
|
||||
message_aligned(buffer, 'Case Temp:', ct_raw, system.width)
|
||||
message_aligned(buffer, 'Fuel Temp:', format_temp(options, ft_raw), system.width)
|
||||
message_aligned(buffer, 'Case Temp:', format_temp(options, ct_raw), system.width)
|
||||
end
|
||||
|
||||
function send_info()
|
||||
|
|
Loading…
Reference in New Issue
Block a user