Barotrauma

Barotrauma

Not enough ratings
Basic Docking Port Airlock
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
110.222 KB
10 May, 2024 @ 1:44am
1 Change Note ( view )

Subscribe to download
Basic Docking Port Airlock

Description
Basic automated docking port airlock (2C) that keeps both hatches open while docked and closes once after undocking to function as an airlock. Pulse variant (3C) opens the hatch once instead to have manual controls while docked. Water may leak in a little due to lack of delays in the circuit but the pump will take care of it anyways. Wire 'TOGGLE_DOCKING' from Navigation Terminal to Docking Port 'TOGGLE_STATE' and connect power to the pump.

The optimisation trick is wiring docking port state_out to [AND] set_output and docking port on_dock to both hatches' set_state. Whenever both hatches are opened at the same time, [AND] outputs 1 (open both doors) while docked (1) otherwise outputs 0 (close both doors) while undocked (0) to behave as a normal airlock. When undocking, the on_undock pulse outputs (1) to both hatches' set_state which opens both hatches causing the [AND] to then shut both hatches.

If the hatch has no buttons, simply wire a button on each side to the hatch's toggle_state! You only need to wire the buttons and the [AND] component part alongside the existing vanilla docking port logic to get it working alongside in-game:

To wire the [AND] component part, get 5 wires then place down 1 AND component (empty false output):
Wire the state_out from the top hatch to AND signal_in_1
Wire the state_out from the bottom hatch to AND signal_in_2
Wire AND signal_out to top hatch set_state
Wire AND signal_out to bottom hatch set_state
Wire Docking Hatch state_out to AND set_output

To avoid water leaking in while undocking, use the standard version instead: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3238305380