Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Get Variables (args number of control rods)
- function getVars(numberRods)
- -- Fuel
- fuelMax = reactor.getFuelAmountMax()
- fuelAmount = reactor.getFuelAmount()
- -- Waste
- wasteMax = reactor.getFuelAmountMax()
- wasteAmount = reactor.getWasteAmount()
- -- Control Rods
- for i = 0, numberRods do
- 'r'..i = (100-(reactor.getControlRodLevel(i)))
- end
- -- Temps
- casingTemp = reactor.getCasingTemperature()
- fuelTemp = reactor.getFuelTemperature()
- -- Flux
- rfStored = reactor.getEnergyStored()
- rfStoredFormat = rfStored / 1000
- rfPerTick = reactor.getEnergyProducedLastTick()
- -- Strings
- fuelAmountText = math.floor(((reactor.getFuelAmount()/reactor.getFuelAmountMax())*100)+0.5)
- wasteAmountText = math.floor(((reactor.getWasteAmount()/reactor.getFuelAmountMax())*100)+0.5)
- casingTempText = math.floor(reactor.getCasingTemperature()*100)+0.5
- end
- -- Title Function (cursorPosX, cursorPosY, Title, Color)
- function setTitles(curX, curY, title, color)
- -- Titles
- monitor.setCursorPos(curX, curY)
- monitor.setTextColor(colors..'.'..color)
- monitor.write(title)
- end
- -- Draw Bars ProgressBar.SetTable("name", max, current, xMin, xMax, y)
- function drawBars(name, maxAmount, currentAmount, xMin, xMax, y)
- ProgressBar.SetTable(name, maxAmount, currentAmount, xMin, xMax, y)
- end
- if not fs.exists('ProgressBar') then
- print('Downloading ProgressBar API...')
- pastebin get rzxj0kkm ProgressBar
- else
- print('You have the ProgressBar API')
- end
- -- Load ProgressBar API
- os.loadAPI("ProgressBar")
- ProgressBar.SetPeripheral("back")
- -- Vars
- emptyflag = 0
- offlineflag = 0
- flashflag = 0
- -- Peripherals
- reactor = peripheral.wrap('BigReactors-Reactor_1')
- monitor = peripheral.wrap('back')
- -- Monitor Settings
- monitor.setTextScale(1)
- monitor.setBackgroundColor(colors.black)
- while true do
- monitor.clear()
- sleep(1)
- getVars(4)
- -- Titles
- setTitles(1, 1, "Fuel Levels:", yellow)
- setTitles(20, 2, fuelAmountText.." % Fuel", yellow)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement