mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-07-18 18:46:24 +01:00
@@ -1,8 +1,11 @@
|
||||
/var/security_level = 0
|
||||
//0 = code green
|
||||
//1 = code blue
|
||||
//2 = code red
|
||||
//3 = code delta
|
||||
//1 = code yellow
|
||||
//2 = code violet
|
||||
//3 = code orange
|
||||
//4 = code blue
|
||||
//5 = code red
|
||||
//6 = code delta
|
||||
|
||||
//config.alert_desc_blue_downto
|
||||
/var/datum/announcement/priority/security/security_announcement_up = new(do_log = 0, do_newscast = 1, new_sound = sound('sound/misc/notice1.ogg'))
|
||||
@@ -12,6 +15,12 @@
|
||||
switch(level)
|
||||
if("green")
|
||||
level = SEC_LEVEL_GREEN
|
||||
if("yellow")
|
||||
level = SEC_LEVEL_YELLOW
|
||||
if("violet")
|
||||
level = SEC_LEVEL_VIOLET
|
||||
if("orange")
|
||||
level = SEC_LEVEL_ORANGE
|
||||
if("blue")
|
||||
level = SEC_LEVEL_BLUE
|
||||
if("red")
|
||||
@@ -23,13 +32,31 @@
|
||||
if(level >= SEC_LEVEL_GREEN && level <= SEC_LEVEL_DELTA && level != security_level)
|
||||
switch(level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Security level lowered to green")
|
||||
security_announcement_down.Announce("[config.alert_desc_green]", "Attention! Alert level lowered to code green.")
|
||||
security_level = SEC_LEVEL_GREEN
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
if(security_level < SEC_LEVEL_YELLOW)
|
||||
security_announcement_up.Announce("[config.alert_desc_yellow_upto]", "Attention! Alert level elevated to yellow")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_yellow_downto]", "Attention! Alert level lowered to yellow")
|
||||
security_level = SEC_LEVEL_YELLOW
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
if(security_level < SEC_LEVEL_VIOLET)
|
||||
security_announcement_up.Announce("[config.alert_desc_violet_upto]", "Attention! Alert level elevated to violet")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_violet_downto]", "Attention! Alert level lowered to violet")
|
||||
security_level = SEC_LEVEL_VIOLET
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
if(security_level < SEC_LEVEL_ORANGE)
|
||||
security_announcement_up.Announce("[config.alert_desc_orange_upto]", "Attention! Alert level elevated to orange")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_orange_downto]", "Attention! Alert level lowered to orange")
|
||||
security_level = SEC_LEVEL_ORANGE
|
||||
if(SEC_LEVEL_BLUE)
|
||||
if(security_level < SEC_LEVEL_BLUE)
|
||||
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Security level elevated to blue")
|
||||
security_announcement_up.Announce("[config.alert_desc_blue_upto]", "Attention! Alert level elevated to blue")
|
||||
else
|
||||
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Security level lowered to blue")
|
||||
security_announcement_down.Announce("[config.alert_desc_blue_downto]", "Attention! Alert level lowered to blue")
|
||||
security_level = SEC_LEVEL_BLUE
|
||||
if(SEC_LEVEL_RED)
|
||||
if(security_level < SEC_LEVEL_RED)
|
||||
@@ -42,13 +69,17 @@
|
||||
if(CC)
|
||||
CC.post_status("alert", "redalert")*/
|
||||
if(SEC_LEVEL_DELTA)
|
||||
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta security level reached!", new_sound = 'sound/effects/siren.ogg')
|
||||
security_announcement_up.Announce("[config.alert_desc_delta]", "Attention! Delta alert level reached!", new_sound = 'sound/effects/siren.ogg')
|
||||
security_level = SEC_LEVEL_DELTA
|
||||
|
||||
var/newlevel = get_security_level()
|
||||
for(var/obj/machinery/firealarm/FA in machines)
|
||||
if(FA.z in using_map.contact_levels)
|
||||
FA.set_security_level(newlevel)
|
||||
for(var/obj/machinery/status_display/FA in machines)
|
||||
if(FA.z in using_map.contact_levels)
|
||||
FA.display_alert(newlevel)
|
||||
FA.mode = 3
|
||||
|
||||
if(level >= SEC_LEVEL_RED)
|
||||
atc.reroute_traffic(yes = 1) // Tell them fuck off we're busy.
|
||||
@@ -60,6 +91,12 @@
|
||||
switch(security_level)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
return "green"
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
return "yellow"
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
return "violet"
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
return "orange"
|
||||
if(SEC_LEVEL_BLUE)
|
||||
return "blue"
|
||||
if(SEC_LEVEL_RED)
|
||||
@@ -71,6 +108,12 @@
|
||||
switch(num)
|
||||
if(SEC_LEVEL_GREEN)
|
||||
return "green"
|
||||
if(SEC_LEVEL_YELLOW)
|
||||
return "yellow"
|
||||
if(SEC_LEVEL_VIOLET)
|
||||
return "violet"
|
||||
if(SEC_LEVEL_ORANGE)
|
||||
return "orange"
|
||||
if(SEC_LEVEL_BLUE)
|
||||
return "blue"
|
||||
if(SEC_LEVEL_RED)
|
||||
@@ -82,6 +125,12 @@
|
||||
switch( lowertext(seclevel) )
|
||||
if("green")
|
||||
return SEC_LEVEL_GREEN
|
||||
if("yellow")
|
||||
return SEC_LEVEL_YELLOW
|
||||
if("violet")
|
||||
return SEC_LEVEL_VIOLET
|
||||
if("orange")
|
||||
return SEC_LEVEL_ORANGE
|
||||
if("blue")
|
||||
return SEC_LEVEL_BLUE
|
||||
if("red")
|
||||
@@ -99,4 +148,10 @@
|
||||
set_security_level(2)
|
||||
/mob/verb/set_thing3()
|
||||
set_security_level(3)
|
||||
/mob/verb/set_thing4()
|
||||
set_security_level(4)
|
||||
/mob/verb/set_thing5()
|
||||
set_security_level(5)
|
||||
/mob/verb/set_thing6()
|
||||
set_security_level(6)
|
||||
*/
|
||||
Reference in New Issue
Block a user