mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
One of Urist's new buttons actually functions properly now.
git-svn-id: http://tgstation13.googlecode.com/svn/trunk@2470 316c924e-a436-60f5-8080-3fe189b3f50e
This commit is contained in:
@@ -80,6 +80,7 @@
|
||||
|
||||
/obj/var/list/req_access = null
|
||||
/obj/var/req_access_txt = "0"
|
||||
/obj/var/req_all_accesses = 1
|
||||
/obj/New()
|
||||
//NOTE: If a room requires more than one access (IE: Morgue + medbay) set the req_acesss_txt to "5;6" if it requires 5 and 6
|
||||
if(src.req_access_txt)
|
||||
@@ -129,6 +130,8 @@
|
||||
if(!I || !istype(I, /obj/item/weapon/card/id) || !I.access) //not ID or no access
|
||||
return 0
|
||||
for(var/req in src.req_access)
|
||||
if((req in L) && !src.req_all_accesses)
|
||||
return 1 //If the object only requires one of the accesses, let it pass after a match.
|
||||
if(!(req in I.access)) //doesn't have this access
|
||||
return 0
|
||||
return 1
|
||||
@@ -141,6 +144,8 @@
|
||||
if(!L) return 0
|
||||
if(!istype(L, /list)) return 0
|
||||
for(var/req in src.req_access)
|
||||
if((req in L) && !src.req_all_accesses)
|
||||
return 1 //If the object only requires one of the accesses, let it pass after a match.
|
||||
if(!(req in L)) //doesn't have this access
|
||||
return 0
|
||||
return 1
|
||||
|
||||
@@ -1654,6 +1654,7 @@
|
||||
message_admins("[key_name_admin(usr)] made all maint doors brig access-only.")
|
||||
if("maint_access_engiebrig")
|
||||
for(var/obj/machinery/door/airlock/maintenance/M in world)
|
||||
M.req_all_accesses = 0
|
||||
M.req_access = list(access_brig,access_engine)
|
||||
message_admins("[key_name_admin(usr)] made all maint doors engineering and brig access-only.")
|
||||
if("infinite_sec")
|
||||
|
||||
Reference in New Issue
Block a user