Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Script to monitor the fusion reactor from Mekanism. Mostly for fun to visualize levels.
- -- Written for Mekanism & CC:Tweaked
- -- Script by craftersanonmoose
- -- Version history
- -- version 0.1 3/21/25
- -- adding monitoring functionality
- -- will add buttons to control injection rate later
- --------------------------------------------------------------------------------
- -- prepare monitor
- mon = peripheral.wrap("top")
- mon.clear()
- reactor = peripheral.wrap("fusionReactorLogicAdapter")
- -- get and display information
- function displayInfo()
- mon.setTextScale(1)
- -- Reactor Section
- mon.setCursorPos(1,2)
- mon.write("Fusion Reactor")
- if reactor.getPassiveGeneration(true) ==> 1 then
- mon.setCursorPos(1,3)
- mon.write("Status:")
- mon.setCursorPos(1,4)
- -- mon.clearLine()
- mon.write("Active ")
- else
- mon.setCursorPos(1,3)
- mon.write("Status:")
- mon.setCursorPos(1,4)
- -- mon.clearLine()
- mon.write("Disabled")
- end
- mon.setCursorPos(1,12)
- mon.write("Injection Rate")
- mon.setCursorPos(1,13)
- mon.write(reactor.getInjectionRate())
- -- mon.setCursorPos(1,8)
- -- mon.write("Current Burn Rate: ")
- -- mon.setCursorPos(1,10)
- -- mon.write(reactor.getActualBurnRate())
- mon.setCursorPos(1,16)
- mon.write("Current Temp:")
- mon.setCursorPos(1,17)
- mon.write(math.floor(reactor.getCaseHeat() - 273.15).."C ")
- end
- while true do
- displayInfo()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement