mirror of
https://fem.mint.lgbt/m/Rhythmblock.git
synced 2024-08-14 20:27:11 +00:00
drive checking business
This commit is contained in:
parent
6dcb436e55
commit
e745f00764
1 changed files with 14 additions and 2 deletions
16
neodj.lua
16
neodj.lua
|
@ -1,9 +1,21 @@
|
|||
accentColor = colors.gray
|
||||
buttonColor = colors.lightGray
|
||||
backgroundColor = colors.black
|
||||
drive = peripheral.find("disk_drive")
|
||||
if drive == nil then
|
||||
peripherals = peripheral.getNames()
|
||||
if #peripherals < 0 then
|
||||
print "No drive"
|
||||
else
|
||||
for n = 1, #peripherals do
|
||||
local driveCheck = peripherals[n]
|
||||
if peripheral.getType(driveCheck) == "drive" then
|
||||
drive = driveCheck
|
||||
driveCount = driveCount + 1
|
||||
end
|
||||
end
|
||||
if driveCount => 1 then
|
||||
print("Too many disk drives. Please remove some and try again")
|
||||
exit()
|
||||
end
|
||||
end
|
||||
|
||||
function playDisc()
|
||||
|
|
Loading…
Reference in a new issue