Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Specify the modem side and monitor side
- local modemSide = "back"
- local monitorSide = "right"
- -- Define the modem and monitor
- local modem = peripheral.wrap(modemSide)
- local monitor = peripheral.wrap(monitorSide)
- -- Wrap the IC2 nuclear reactor directly using its known name
- local reactor = peripheral.wrap("ic2:nuclear_reactor_20")
- -- Main loop
- while true do
- -- Clear the monitor
- monitor.clear()
- monitor.setCursorPos(1, 1)
- -- Read reactor information
- local currentHeat = reactor.getHeat()
- local euOutput = reactor.getEUOutput()
- local euStored = reactor.getEUCapacity()
- monitor.write("Reactor Temperature: " .. currentHeat)
- monitor.setCursorPos(1, 2)
- monitor.write("Generated Energy: " .. euOutput .. " EU/t")
- monitor.setCursorPos(1, 3)
- monitor.write("EU Storage Capacity: " .. euStored .. " EU")
- -- Sleep duration (in seconds)
- os.sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement