SHOW:
|
|
- or go back to the newest paste.
| 1 | shell.run("clear")
| |
| 2 | print("overflow protection")
| |
| 3 | ||
| 4 | rednet.open("left")
| |
| 5 | local storage = peripheral.wrap("bottom")
| |
| 6 | - | local protocol = "andesite_overflow" |
| 6 | + | local protocol = "_overflow" |
| 7 | ||
| 8 | while true do | |
| 9 | if (#storage.list() / storage.size()) > 0.90 then | |
| 10 | rednet.broadcast("block", protocol)
| |
| 11 | ||
| 12 | shell.run("clear")
| |
| 13 | print("blocking...")
| |
| 14 | else | |
| 15 | rednet.broadcast("allow", protocol)
| |
| 16 | ||
| 17 | shell.run("clear")
| |
| 18 | print("allowing...")
| |
| 19 | end | |
| 20 | ||
| 21 | sleep(5) | |
| 22 | end |