Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function findDev (dType)
- local d
- for _,d in pairs(peripheral.getNames()) do
- if (peripheral.getType(d) == dType) then
- return peripheral.wrap(d)
- end
- end
- return nil, dType..": not found"
- end
- r=findDev("BigReactors-Reactor")
- m=findDev("monitor")
- while true do
- energyStored = r.getEnergyStored()
- energyProduced = r.getEnergyProducedLastTick()
- active = r.getActive()
- fuel = r.getFuelAmount()/1000
- fuelTemperature = r.getFuelTemperature()
- m.clear()
- m.setCursorPos(1,1) m.write("Energy Stored: "..energyStored)
- m.setCursorPos(1,2) m.write("Energy Produced: "..energyProduced)
- m.setCursorPos(1,3) m.write("Active: ") m.write(active)
- m.setCursorPos(1,4) m.write("Fuel Amount: "..fuel)
- m.setCursorPos(1,5) m.write("Fuel Temperature: "..fuelTemperature)
- if energyStored < 5000000 then
- r.setActive(true)
- else
- r.setActive(false)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement