Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sideOut = "right"
- sideIn = "back"
- mon = peripheral.wrap("top")
- local inputs = {}
- inputs[colors.orange] = "bay1"
- inputs[colors.white] = "bay2"
- inputs[colors.brown] = "nuclear"
- local outputs = {}
- outputs["bay1"] = {}
- outputs["bay1"]["cat"] = "engines"
- outputs["bay1"]["col"] = colors.white
- outputs["bay2"] = {}
- outputs["bay2"]["cat"] = "engines"
- outputs["bay2"]["col"] = colors.brown
- outputs["nuclear"] = {}
- outputs["nuclear"]["cat"] = "ic2"
- outputs["nuclear"]["col"] = colors.black
- local catagories = {}
- catagories["ic2"] = {}
- catagories["ic2"]["x"] = 25
- catagories["ic2"]["y"] = 3
- catagories["ic2"]["cX"] = 25
- catagories["ic2"]["cY"] = 3
- catagories["engines"] = {}
- catagories["engines"]["x"] = 1
- catagories["engines"]["y"] = 3
- catagories["engines"]["cX"] = 1
- catagories["engines"]["cY"] = 3
- 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()
- mon.setCursorPos(1,1)
- local cursorY = 10
- mon.write("Engine Interface")
- for k,v in pairs(catagories) do
- catagories[k]["cX"] = catagories[k]["x"]
- catagories[k]["cY"] = catagories[k]["y"] + 1
- mon.setCursorPos(catagories[k]["x"],catagories[k]["y"])
- mon.write(k)
- end
- for i,val in pairs(inputs) do
- local out = outputs[val]
- local cat = catagories[out["cat"]]
- mon.setCursorPos(cat["cX"],cat["cY"])
- if colors.test(imp,i) then
- --Enable/Display mon
- --enable(sideOut,out["col"])
- mon.write(val..": Enabled")
- else
- --Disable/Display Mon
- --disable(sideOut,out["col"])
- mon.write(val..": Disabled")
- end
- catagories[out["cat"]]["cY"] = catagories[out["cat"]]["cY"] + 1
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement