From 9f1ae933795b60619b84e990653e1f5968eefcdd Mon Sep 17 00:00:00 2001 From: NicholasDV Date: Sat, 3 Aug 2013 23:43:11 -0400 Subject: [PATCH 1/3] Made maintenance all access capable of being revoked... Via the keycard authentication consoles. --- code/game/machinery/doors/airlock.dm | 1 + .../security levels/keycard authentication.dm | 23 +++++++++++++++---- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 424e94eee07..63b3da76ec6 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -93,6 +93,7 @@ Airlock index -> wire color are { 9, 4, 6, 7, 5, 8, 1, 2, 3 }. normalspeed = 1 var/obj/item/weapon/airlock_electronics/electronics = null var/hasShocked = 0 //Prevents multiple shocks from happening + var/maintAccessReqRevoked = 0 // Used in the procs to revoke maint access/give maint access to all maint doors. Boolean. /obj/machinery/door/airlock/command name = "Airlock" diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index ae66ba5f5d1..d99d8de7696 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -144,17 +144,32 @@ if("Red alert") set_security_level(SEC_LEVEL_RED) feedback_inc("alert_keycard_auth_red",1) - if("Emergency Maintenance Access") + if("Grant Emergency Maintenance Access") make_maint_all_access() - feedback_inc("alert_keycard_auth_maint",1) + feedback_inc("alert_keycard_auth_maintGrant",1) + if("Revoke Emergency Maintenance Access") + revoke_maint_all_access() + feedback_inc("alert_keycard_auth_maintRevoke",1) if("Emergency Rescue Team") trigger_armed_response_team(1) feedback_inc("alert_keycard_auth_ert",1) /proc/make_maint_all_access() for(var/obj/machinery/door/airlock/A in machines) - if(A.z == 1) + if(A.z == 1 && access_maint_tunnels in A.req_access) + A.maintAccessReqRevoked = 1 A.req_access.Remove(access_maint_tunnels) world << "Attention!" - world << "The maintenance access requirement has been revoked on all airlocks. All crew members are now permitted access to emergency maintenance areas." \ No newline at end of file + world << "The maintenance access requirement has been revoked on all airlocks." + +/proc/revoke_maint_all_access() + for(var/obj/machinery/door/airlock/A in machines) + if(A.z == 1 && A.maintAccessReqRevoked == 1) + A.maintAccessReqRevoked = 0 + A.req_access.Add(access_maint_tunnels) + + world << "Attention!" + world << "The maintenance access requirement has been readded on all maintenance airlocks." + + From d4b189cd74523fb14955fbd4e9f6803eee45f540 Mon Sep 17 00:00:00 2001 From: NicholasDV Date: Sun, 4 Aug 2013 00:07:21 -0400 Subject: [PATCH 2/3] Actually added the button... --- code/modules/security levels/keycard authentication.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/modules/security levels/keycard authentication.dm b/code/modules/security levels/keycard authentication.dm index d99d8de7696..d21ecae33c1 100644 --- a/code/modules/security levels/keycard authentication.dm +++ b/code/modules/security levels/keycard authentication.dm @@ -70,7 +70,8 @@ dat += "Select an event to trigger:" user << browse(dat, "window=keycard_auth;size=500x250") if(screen == 2) From a21b7deb1f361a9bd00cbbfff97b036120454a6e Mon Sep 17 00:00:00 2001 From: NicholasDV Date: Sun, 4 Aug 2013 00:16:36 -0400 Subject: [PATCH 3/3] Changes to the radiation storm event... It now opens up maintenance access to all people upon start. Furthermore, one minute after ending (and with a warning), it will return maintenance requirements to how they were before the event. In addition to this, it has been buffed to closer to the original amount of damage for the event. --- code/modules/events/radiation_storm.dm | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/code/modules/events/radiation_storm.dm b/code/modules/events/radiation_storm.dm index 99e2d69e0ea..ad79eed5164 100644 --- a/code/modules/events/radiation_storm.dm +++ b/code/modules/events/radiation_storm.dm @@ -10,10 +10,14 @@ spawn() world << sound('sound/AI/radiation.ogg') command_alert("High levels of radiation detected near the station. Please evacuate into one of the shielded maintenance tunnels.", "Anomaly Alert") + make_maint_all_access() + sleep(600) + command_alert("The station has entered the radiation belt. Please remain in a sheltered area until we have passed the radiation belt.", "Anomaly Alert") + for(var/i = 0, i < 10, i++) for(var/mob/living/carbon/human/H in living_mob_list) var/turf/T = get_turf(H) @@ -23,16 +27,19 @@ continue if(istype(T.loc, /area/maintenance) || istype(T.loc, /area/crew_quarters)) continue + if(istype(H,/mob/living/carbon/human)) - H.apply_effect((rand(2,15)),IRRADIATE,0) + H.apply_effect((rand(15,35)),IRRADIATE,0) if(prob(5)) - H.apply_effect((rand(10,30)),IRRADIATE,0) + H.apply_effect((rand(40,70)),IRRADIATE,0) if (prob(75)) - randmutb(H) + randmutb(H) // Applies bad mutation domutcheck(H,null,1) else - randmutg(H) + randmutg(H) // Applies good mutation domutcheck(H,null,1) + + for(var/mob/living/carbon/monkey/M in living_mob_list) var/turf/T = get_turf(M) if(!T) @@ -43,4 +50,10 @@ sleep(100) - command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms.", "Anomaly Alert") + command_alert("The station has passed the radiation belt. Please report to medbay if you experience any unusual symptoms. Maintenance will lose all access again shortly.", "Anomaly Alert") + + + sleep(600) // Want to give them time to get out of maintenance. + + + revoke_maint_all_access()