updated
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
local maxValue = 100
|
local maxValue = 80
|
||||||
local minValue = 0
|
local minValue = 60
|
||||||
|
|
||||||
local function getValue()
|
local function getValue()
|
||||||
return (reactor.getCoolantFilledPercentage() or 0) * 100
|
return (reactor.getCoolantFilledPercentage() or 0) * 100
|
||||||
@@ -7,6 +7,13 @@ end
|
|||||||
|
|
||||||
local function checkCoolantLevel()
|
local function checkCoolantLevel()
|
||||||
local coolantLevel = getValue()
|
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
|
return true
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user