Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Written by rahph.
- --Send nukes I mean nudes
- --Anyway, config
- local tape0 = peripheral.wrap("tape_drive_3")
- local tape1 = peripheral.wrap("tape_drive_0")
- local tape2 = peripheral.wrap("tape_drive_2")
- local tape3 = peripheral.wrap("tape_drive_1")
- local lowestVolume = 0
- local defaultVolume = 0.5
- local highestVolume = 1
- local lowestSpeed = 0.25
- local defaultSpeed = 1
- local highestSpeed = 2
- --End config. Dont alter the program beyond this line unless you know what ya doin
- mon = peripheral.wrap("top")
- x,y = mon.getSize()
- function redraw(vol,speed,light)
- local objloc = {}
- objloc["tape"] = {}
- objloc.tape[1] = {}
- objloc.tape[1]["volume"] = {}
- objloc.tape[1]["volume"]["up"] = {}
- objloc.tape[1]["volume"]["down"] = {}
- objloc.tape[1]["speed"] = objloc.tape[1]["volume"]
- objloc.tape[2] = objloc.tape[1]
- objloc.tape[3] = objloc.tape[1]
- objloc.tape[4] = objloc.tape[1]
- objloc.light = {}
- mon.setPaletteColor(colors.blue,0x23272A)
- mon.setPaletteColor(colors.white,0xFFFFFF)
- mon.clear()
- mon.setBackgroundColor(colors.blue)
- mon.clear()
- mon.setTextColor(colors.white)
- mon.setCursorPos(1,2)
- mon.setPaletteColor(colors.gray,0x99AAB5)
- mon.setTextColor(colors.gray)
- for i=1,x do mon.write("\127") end
- mon.setCursorPos(1,1)
- for i=1,x do mon.write("\127") end
- mon.setCursorPos(1,3)
- for i=1,x do mon.write("\127") end
- mon.setTextColor(colors.white)
- mon.setCursorPos((x-16)/2+1,2)
- mon.write(" DISCO CONTROLL ")
- mon.setCursorPos(((x/2)-6)/2,4)
- mon.write("TAPE 0")
- mon.setCursorPos((((x/2)-6)/2)+(x/2),4)
- mon.write("TAPE 1")
- mon.setCursorPos(((x/2)-6)/2,11)
- mon.write("TAPE 2")
- mon.setCursorPos((((x/2)-6)/2)+(x/2),11)
- mon.write("TAPE 3")
- mon.setTextColor(colors.gray)
- for i=4,y do mon.setCursorPos(25,i) mon.write("\127\127") end
- mon.setTextColor(colors.white)
- mon.setCursorPos((x/2)-10/2,18)
- mon.write("LIGHTS [ ]")
- mon.setTextColor(colors.gray)
- mon.setCursorPos(1,19)
- for i=1,x do mon.write("\127") end
- for i=1,y do mon.setCursorPos(1,i) mon.write("\127\127") end
- for i=1,y do mon.setCursorPos(x-1,i) mon.write("\127\127") end
- mon.setCursorPos(1,10)
- --for i=1,x do mon.write("\127") end
- --mon.setCursorPos(1,11)
- for i=1,x do mon.write("\127") end
- mon.setCursorPos(1,17)
- for i=1,x do mon.write("\127") end
- mon.setCursorPos(((x/2)-6)/2,6)
- mon.write("VOLUME")
- mon.setCursorPos(((x/2)-6)/2,8)
- mon.write("SPEED:")
- mon.setCursorPos((((x/2)-6)/2)+(x/2),6)
- mon.write("VOLUME")
- mon.setCursorPos((((x/2)-6)/2)+(x/2),8)
- mon.write("SPEED:")
- mon.setCursorPos(((x/2)-6)/2,13)
- mon.write("VOLUME")
- mon.setCursorPos(((x/2)-6)/2,15)
- mon.write("SPEED:")
- mon.setCursorPos((((x/2)-6)/2)+(x/2),13)
- mon.write("VOLUME")
- mon.setCursorPos((((x/2)-6)/2)+(x/2),15)
- mon.write("SPEED:")
- mon.setBackgroundColor(colors.white)
- objloc.tape[1].volume.down = ((x/2)-8)/2
- objloc.tape[1].volume.up = objloc.tape[1].volume.down + 7
- mon.setPaletteColor(colors.yellow,0x7289DA)
- mon.setBackgroundColor(colors.yellow)
- mon.setTextColor(colors.white)
- mon.setCursorPos(objloc.tape[1].volume.down,7)
- mon.write("\171 \187")
- mon.setBackgroundColor(colors.white)
- mon.setTextColor(colors.black)
- mon.setCursorPos(((x/2)-6)/2,7)
- mon.write(" ")
- if #tostring(vol[1]) % 2 == 1 then
- mon.setCursorPos(((x/2)-#tostring(vol[1]))/2-1,7)
- else
- mon.setCursorPos(((x/2)-#tostring(vol[1]))/2,7)
- end
- mon.write(vol[1])
- end
- redraw({1,1.02,0.25,2},{1,1,2,2},false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement