fixed integrity % and changed to actual burn rate on main screen

This commit is contained in:
Mikayla Fischler 2022-09-12 16:01:18 -04:00
parent 70d9da847e
commit 265368f9b2
3 changed files with 3 additions and 14 deletions

View File

@ -16,7 +16,7 @@ local config = require("coordinator.config")
local coordinator = require("coordinator.coordinator")
local renderer = require("coordinator.renderer")
local COORDINATOR_VERSION = "alpha-v0.4.9"
local COORDINATOR_VERSION = "alpha-v0.4.10"
local print = util.print
local println = util.println

View File

@ -34,7 +34,7 @@ local function new_view(root, x, y, data, ps)
ps.subscribe("computed_status", status.update)
ps.subscribe("temp", core_temp.update)
ps.subscribe("burn_rate", burn_r.update)
ps.subscribe("act_burn_rate", burn_r.update)
ps.subscribe("heating_rate", heating_r.update)
local reactor_fills = Rectangle{parent=root,border=border(1, colors.gray, true),width=24,height=7,x=(x + 29),y=y}

View File

@ -75,7 +75,7 @@ local function init(parent, id)
TextBox{parent=main,x=21,text="Containment Integrity",height=2,width=12,fg_bg=style.label}
local integ = DataIndicator{parent=main,x=21,label="",format="%9.0f",value=100,unit="%",lu_colors=lu_cpair,width=12,fg_bg=stat_fg_bg}
r_ps.subscribe("damage", function (x) integ.update(1.0 - (x / 100.0)) end)
r_ps.subscribe("damage", function (x) integ.update(100.0 - x) end)
main.line_break()
-- TextBox{parent=main,text="FL",x=21,y=19,height=1,width=2,fg_bg=style.label}
@ -283,17 +283,6 @@ local function init(parent, id)
main.line_break()
ColorMap{parent=main,x=2,y=51}
---@fixme test code
local rps = true
local function _test_toggle()
rps_trp.update(rps)
rps = not rps
tcallbackdsp.dispatch(0.25, _test_toggle)
end
---@fixme test code
tcallbackdsp.dispatch(0.25, _test_toggle)
return main
end