I want to give the PCs a motive for moving out of the ship and having the firefight in the dock area rather than holing up inside the ship. They are facing a deadline and any delay may spell overall defeat even if they win a firefight aboard the ship. So they can't afford to allow anyone to blow big holes in the ship. If the Bad Guys damage the airlock, the ship will not receive clearance to depart the port before the damage has been repaired. But that requires that the Bad Guys present a blatant threat by carrying breaching charges.
The ship is in dock, not in space?
OK, then. I smell dock workers gumming up the works. Paid off dock workers.
The major cargo lock is open to receive cargo. On the bridge, the switch is hit to close and lock the cargo bay doors, except it doesn't work. The ship is hardwired to a guy with a box. They can see him out the port. The lock won't close.
Or...
Bad luck. The ship is in dock, and as part of the re-supply a ship goes through, the ship's computer is stuck inthe middle of batch processing and updating (local star charts, software patches, entertainment upgrades, news bubbles uploaded, as well as the newest upgrades for Jump Drive control, etc....even in the Far Future, upgrades come standard routine at all Class A, B, and C starports...).
The players have two options. They can manually override and reboot the ship's main computer (or, just the part that controls the airlocks). And, if they do this, they may not have time to lock themselves out from the upcoming combat. Sounds like a Computer task to me, but make it unlikely to succeed if you want to draw them out.
Or, the other option is to rush to every airlock and manually close/lock them with the crank and manual lock. In port, while the ship is being serviced, it's not unusual for all the locks to be open, interior and exterior, to expedite the re-supply.
Can the PCs get all of the locks closed in time before the baddies enter?
Voom! Was that a tear gas grenade that just exploded in the hold!
And, it's not a coincidence that the baddies chose this time to attack. Normally, a ships captain would think nothing of having his ship open like this in a port. It happens every time he visits Class A, B, or C starports. The baddies know this, too.
Or, as a third option, how about a paid off tech switching "on" the ship's anti-hijack program while at the same time disabling the ship's ability to recognize regular crew members. Gas starts to shoot out the vents. They can't stay here!
Boom, the entire crew complement is now out of the ship, on the dock, with the baddies moving in.
Or....why are all the crewmembers on the ship right now anyway? Shouldn't they be in startown, enjoying the local brew?
And, as they return to the ship...
"That's the Falcon, alright, but how are we going to get to her?"