Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function clearScreen()
- -- Clears the screen and selects top left corner
- term.clear()
- term.setCursorPos(1,1)
- end
- function reactorStatus()
- -- Checks whether the Reactor is currently Online or Offline
- if r.getActive() == true then
- rStatus = "Online"
- elseif r.getActive() == false then
- rStatus = "Offline"
- end
- end
- function comDisplay()
- -- The Main Display of the Computer Terminal
- print("Reactor is Currently: ", rStatus)
- print("Energy Stored: ", r.getEnergyStored(), " Rf/t")
- print("Energy Currently Produced: ", math.floor(r.getEnergyProducedLastTick()), " Rf/t")
- print("Fuel: ", r.getFuelAmount(), " / ", r.getFuelAmountMax(), " mB")
- print("Fuel Temperature: ", math.floor(r.getFuelTemperature()), " C")
- print("Waste: ", r.getWasteAmount(), " mB")
- print("Coolant Amount: ", r.getCoolantAmount(), " mB")
- print("Control Rods: ", r.getNumberOfControlRods(), " Rods")
- end
- function arrayVariables()
- -- Creates and wirelessly sends the Array
- --###Need to finish Reactor Status.
- energyStored = r.getEnergyStored()
- energyProduced = r.getEnergyProducedLastTick()
- totalFuel = r.getFuelAmount()
- fuelMax = r.getFuelAmountMax()
- fuelTemp = r.getFuelTemperature()
- waste = r.getWasteAmount()
- coolantAmount = r.getCoolantAmount()
- controlRods = r.getNumberOfControlRods()
- reactorArray = {energyStored, energyProduced, totalFuel, fuelTemp, waste, coolantAmount, controlRods, fuelMax, rStatus}
- rednet.send(5, reactorArray)
- end
- r = peripheral.wrap("back")
- clearScreen()
- rStatus = "???"
- -- This is the loop to run the bulk of the program
- while true do
- reactorStatus()
- arrayVariables()
- comDisplay()
- sleep(0.1)
- clearScreen()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement