updated
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
local max = 90
|
||||
local maxVent = 70
|
||||
local minVent = 60
|
||||
local min = 40
|
||||
|
||||
local function getValue()
|
||||
return turbine.getSteamFilledPercentage() * 100
|
||||
end
|
||||
@@ -9,6 +14,21 @@ end
|
||||
|
||||
local function watch()
|
||||
print("Turbine Steam Filled: " .. getValue())
|
||||
local value = getValue()
|
||||
if value > max then
|
||||
print("Warning: Steam above maximum! Taking action.")
|
||||
reactor.scram();
|
||||
turbine.setDumpingMode("DUMPING")
|
||||
elseif value >= minVent and value <= maxVent then
|
||||
print("Steam within vent range. Adjusting vents.")
|
||||
turbine.setDumpingMode("DUMPING")
|
||||
elseif value >= min and value < minVent then
|
||||
print("Steam within normal operation range.")
|
||||
turbine.setDumpingMode("IDLE")
|
||||
elseif value < min then
|
||||
print("Warning: Steam below minimum! Taking action.")
|
||||
turbine.setDumpingMode("IDLE")
|
||||
end
|
||||
end
|
||||
|
||||
local function report()
|
||||
@@ -16,6 +36,6 @@ local function report()
|
||||
monitor.setBackgroundColor(color)
|
||||
value = getValue()
|
||||
monitor.clearLine()
|
||||
monitor.write("Turbine Steam" .. value .. "%")
|
||||
monitor.write("Turbine Steam: " .. value .. "%")
|
||||
end
|
||||
return { report = report, watch = watch }
|
||||
Reference in New Issue
Block a user