Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- disks={
- [7]=true,
- }
- drives={
- "drive_0",
- "drive_1",
- }
- redstoneSide="bottom"
- function checkForDisk()
- for id,driveSide in ipairs(drives) do
- drive=peripheral.wrap(driveSide)
- if disk.isPresent() then
- checkDisk(driveSide)
- end
- end
- end
- function checkDisk(driveSide)
- if disks[disk.getID] then
- redstone.setOutput(redstoneSide,true)
- disk.eject(driveSide)
- sleep(5)
- redstone.setOutput(redstoneSide,false)
- end
- end
- while true do
- checkForDisk()
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement