Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Set variables
- local mon = peripheral.wrap("right")
- local reactor = peripheral.wrap("left")
- local x = 1
- --Variables from Reactor
- --local ActivationEnergy = peripheral.call("left", "getActivationEnergy", "left")
- local methods = peripheral.isPresent("left") and peripheral.getMethods("left") or {"No methods"}
- -- local methods = peripheral.call("left", "getAdvancedMethodsData")
- --local methods = peripheral.call("left", "getTankInfo","right")
- -- output reactor methods to monitor
- mon.clear()
- mon.setCursorPos(1,1)
- mon.setBackgroundColor(colors.blue)
- mon.setTextColor(colors.yellow)
- --mon.setBackgroundColor(colors.black)
- mon.write("Fusion Reactor Data")
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.white)
- mon.write("----------------------")
- while true do
- os.startTimer(.25)
- os.pullEvent("timer")
- x = 3
- mon.setCursorPos(1,x)
- mon.write("Activation Energy: "..peripheral.call("left", "getActivationEnergy", "left"))
- mon.setCursorPos(1,5)
- mon.write("Tank Info: ")
- local tankinfo = peripheral.call("left", "getTankInfo", "left")
- x = 6
- --for k, v in pairs(tankinfo) do
- -- print(k, v[1], v[2], v[3])
- --end
- --while tankinfo[n] ~= nil do
- -- mon.setCursorPos(1,x)
- -- x = x + 1
- -- --mon.write(" "..i.." = "..tankinfo[n])
- -- mon.write(" ")
- -- mon.write(tankinfo[n])
- --n = n + 1
- --end
- for i = 1, #tankinfo do
- mon.setCursorPos(1,x)
- x = x + 1
- --mon.write(" "..i.." = "..tankinfo[i])
- mon.write(" ")
- mon.write(tankinfo[i])
- end
- x = x + 1
- mon.setCursorPos(1,x)
- mon.write("Energy Stored: "..peripheral.call("left", "getEnergyStored", "left"))
- x = x + 2
- mon.setCursorPos(1,x)
- mon.write("MJ Stored: "..peripheral.call("left", "getMJStored", "left"))
- x = x + 2
- mon.setCursorPos(1,x)
- mon.write("Max Energy Stored: "..peripheral.call("left", "getMaxEnergyStored", "left"))
- x = x + 2
- mon.setCursorPos(1,x)
- mon.write("Max MJ Received: "..peripheral.call("left", "getMaxMJReceived", "left"))
- x = x + 2
- mon.setCursorPos(1,x)
- mon.write("Max MJ Stored: "..peripheral.call("left", "getMaxMJStored", "left"))
- x = x + 2
- mon.setCursorPos(1,x)
- mon.write("Min MJ Received: "..peripheral.call("left", "getMinMJReceived", "left"))
- end
- --for i = 1, #methods do
- -- mon.setCursorPos(1,x)
- -- x = x + 1
- -- mon.write(i.." = "..methods[i])
- -- --mon.write(methods[i])
- --end
- --x = x + 1
- --mon.setCursorPos(1,x)
- --mon.write("MJ Stored: "..peripheral.call("left", "getMJStored", "left"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement