Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sideOut = "right"
- sideIn = "left"
- mon = peripheral.wrap("top")
- local inputs = {}
- inputs[colors.white] = "bay1"
- local outputs = {}
- outputs["bay1"] = colors.white
- function enable(side,col)
- redstone.setBundledOutput(side,colors.combine(redstone.getBundledInput(side),col))
- end
- function disable(side,col)
- redstone.setBundledOutput(side,colors.subtract(redstone.getBundledInput(side),col))
- end
- while true do
- local imp = redstone.getBundledInput(sideIn)
- mon.clear()
- local cursorY = 10
- mon.write("Engine Interface")
- for i,val in pairs(inputs) do
- mon.setCursorPos(3,cursorY)
- print(cursorY)
- if colors.test(imp,i) then
- --Enable/Display mon
- enable(sideOut,outputs[val])
- mon.write(val..": Enabled")
- else
- --Disable/Display Mon
- disable(sideOut,outputs[val])
- mon.write(val..": Disabled")
- end
- cursorY = cursorY + 5
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement