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:
n3ophyt3
2011-11-01 04:44:47 +00:00
parent fdddd35ee2
commit 41cec7c6dc
2 changed files with 6 additions and 0 deletions

View File

@@ -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

View File

@@ -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")