Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Don't need this
- function pack(...)
- retVal = {}
- for i, v in ipairs(arg) do
- table.insert(retVal, v)
- end
- return retVal
- end
- --Don't need this either
- function writeToMonitors(monitors, word)
- for i, v in ipairs(monitors) do
- v.setCursorPos(1,1)
- v.write(word)
- end
- end
- function getAllPeripherals(filter)
- retVal = {}
- filter = filter or false
- peripherals = peripheral.getNames()
- if not filter then
- return peripherals
- end
- for i,v in ipairs(peripherals) do
- if peripheral.getType(v) == filter then
- table.insert(retVal, peripheral.wrap(v))
- end
- end
- return retVal
- end
- monitors = getAllPeripherals("monitor")
- local reactor1 = peripheral.wrap("BigReactors-Reactor_0")
- while true do
- for i,v in ipairs(monitors) do
- local mon = v
- mon.clear()
- mon.setTextColor(colors.white)
- mon.setTextScale(1)
- mon.setCursorPos(1,1)
- mon.write("STATUS: ")
- if reactor1.getActive(true) then
- mon.setBackgroundColor(colors.lime)
- mon.write("ACTIVE")
- else
- mon.setBackgroundColor(colors.red)
- mon.write("INACTIVE")
- end
- mon.setBackgroundColor(colors.black)
- mon.setCursorPos(1,4)
- mon.write("Energy Production: " .. math.floor(reactor1.getEnergyProducedLastTick()) .. " RF/t")
- mon.setCursorPos(1,5)
- mon.write("Energy Stored: " .. math.floor(reactor1.getEnergyStored()) .. " RF")
- mon.setCursorPos(1,7)
- mon.write("Fuel Tank " .. reactor1.getFuelAmountMax() .. " mB")
- mon.setCursorPos(1,8)
- mon.write("Fuel Available: " .. math.floor(reactor1.getFuelAmount()) .. " mB")
- mon.setCursorPos(1,9)
- mon.write("Fuel Usage: " .. reactor1.getFuelConsumedLastTick() .. " mB/t")
- mon.setCursorPos(1,10)
- mon.write("Fuel Temperature: " .. math.floor(reactor1.getFuelTemperature()) .." C")
- mon.setCursorPos(1,11)
- mon.write("Casing Temperature:" .. math.floor(reactor1.getCasingTemperature()) .. " C")
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement