From 265368f9b200e04a62526692abf842757fdcc527 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Mon, 12 Sep 2022 16:01:18 -0400 Subject: [PATCH] fixed integrity % and changed to actual burn rate on main screen --- coordinator/startup.lua | 2 +- coordinator/ui/components/reactor.lua | 2 +- coordinator/ui/components/unit_detail.lua | 13 +------------ 3 files changed, 3 insertions(+), 14 deletions(-) diff --git a/coordinator/startup.lua b/coordinator/startup.lua index 4df19bf..b008b59 100644 --- a/coordinator/startup.lua +++ b/coordinator/startup.lua @@ -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 diff --git a/coordinator/ui/components/reactor.lua b/coordinator/ui/components/reactor.lua index 09f82f9..e04a34e 100644 --- a/coordinator/ui/components/reactor.lua +++ b/coordinator/ui/components/reactor.lua @@ -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} diff --git a/coordinator/ui/components/unit_detail.lua b/coordinator/ui/components/unit_detail.lua index 16ae5ca..2ef2dbe 100644 --- a/coordinator/ui/components/unit_detail.lua +++ b/coordinator/ui/components/unit_detail.lua @@ -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