Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local MFSUinput = false -- MFSU outputs when full
- local UserInput = false -- manual control
- redstone.setOutput("back", false)
- while true do
- -- read inputs
- if( redstone.getInput("bottom") ) then
- MFSUinput = true
- --print("MFSU input true")
- else
- MFSUinput = false
- --print("MFSU input false")
- end
- if( redstone.getInput("right") ) then
- UserInput = true
- --print("Manual input true")
- else
- UserInput = false
- --print("Manual input false")
- end
- -- determine output
- if (UserInput) then
- redstone.setOutput("back", false)
- elseif (MFSUinput and not UserInput) then
- redstone.setOutput("back", true)
- -- checks for manual interference
- local count = 0
- while (count < 12) do
- sleep(1)
- count = count + 1
- if( redstone.getInput("right") ) then
- UserInput = true
- print("Manual interference")
- break
- end
- end
- else
- redstone.setOutput("back", false)
- end
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement