One thing we will need is a space detector block. When it comes in contact with the space block on any side, It sends out a redstone signal. This is crucial to preventing a single hull breach from sucking all the air out of the ship. You would place it near a door or in the middle of a room, so that when that room is being filled with space blocks, pistons can slam the air vents and doors shut so that the breach stays contained.