Fix firealarm alert level indicator (#2269)

* 0-indexes seclevel defines, fixes set_security_level proc

* Adds orange-alert level to adminverb
This commit is contained in:
Alex 'Avunia' Takiya
2020-12-21 19:53:55 +00:00
committed by GitHub
parent 83816b83b0
commit d67f754674
3 changed files with 10 additions and 10 deletions
@@ -1,9 +1,9 @@
//Security levels
#define SEC_LEVEL_GREEN 1
#define SEC_LEVEL_BLUE 2
#define SEC_LEVEL_VIOLET 3
#define SEC_LEVEL_ORANGE 4
#define SEC_LEVEL_AMBER 5
#define SEC_LEVEL_RED 6
#define SEC_LEVEL_DELTA 7
#define SEC_LEVEL_GAMMA 8 //Oh shit bois
#define SEC_LEVEL_GREEN 0
#define SEC_LEVEL_BLUE 1
#define SEC_LEVEL_VIOLET 2
#define SEC_LEVEL_ORANGE 3
#define SEC_LEVEL_AMBER 4
#define SEC_LEVEL_RED 5
#define SEC_LEVEL_DELTA 6
#define SEC_LEVEL_GAMMA 7 //Oh shit bois
+1 -1
View File
@@ -883,7 +883,7 @@ Traitors and the like can also be revived with the previous role mostly intact.
if(!check_rights(R_ADMIN))
return
var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","violet","amber","red","delta","gamma")
var/level = input("Select security level to change to","Set Security Level") as null|anything in list("green","blue","violet","orange","amber","red","delta","gamma")
if(level)
set_security_level(level)
@@ -3,7 +3,7 @@ GLOBAL_VAR_INIT(gamma_looping, FALSE) //This is so we know if the gamma sound ef
#define GAMMA_LOOP_LENGTH 1236 //2.06 minutes in deciseconds
/proc/set_security_level(level)
level = seclevel2num(level) || level
level = isnum(level) ? level : seclevel2num(level)
//Will not be announced if you try to set to the same level as it already is
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_GAMMA && level != GLOB.security_level)