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()
|
local function getValue()
|
||||||
return turbine.getSteamFilledPercentage() * 100
|
return turbine.getSteamFilledPercentage() * 100
|
||||||
end
|
end
|
||||||
@@ -9,6 +14,21 @@ end
|
|||||||
|
|
||||||
local function watch()
|
local function watch()
|
||||||
print("Turbine Steam Filled: " .. getValue())
|
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
|
end
|
||||||
|
|
||||||
local function report()
|
local function report()
|
||||||
@@ -16,6 +36,6 @@ local function report()
|
|||||||
monitor.setBackgroundColor(color)
|
monitor.setBackgroundColor(color)
|
||||||
value = getValue()
|
value = getValue()
|
||||||
monitor.clearLine()
|
monitor.clearLine()
|
||||||
monitor.write("Turbine Steam" .. value .. "%")
|
monitor.write("Turbine Steam: " .. value .. "%")
|
||||||
end
|
end
|
||||||
return { report = report, watch = watch }
|
return { report = report, watch = watch }
|
||||||
Reference in New Issue
Block a user