updated
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
local maxValue = 100
|
||||
local minValue = 0
|
||||
local maxValue = 80
|
||||
local minValue = 60
|
||||
|
||||
local function getValue()
|
||||
return (reactor.getCoolantFilledPercentage() or 0) * 100
|
||||
@@ -7,6 +7,13 @@ end
|
||||
|
||||
local function checkCoolantLevel()
|
||||
local coolantLevel = getValue()
|
||||
if coolantLevel > maxValue then
|
||||
print("Warning: Coolant above maximum! Stepping down burn rate.")
|
||||
burnRateDriver.stepDown()
|
||||
elseif coolantLevel < minValue then
|
||||
print("Warning: Coolant below minimum! Stepping up burn rate.")
|
||||
burnRateDriver.stepUp()
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user