mirror of
				https://fem.mint.lgbt/m/Rhythmblock.git
				synced 2024-08-14 20:27:11 +00:00 
			
		
		
		
	added peripheral seeking
This commit is contained in:
		
							parent
							
								
									9fa8b5946d
								
							
						
					
					
						commit
						0862f9589a
					
				
					 1 changed files with 3 additions and 2 deletions
				
			
		| 
						 | 
					@ -1,13 +1,14 @@
 | 
				
			||||||
local accentColor = colors.gray 
 | 
					local accentColor = colors.gray 
 | 
				
			||||||
local buttonColor = colors.lightGray
 | 
					local buttonColor = colors.lightGray
 | 
				
			||||||
local backgroundColor = colors.black
 | 
					local backgroundColor = colors.black
 | 
				
			||||||
 | 
					local drive = peripheral.getType("disk_drive")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
function playDisk()
 | 
					function playDisk()
 | 
				
			||||||
	disk.playAudio()
 | 
						disk.playAudio(drive)
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if disk.isPresent() and disk.hasAudio() then
 | 
					if disk.isPresent() and disk.hasAudio() then
 | 
				
			||||||
	playDisk()
 | 
						playDisk(drive)
 | 
				
			||||||
elseif disk.isPresent() then
 | 
					elseif disk.isPresent() then
 | 
				
			||||||
	print "Not a music disc"
 | 
						print "Not a music disc"
 | 
				
			||||||
else
 | 
					else
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue