Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local sides = {"top", "bottom", "left", "right", "back", "front"}
- local speaker, sSide = peripheral.find("speaker")
- local monitor, mSide
- local temp
- for i=1, #sides do
- if peripheral.getType(sides[i]) == "monitor" then
- monitor = peripheral.wrap(sides[i])
- mSide = sides[i]
- elseif peripheral.getType(sides[i]) == "speaker" then
- speaker = peripheral.wrap(sides[i])
- sSide = sides[i]
- end
- end
- function newSong()
- return {
- image = {};
- title = "",
- artist = "",
- duration = 0
- }
- end
- function setUpMainDisplay(w, h)
- monitor.setBackgroundColour = colors.black
- monitor.setTextScale(0.5)
- local maxX = w
- local maxY = h
- paintutils.drawPixel(maxX-2, 2, colors.white)
- paintutils.drawPixel(maxX-1, 2, colors.white)
- paintutils.drawPixel(maxX-1, 2, colors.white)
- paintutils.drawPixel(maxX-1, 1, colors.white)
- end
- term.redirect(peripheral.wrap(mSide))
- local w, h = monitor.getSize()
- setUpMainDisplay(w, h)
Advertisement
Add Comment
Please, Sign In to add comment