Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- Importing required APIs
- local peripheral = require("peripheral")
- -- Define the side of the fusion reactor you want to monitor
- local fusionReactorSide = "top" -- Replace with the side where your reactor is connected
- -- Function to get the DT fuel being used in millibuckets per tick
- local function getDTFuelUsage()
- local fusionReactor = peripheral.find("mekanism:fusion_reactor")
- return fusionReactor.getDeuteriumTritiumFuelInjectionRate(fusionReactorSide)
- end
- -- Function to get the current power output
- local function getPowerOutput()
- local fusionReactor = peripheral.find("mekanism:fusion_reactor")
- return fusionReactor.getEnergyProducedLastTick(fusionReactorSide)
- end
- -- Main loop to continuously update the display
- while true do
- local dtFuelUsage = getDTFuelUsage()
- local powerOutput = getPowerOutput()
- print("DT Fuel Usage: " .. dtFuelUsage .. " mB/t")
- print("Power Output: " .. powerOutput .. " RF/t")
- os.sleep(1) -- Adjust the sleep duration as per your requirements
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement