Do ships have sprinkler systems?
Ships also have automatic fire detection systems throughout that sound an alarm and that indicate the exact location of any fire on the bridge.
Ships also have compartmentation doors that shut automatically, or that the bridge can activate, to isolate a fire or flooding.
Ships also have pipes called "fire and flushing mains" fed directly from the sea by dedicated pumps, with hoses and nozzles that are ready for use, and damage control teams that are very thoroughly trained in how to use them to fight fires. The "fire and flushing mains" also supply the toilets, so somebody would know pretty quickly if the pumps were to fail.
How do they deal with fires at sea?
The cognizant damage control team has exactly two options.
>> 1. Put it out.
>> 2. Swim -- usually a very long way.
The alternative is very strong incentive for the damage control team to put out the fire as quickly as possible. Indeed, sailors have a longstanding reputation for being the world's best firefighters.