Fixes #4977

Fixes https://github.com/Baystation12/Baystation12/issues/4977

Also refactored common alarm code into alarm.dm

Needs testing - Probably should not be merged just yet.