From 9375c09666571e06970f16d06967d87f37c1f74f Mon Sep 17 00:00:00 2001 From: "baloh.matevz@gmail.com" Date: Sun, 4 Dec 2011 06:49:59 +0000 Subject: [PATCH] security levels commit 1 git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2606 316c924e-a436-60f5-8080-3fe189b3f50e --- code/modules/admin/security levels.dm | 73 +++++++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 code/modules/admin/security levels.dm diff --git a/code/modules/admin/security levels.dm b/code/modules/admin/security levels.dm new file mode 100644 index 00000000000..b004f84837c --- /dev/null +++ b/code/modules/admin/security levels.dm @@ -0,0 +1,73 @@ +/var/security_level = 0 +//0 = code green +//1 = code blue +//2 = code red +//3 = code delta + +/proc/set_security_level(var/level) + switch(level) + if("green") + level = 0 + if("blue") + level = 1 + if("red") + level = 2 + if("delta") + level = 3 + + if(level >= 0 && level <= 3) + switch(level) + if(0) + world << "Attention! security level lowered to green" + world << "All threats to the station have passed. Security may not have weapons visible, privacy laws are once again fully enforced." + security_level = 0 + for(var/obj/machinery/firealarm/FA in world) + if(FA.z == 1) + FA.overlays = list() + FA.overlays += image('monitors.dmi', "overlay_green") + if(1) + if(security_level < 1) + world << "Attention! security level elevated to blue" + world << "The station has received reliable information about possible hostle activity on the station. Security staff may have weapons visible, random searches are permitted." + else + world << "Attention! security level lowered to blue" + world << "The immediate threat has passed. Security may no longer have weapons drawn at all times, but may continue to have them visible. Random searches are still allowed." + security_level = 1 + for(var/obj/machinery/firealarm/FA in world) + if(FA.z == 1) + FA.overlays = list() + FA.overlays += image('monitors.dmi', "overlay_blue") + if(2) + if(security_level < 2) + world << "Attention! Code red!" + world << "There is an immediate serious threat to the station. Security may have weapons unholstered at all times. Random searches are allowed and advised." + else + world << "Attention! Code red!" + world << "The self-destruct mechanism has been deactivated, there is still however an immediate serious threat to the station. Security may have weapons unholstered at all times, random searches are allowed and advised." + security_level = 2 + for(var/obj/machinery/firealarm/FA in world) + if(FA.z == 1) + FA.overlays = list() + FA.overlays += image('monitors.dmi', "overlay_red") + if(3) + world << "Attention! Delta security level reached!" + world << "The ship's self-destruct mechanism has been engaged. All crew are instructed to obey all instructions given by heads of staff. Any violations of these orders can be punished by death. This is not a drill." + security_level = 3 + for(var/obj/machinery/firealarm/FA in world) + if(FA.z == 1) + FA.overlays = list() + FA.overlays += image('monitors.dmi', "overlay_delta") + else + return + + +/*DEBUG +/mob/verb/set_thing0() + set_security_level(0) +/mob/verb/set_thing1() + set_security_level(1) +/mob/verb/set_thing2() + set_security_level(2) +/mob/verb/set_thing3() + set_security_level(3) +*/ \ No newline at end of file