add access restriction removal to keycard swiper

This commit is contained in:
datlo
2018-12-24 09:26:46 +00:00
parent d6cb7246eb
commit 34d9559c2f
2 changed files with 25 additions and 0 deletions
@@ -154,6 +154,12 @@
if("Revoke Emergency Maintenance Access")
revoke_maint_all_access()
feedback_inc("alert_keycard_auth_maintRevoke",1)
if("Lift Airlock Access Restrictions")
make_station_all_access()
feedback_inc("alert_keycard_auth_stationGrant",1)
if("Restore Airlock Access Restrictions")
revoke_station_all_access()
feedback_inc("alert_keycard_auth_stationRevoke",1)
if("Emergency Response Team")
if(is_ert_blocked())
to_chat(usr, "<span class='warning'>All Emergency Response Teams are dispatched and can not be called at this time.</span>")
@@ -180,6 +186,7 @@
return ticker.mode && ticker.mode.ert_disabled
var/global/maint_all_access = 0
var/global/station_all_access = 0
/proc/make_maint_all_access()
for(var/area/maintenance/A in world)
@@ -196,3 +203,19 @@ var/global/maint_all_access = 0
D.update_icon(0)
minor_announcement.Announce("Access restrictions on maintenance and external airlocks have been re-added.")
maint_all_access = 0
/proc/make_station_all_access()
for(var/obj/machinery/door/airlock/D in GLOB.airlocks)
if(is_station_level(D.z))
D.emergency = 1
D.update_icon(0)
minor_announcement.Announce("Access restrictions on all station airlocks have been removed due to an ongoing crisis. Trespassing laws still apply unless ordered otherwise by Command staff.")
station_all_access = 1
/proc/revoke_station_all_access()
for(var/obj/machinery/door/airlock/D in GLOB.airlocks)
if(is_station_level(D.z))
D.emergency = 0
D.update_icon(0)
minor_announcement.Announce("Access restrictions on all station airlocks have been re-added. Seek station AI or a colleague's assistance if you are stuck.")
station_all_access = 0
+2
View File
@@ -20,6 +20,8 @@ Used In File(s): \code\modules\security_levels\keycard_authentication.dm
{{:helper.link('Emergency Response Team', 'exclamation-triangle', { 'triggerevent' : 'Emergency Response Team' })}}
{{:helper.link('Grant Emergency Maintenance Access', 'unlock', { 'triggerevent' : 'Grant Emergency Maintenance Access' })}}
{{:helper.link('Revoke Emergency Maintenance Access', 'lock', { 'triggerevent' : 'Revoke Emergency Maintenance Access' })}}
{{:helper.link('Lift Airlock Access Restrictions', 'unlock', { 'triggerevent' : 'Lift Airlock Access Restrictions' })}}
{{:helper.link('Restore Airlock Access Restrictions', 'lock', { 'triggerevent' : 'Restore Airlock Access Restrictions' })}}
{{else data.screen == 2}}
{{if data.event == 'Emergency Response Team'}}
<div class="item">