#118 refactored fluid

This commit is contained in:
Mikayla Fischler
2023-02-21 11:32:56 -05:00
parent a07086907e
commit 7247d8a828
2 changed files with 6 additions and 6 deletions

View File

@ -208,11 +208,11 @@ types.ALARM_STATE = {
---| "mekanism:sodium" ---| "mekanism:sodium"
---| "mekanism:superheated_sodium" ---| "mekanism:superheated_sodium"
types.fluid = { types.FLUID = {
empty_gas = "mekanism:empty_gas", EMPTY_GAS = "mekanism:empty_gas",
water = "minecraft:water", WATER = "minecraft:water",
sodium = "mekanism:sodium", SODIUM = "mekanism:sodium",
superheated_sodium = "mekanism:superheated_sodium" SUPERHEATED_SODIUM = "mekanism:superheated_sodium"
} }
---@alias rtu_t string ---@alias rtu_t string

View File

@ -129,7 +129,7 @@ function logic.update_annunciator(self)
such as when a burn rate consumes half the coolant in the tank, meaning that: 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 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 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 self.db.annunciator.HighStartupRate = not plc_db.mek_status.status and high_rate