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
|
accentColor = colors.gray
|
||||||
buttonColor = colors.lightGray
|
buttonColor = colors.lightGray
|
||||||
backgroundColor = colors.black
|
backgroundColor = colors.black
|
||||||
drive = peripheral.find("disk_drive")
|
peripherals = peripheral.getNames()
|
||||||
if drive == nil then
|
if #peripherals < 0 then
|
||||||
print "No drive"
|
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
|
end
|
||||||
|
|
||||||
function playDisc()
|
function playDisc()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue