The ships' insurance carriers generally dont allow guns onboard for liability reasons.
I have sailed on tankers loaded with 40,000 barrels of gasoline and jet fuel, and you were not allowed to carry a cell phone or lighter on deck. The wrenches and tools were non-sparking bronze.
Engaging in a gunfight would be mutually assured destruction.
Frgds,
3/M