drive checking business
This commit is contained in:
parent
6dcb436e55
commit
e745f00764
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