From 64f1fd589d4388616b2482b5f8c5200da96b84f7 Mon Sep 17 00:00:00 2001 From: SabreML <57483089+SabreML@users.noreply.github.com> Date: Sat, 29 May 2021 21:12:35 +0100 Subject: [PATCH] Adds a station alert level display to the join game menu (#16097) * Alert Levels * pain Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> Co-authored-by: S34N <12197162+S34NW@users.noreply.github.com> --- code/modules/mob/new_player/new_player.dm | 1 + code/modules/security_levels/security_levels.dm | 15 +++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/code/modules/mob/new_player/new_player.dm b/code/modules/mob/new_player/new_player.dm index ff0875c763c..d7b38a6e6d3 100644 --- a/code/modules/mob/new_player/new_player.dm +++ b/code/modules/mob/new_player/new_player.dm @@ -449,6 +449,7 @@ var/dat = "
" dat += "Round Duration: [round(hours)]h [round(mins)]m
" + dat += "The station alert level is: [get_security_level_colors()]
" if(SSshuttle.emergency.mode >= SHUTTLE_ESCAPE) dat += "The station has been evacuated.
" diff --git a/code/modules/security_levels/security_levels.dm b/code/modules/security_levels/security_levels.dm index c1ab7fce353..af22e0061e4 100644 --- a/code/modules/security_levels/security_levels.dm +++ b/code/modules/security_levels/security_levels.dm @@ -173,3 +173,18 @@ GLOBAL_DATUM_INIT(security_announcement_down, /datum/announcement/priority/secur return SEC_LEVEL_EPSILON if("delta") return SEC_LEVEL_DELTA + +/proc/get_security_level_colors() + switch(GLOB.security_level) + if(SEC_LEVEL_GREEN) + return "Green" + if(SEC_LEVEL_BLUE) + return "Blue" + if(SEC_LEVEL_RED) + return "Red" + if(SEC_LEVEL_GAMMA) + return "Gamma" + if(SEC_LEVEL_EPSILON) + return "Epsilon" + if(SEC_LEVEL_DELTA) + return "Delta"