From 7247d8a828e4b78de01b9002c72f6f1281326966 Mon Sep 17 00:00:00 2001 From: Mikayla Fischler Date: Tue, 21 Feb 2023 11:32:56 -0500 Subject: [PATCH] #118 refactored fluid --- scada-common/types.lua | 10 +++++----- supervisor/unitlogic.lua | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/scada-common/types.lua b/scada-common/types.lua index 1437a56..c452154 100644 --- a/scada-common/types.lua +++ b/scada-common/types.lua @@ -208,11 +208,11 @@ types.ALARM_STATE = { ---| "mekanism:sodium" ---| "mekanism:superheated_sodium" -types.fluid = { - empty_gas = "mekanism:empty_gas", - water = "minecraft:water", - sodium = "mekanism:sodium", - superheated_sodium = "mekanism:superheated_sodium" +types.FLUID = { + EMPTY_GAS = "mekanism:empty_gas", + WATER = "minecraft:water", + SODIUM = "mekanism:sodium", + SUPERHEATED_SODIUM = "mekanism:superheated_sodium" } ---@alias rtu_t string diff --git a/supervisor/unitlogic.lua b/supervisor/unitlogic.lua index d4e1d68..4ee66b1 100644 --- a/supervisor/unitlogic.lua +++ b/supervisor/unitlogic.lua @@ -129,7 +129,7 @@ function logic.update_annunciator(self) such as when a burn rate consumes half the coolant in the tank, meaning that: 50% at some point will be in the boiler, and 50% in a tube, so that leaves 0% in the reactor ]]-- - local heating_rate_conv = util.trinary(plc_db.mek_status.ccool_type == types.fluid.sodium, 200000, 20000) + local heating_rate_conv = util.trinary(plc_db.mek_status.ccool_type == types.FLUID.SODIUM, 200000, 20000) local high_rate = (plc_db.mek_status.ccool_amnt / (plc_db.mek_status.burn_rate * heating_rate_conv)) < 4 self.db.annunciator.HighStartupRate = not plc_db.mek_status.status and high_rate