Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local detect = peripheral.getNames()
- local radius
- local dm
- function dmFn()
- term.clear()
- term.setCursorPos(1,2)
- term.setTextColor(colors.yellow)
- write("Radius voulu pour le Digital Miner")
- term.setTextColor(colors.red)
- print(" (Entre 1 et 64)")
- term.setTextColor(colors.white)
- write(">> ")
- term.setTextColor(colors.blue)
- radius = read()
- radius = tonumber(radius)
- if radius then
- dm.radius(radius)
- else
- term.setTextColor(colors.red)
- print("La saisie n'est pas un nombre")
- dmFn()
- end
- -- Function End
- end
- for i=1 , #detect do
- if peripheral.getType(detect[i]) == "Digital Miner" then
- dm = peripheral.wrap(detect[i])
- dmFn()
- else
- term.setTextColor(colors.red)
- print("Pas de Digital miner Detecter")
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement