|
|
|
@@ -1,6 +1,7 @@
|
|
|
|
|
GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
//SEC_LEVEL_GREEN = code green
|
|
|
|
|
//SEC_LEVEL_BLUE = code blue
|
|
|
|
|
//SEC_LEVEL_AMBER = code amber
|
|
|
|
|
//SEC_LEVEL_RED = code red
|
|
|
|
|
//SEC_LEVEL_DELTA = code delta
|
|
|
|
|
|
|
|
|
@@ -12,6 +13,8 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
level = SEC_LEVEL_GREEN
|
|
|
|
|
if("blue")
|
|
|
|
|
level = SEC_LEVEL_BLUE
|
|
|
|
|
if("amber")
|
|
|
|
|
level = SEC_LEVEL_AMBER
|
|
|
|
|
if("red")
|
|
|
|
|
level = SEC_LEVEL_RED
|
|
|
|
|
if("delta")
|
|
|
|
@@ -25,8 +28,10 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
if(GLOB.security_level >= SEC_LEVEL_RED)
|
|
|
|
|
SSshuttle.emergency.modTimer(4)
|
|
|
|
|
else if(GLOB.security_level == SEC_LEVEL_AMBER)
|
|
|
|
|
SSshuttle.emergency.modTimer(2.5)
|
|
|
|
|
else
|
|
|
|
|
SSshuttle.emergency.modTimer(2)
|
|
|
|
|
SSshuttle.emergency.modTimer(1.66)
|
|
|
|
|
GLOB.security_level = SEC_LEVEL_GREEN
|
|
|
|
|
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
|
|
|
|
if(is_station_level(FA.z))
|
|
|
|
@@ -35,24 +40,46 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
if(GLOB.security_level < SEC_LEVEL_BLUE)
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_blue_upto), "Attention! Security level elevated to blue:",1)
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.5)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.6)
|
|
|
|
|
else
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_blue_downto), "Attention! Security level lowered to blue:")
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
SSshuttle.emergency.modTimer(2)
|
|
|
|
|
if(GLOB.security_level >= SEC_LEVEL_RED)
|
|
|
|
|
SSshuttle.emergency.modTimer(2.4)
|
|
|
|
|
else
|
|
|
|
|
SSshuttle.emergency.modTimer(1.5)
|
|
|
|
|
GLOB.security_level = SEC_LEVEL_BLUE
|
|
|
|
|
sound_to_playing_players('sound/misc/voybluealert.ogg') // Citadel change - Makes alerts play a sound
|
|
|
|
|
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
|
|
|
|
if(is_station_level(FA.z))
|
|
|
|
|
FA.update_icon()
|
|
|
|
|
if(SEC_LEVEL_AMBER)
|
|
|
|
|
if(GLOB.security_level < SEC_LEVEL_AMBER)
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_amber_upto), "Attention! Security level elevated to amber:",1)
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
if(GLOB.security_level == SEC_LEVEL_GREEN)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.4)
|
|
|
|
|
else
|
|
|
|
|
SSshuttle.emergency.modTimer(0.66)
|
|
|
|
|
else
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_amber_downto), "Attention! Security level lowered to amber:")
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
SSshuttle.emergency.modTimer(1.6)
|
|
|
|
|
GLOB.security_level = SEC_LEVEL_AMBER
|
|
|
|
|
sound_to_playing_players('sound/effects/alert.ogg') // Citadel change - Makes alerts play a sound
|
|
|
|
|
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
|
|
|
|
if(is_station_level(FA.z))
|
|
|
|
|
FA.update_icon()
|
|
|
|
|
if(SEC_LEVEL_RED)
|
|
|
|
|
if(GLOB.security_level < SEC_LEVEL_RED)
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_red_upto), "Attention! Code red!",1)
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
if(GLOB.security_level == SEC_LEVEL_GREEN)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.25)
|
|
|
|
|
else if(GLOB.security_level == SEC_LEVEL_BLUE)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.416)
|
|
|
|
|
else
|
|
|
|
|
SSshuttle.emergency.modTimer(0.5)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.625)
|
|
|
|
|
else
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_red_downto), "Attention! Code red!")
|
|
|
|
|
GLOB.security_level = SEC_LEVEL_RED
|
|
|
|
@@ -66,10 +93,12 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
if(SEC_LEVEL_DELTA)
|
|
|
|
|
minor_announce(CONFIG_GET(string/alert_delta), "Attention! Delta security level reached!",1)
|
|
|
|
|
if(SSshuttle.emergency.mode == SHUTTLE_CALL || SSshuttle.emergency.mode == SHUTTLE_RECALL)
|
|
|
|
|
if(GLOB.security_level == SEC_LEVEL_GREEN)
|
|
|
|
|
if(GLOB.security_level < SEC_LEVEL_BLUE)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.25)
|
|
|
|
|
else if(GLOB.security_level == SEC_LEVEL_BLUE)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.5)
|
|
|
|
|
SSshuttle.emergency.modTimer(0.416)
|
|
|
|
|
else
|
|
|
|
|
SSshuttle.emergency.modTimer(0.625)
|
|
|
|
|
GLOB.security_level = SEC_LEVEL_DELTA
|
|
|
|
|
sound_to_playing_players('sound/misc/deltakalaxon.ogg') // Citadel change - Makes alerts play a sound
|
|
|
|
|
for(var/obj/machinery/firealarm/FA in GLOB.machines)
|
|
|
|
@@ -93,6 +122,8 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
return "green"
|
|
|
|
|
if(SEC_LEVEL_BLUE)
|
|
|
|
|
return "blue"
|
|
|
|
|
if(SEC_LEVEL_AMBER)
|
|
|
|
|
return "amber"
|
|
|
|
|
if(SEC_LEVEL_RED)
|
|
|
|
|
return "red"
|
|
|
|
|
if(SEC_LEVEL_DELTA)
|
|
|
|
@@ -104,6 +135,8 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
return "green"
|
|
|
|
|
if(SEC_LEVEL_BLUE)
|
|
|
|
|
return "blue"
|
|
|
|
|
if(SEC_LEVEL_AMBER)
|
|
|
|
|
return "amber"
|
|
|
|
|
if(SEC_LEVEL_RED)
|
|
|
|
|
return "red"
|
|
|
|
|
if(SEC_LEVEL_DELTA)
|
|
|
|
@@ -115,6 +148,8 @@ GLOBAL_VAR_INIT(security_level, SEC_LEVEL_GREEN)
|
|
|
|
|
return SEC_LEVEL_GREEN
|
|
|
|
|
if("blue")
|
|
|
|
|
return SEC_LEVEL_BLUE
|
|
|
|
|
if("amber")
|
|
|
|
|
return SEC_LEVEL_AMBER
|
|
|
|
|
if("red")
|
|
|
|
|
return SEC_LEVEL_RED
|
|
|
|
|
if("delta")
|
|
|
|
|