Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local event = require "event"
- local char_space = string.byte(" ")
- local running = true
- function unknownEvent()
- end
- local myEventHandlers = setmetatable({}, { __index = function() return unknownEvent end })
- function myEventHandlers.key_up(adress, char, code, playerName)
- if (char == char_space) then
- running = false
- end
- end
- function handleEvent(eventID, ...)
- if (eventID) then
- myEventHandlers[eventID](...)
- end
- end
- while running do
- handleEvent(event.pull())
- local component = require("component")
- local sides = require("sides")
- local colors = require("colors")
- local rs = component.redstone
- local m = component.modem
- m.open(20)
- repeat
- while true do
- if (rs.getBundledInput(sides.back, colors.blue)) > 1 then
- print(rs.getBundledInput(sides.back, colors.blue))
- m.broadcast(20, "Iron Buffer Full")
- m.broadcast(20, "Iron Buffer Full")
- break
- end
- end
- while true do
- if (rs.getBundledInput(sides.back, colors.blue)) == 0 then
- print(rs.getBundledInput(sides.back, colors.blue))
- m.broadcast(20, "Iron Buffer Loading")
- m.broadcast(20, "Iron Buffer Loading")
- break
- end
- end
- until(char==char_space)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement