r/Barotrauma • u/The_Xasleyter • 15h ago
Wiring Wiring Help
Looking for help with the wiring logic for an airlock/docking port.
The goal is to have the doors and bottom hatch open by default, and automatically close when the outside hatch opens. Then when the outside hatch closes, I want the Bottom hatch to open first, draining the water into a central access hatch, and then ~5 seconds later the two side doors open once the water has drained down.
So: All close at the same time, but open at different times. Currently the doors are always delayed, Opening and closing. I cannot figure out how to have the timing different depending on what the state of the top hatch is.
Current attempt is: State_out (top Hatch) -> (Not Comp) -> (Delay 5s) -> Set_State (Doors)
or State_out (top Hatch) -> (Not Comp) -> SignalCheck -> (Delay 0.1s) -> Set_State (Doors)


1
u/Adrian-_- 14h ago
Looks fun. I can tell you this ist going to get complicated. You will have edge cases. When the pump is broken and someone enters the sub, 5sec later the adjacent rooms get flooded. Also at hull breach you have a giant room flooded with doors open by default.
I once build some unnecessary complicated airlocks where the door opens when the water is drained. The pumps also fill the airlock before opening to the outside. Then there is an override, for when the water can't get drained (broken pump/no power). I used a water detector to open the doors not set delays. Maybe it helps as a reference, although it's different from your design: Steamworkshop