local max = 90 local maxVent = 70 local minVent = 30 local min = 20 local function getValue() return turbine.getSteamFilledPercentage() * 100 end local function color() local value = getValue() return colors.black 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("DUMPING_EXCESS") elseif value < min then print("Warning: Steam below minimum! Taking action.") turbine.setDumpingMode("IDLE") end end local function report() local color = color() monitor.setBackgroundColor(color) value = getValue() monitor.clearLine() monitor.write("Turbine Steam: " .. value .. "%") end return { report = report, watch = watch }