mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2025-07-26 03:22:51 +00:00
fix to induction matrix transfer bars not rescaling with capacity changes
This commit is contained in:
@ -19,7 +19,7 @@ local renderer = require("coordinator.renderer")
|
||||
local sounder = require("coordinator.sounder")
|
||||
local threads = require("coordinator.threads")
|
||||
|
||||
local COORDINATOR_VERSION = "v1.6.2"
|
||||
local COORDINATOR_VERSION = "v1.6.3"
|
||||
|
||||
local CHUNK_LOAD_DELAY_S = 30.0
|
||||
|
||||
|
@ -25,10 +25,9 @@ local ALIGN = core.ALIGN
|
||||
---@param root Container parent
|
||||
---@param x integer top left x
|
||||
---@param y integer top left y
|
||||
---@param data imatrix_session_db matrix data
|
||||
---@param ps psil ps interface
|
||||
---@param id number? matrix ID
|
||||
local function new_view(root, x, y, data, ps, id)
|
||||
local function new_view(root, x, y, ps, id)
|
||||
local label_fg = style.theme.label_fg
|
||||
local text_fg = style.theme.text_fg
|
||||
local lu_col = style.lu_colors
|
||||
@ -94,6 +93,7 @@ local function new_view(root, x, y, data, ps, id)
|
||||
TextBox{parent=rect,text="FILL I/O",x=2,y=20,width=8,fg_bg=label_fg}
|
||||
|
||||
local function calc_saturation(val)
|
||||
local data = db.facility.induction_data_tbl[id or 1]
|
||||
if (type(data.build) == "table") and (type(data.build.transfer_cap) == "number") and (data.build.transfer_cap > 0) then
|
||||
return val / data.build.transfer_cap
|
||||
else return 0 end
|
||||
|
@ -88,7 +88,7 @@ local function init(main)
|
||||
|
||||
util.nop()
|
||||
|
||||
imatrix(main, 131, cnc_bottom_align_start, facility.induction_data_tbl[1], facility.induction_ps_tbl[1])
|
||||
imatrix(main, 131, cnc_bottom_align_start, facility.induction_ps_tbl[1])
|
||||
end
|
||||
|
||||
return init
|
||||
|
Reference in New Issue
Block a user