Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- arg = {...}
- assert(#arg == 2, 'usage: imageDisplay <image name> <advanced monitor side>')
- local mon = peripheral.wrap(arg[2])
- local image = fs.open('mcPaintFolder/images/'..arg[1], 'r')
- local imageString = image.readAll()
- local imageTable = textutils.unserialise(imageString)
- for i = 1, #imageTable do
- for k = 1, #imageTable[i] do
- mon.setCursorPos(i,k)
- mon.setBackgroundColor(imageTable[i][k])
- mon.write(' ')
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment