Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ------------------
- -- Code by Keno --
- ------------------
- os.loadAPI("ocs/apis/sensor")
- local monitor = peripheral.wrap("top")
- local euSensor = sensor.wrap("bottom")
- while true do
- local targets = euSensor.getTargets()
- local euStorage = {stored=0,capacity=0}
- for targetId, target in pairs(targets) do
- if target.Name == "MFSU" then
- local targetDetails = euSensor.getTargetDetails(targetId)
- euStorage.stored = euStorage.stored + targetDetails.Stored
- euStorage.capacity = euStorage.capacity + targetDetails.Capacity
- end
- end
- monitor.clear()
- monitor.setCursorPos(1,1)
- monitor.write(string.format("Stored "..euStorage.stored.." Capacity "..euStorage.capacity))
- sleep(1.0)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement