mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-30 23:48:28 +01: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
|
||||
|
||||
Reference in New Issue
Block a user