Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- This is an airlock door system, designed for Rhonyn's underwater dome base.
- -- 2 computers make up the total system: an internal and external.
- -- This particular program is for the external computer, to enter the base from the outside.
- -- To do: automatic detection of server computer and rednet side.
- local pullEvent = os.pullEvent
- os.pullEvent = os.pullEventRaw
- while true do
- term.clear()
- term.setCursorPos(1, 1)
- print("This airlock leads to Rhonyn's Domebase (Doombase?)")
- term.setCursorPos(1, 2)
- print("Use this system to enter the base.")
- term.setCursorPos(1, 3)
- print("Type open to begin airlock procedure. This procedure take 30 seconds to complete.")
- input = read()
- if input == "open" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Airlock opening.")
- redstone.setBundledOutput("bottom", 8) -- Closes external doors, clearing outer chamber
- sleep(10)
- redstone.setBundledOutput("bottom", 12) -- Opens middle door, external stays closes
- sleep(10)
- redstone.setBundledOutput("bottom", 10) -- Closes middle, opens interior and external doors
- sleep(10)
- redstone.setBundledOutput("bottom", 0) -- Closes internal door
- end
- if input == "debug" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Debug mode activated. Use CTRL + T after 5 seconds to exit program.")
- sleep(5)
- os.pullEvent = pullEvent
- end
- if input ~= "open" and input ~= "debug" then
- term.clear()
- term.setCursorPos(1, 1)
- print("Incorrect command.")
- sleep(3)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment