mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-28 07:20:09 +01:00
Turn more unmanaged global vars into GLOB (#20446)
Turned a ton of unmanaged globals into managed globals. Refactored some UT output. Removed some unused things, including vars. Added a test to ensure people don't keep adding new unmanaged vars.
This commit is contained in:
@@ -202,14 +202,14 @@
|
||||
else
|
||||
return 0
|
||||
|
||||
var/global/maint_all_access = 0
|
||||
GLOBAL_VAR_INIT(maint_all_access, FALSE)
|
||||
|
||||
/proc/make_maint_all_access()
|
||||
maint_all_access = 1
|
||||
GLOB.maint_all_access = TRUE
|
||||
security_announcement.Announce("The maintenance access requirement has been revoked on all airlocks.","Attention!")
|
||||
|
||||
/proc/revoke_maint_all_access()
|
||||
maint_all_access = 0
|
||||
GLOB.maint_all_access = FALSE
|
||||
security_announcement.Announce("The maintenance access requirement has been readded on all maintenance airlocks.","Attention!")
|
||||
|
||||
/obj/machinery/door/airlock/allowed(mob/M)
|
||||
@@ -221,7 +221,7 @@ var/global/maint_all_access = 0
|
||||
return ..(M)
|
||||
var/list/A = I.GetAccess()
|
||||
var/maint_sec_access = ((GLOB.security_level > SEC_LEVEL_GREEN) && has_access(ACCESS_SECURITY, accesses = A))
|
||||
var/exceptional_circumstances = maint_all_access || maint_sec_access
|
||||
var/exceptional_circumstances = GLOB.maint_all_access || maint_sec_access
|
||||
if(exceptional_circumstances && src.check_access_list(list(ACCESS_MAINT_TUNNELS)))
|
||||
return 1
|
||||
if(access_by_level || req_one_access_by_level)
|
||||
|
||||
Reference in New Issue
Block a user