Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local modemSide = "back"
- local monitor = peripheral.wrap("left")
- rednet.open(modemSide)
- local function formatEMCValue(emc)
- local billion = emc / 1000000000
- return string.format("%.2fB", billion)
- end
- while true do
- local senderID, message = rednet.receive()
- monitor.clear()
- monitor.setBackgroundColor(colors.black)
- monitor.setTextColor(colors.red)
- monitor.setCursorPos(1, 1)
- monitor.write("Chest Contents")
- monitor.setCursorPos(1, 2)
- monitor.write("EMC: " .. formatEMCValue(tonumber(message)))
- end
Add Comment
Please, Sign In to add comment