Move global access procs to the mapping subsystem (#26664)

* Move global access procs to the mapping subsystem

* Apply requested changes
This commit is contained in:
Mikhail Dzianishchyts
2024-09-12 19:58:31 +03:00
committed by GitHub
parent d01fca6b26
commit a450ad9b9c
3 changed files with 48 additions and 48 deletions
@@ -177,13 +177,13 @@
if("Red Alert")
INVOKE_ASYNC(SSsecurity_level, TYPE_PROC_REF(/datum/controller/subsystem/security_level, set_level), SEC_LEVEL_RED)
if("Grant Emergency Maintenance Access")
make_maint_all_access()
SSmapping.make_maint_all_access()
if("Revoke Emergency Maintenance Access")
revoke_maint_all_access()
SSmapping.revoke_maint_all_access()
if("Activate Station-Wide Emergency Access")
make_station_all_access()
SSmapping.make_station_all_access()
if("Deactivate Station-Wide Emergency Access")
revoke_station_all_access()
SSmapping.revoke_station_all_access()
if("Emergency Response Team")
if(is_ert_blocked())
atom_say("All Emergency Response Teams are dispatched and can not be called at this time.")
@@ -215,43 +215,3 @@
/obj/machinery/keycard_auth/proc/is_ert_blocked()
return SSticker.mode && SSticker.mode.ert_disabled
GLOBAL_VAR_INIT(maint_all_access, 0)
GLOBAL_VAR_INIT(station_all_access, 0)
// Why are these global procs?
/proc/make_maint_all_access()
for(var/area/station/maintenance/A in world) // Why are these global lists? AAAAAAAAAAAAAA
for(var/obj/machinery/door/airlock/D in A)
D.emergency = 1
D.update_icon()
GLOB.minor_announcement.Announce("Access restrictions on maintenance and external airlocks have been removed.")
GLOB.maint_all_access = 1
SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency maintenance access", "enabled"))
/proc/revoke_maint_all_access()
for(var/area/station/maintenance/A in world)
for(var/obj/machinery/door/airlock/D in A)
D.emergency = 0
D.update_icon()
GLOB.minor_announcement.Announce("Access restrictions on maintenance and external airlocks have been re-added.")
GLOB.maint_all_access = 0
SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency maintenance access", "disabled"))
/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()
GLOB.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.")
GLOB.station_all_access = 1
SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency station access", "enabled"))
/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()
GLOB.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.")
GLOB.station_all_access = 0
SSblackbox.record_feedback("nested tally", "keycard_auths", 1, list("emergency station access", "disabled"))