From bcc4890a8cc55370be8eb730d4c64d1c29a4b771 Mon Sep 17 00:00:00 2001 From: Nadyr <41974248+Darlantanis@users.noreply.github.com> Date: Tue, 1 Jun 2021 23:03:21 -0400 Subject: [PATCH] powder that makes you say yes --- code/game/jobs/access.dm | 49 +--------------------------------------- 1 file changed, 1 insertion(+), 48 deletions(-) diff --git a/code/game/jobs/access.dm b/code/game/jobs/access.dm index 1c6c73e925..1539fb5227 100644 --- a/code/game/jobs/access.dm +++ b/code/game/jobs/access.dm @@ -1,17 +1,5 @@ -<<<<<<< HEAD -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - /obj/var/list/req_access /obj/var/list/req_one_access -||||||| parent of efc60df69d... Merge pull request #10510 from VOREStation/Arokha/memopt -//This file was auto-corrected by findeclaration.exe on 25.5.2012 20:42:31 - -/obj/var/list/req_access = list() -/obj/var/list/req_one_access = list() -======= -/obj/var/list/req_access -/obj/var/list/req_one_access ->>>>>>> efc60df69d... Merge pull request #10510 from VOREStation/Arokha/memopt //returns 1 if this mob has sufficient access to use this object /obj/proc/allowed(mob/M) @@ -28,15 +16,6 @@ return check_access_list(I ? I.GetAccess() : null) /obj/proc/check_access_list(var/list/L) -<<<<<<< HEAD - if(!L) return 0 - if(!istype(L, /list)) return 0 -||||||| parent of efc60df69d... Merge pull request #10510 from VOREStation/Arokha/memopt - if(!req_access) req_access = list() - if(!req_one_access) req_one_access = list() - if(!L) return 0 - if(!istype(L, /list)) return 0 -======= // We don't require access if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access)) return TRUE @@ -46,34 +25,9 @@ return FALSE // Run list comparisons ->>>>>>> efc60df69d... Merge pull request #10510 from VOREStation/Arokha/memopt return has_access(req_access, req_one_access, L) /proc/has_access(var/list/req_access, var/list/req_one_access, var/list/accesses) -<<<<<<< HEAD - var/has_RA = LAZYLEN(req_access) - var/has_ROA = LAZYLEN(req_one_access) - var/has_A = LAZYLEN(accesses) - if(!has_RA && !has_ROA) //we need none - return TRUE - if(!has_A) //we need them but don't have them - return FALSE - if(has_RA && length(req_access - accesses)) //we don't have every access we need - return FALSE - if(has_ROA && !length(req_one_access & accesses)) //we have atleast one access from this list - return FALSE - return TRUE -||||||| parent of efc60df69d... Merge pull request #10510 from VOREStation/Arokha/memopt - for(var/req in req_access) - if(!(req in accesses)) //doesn't have this access - return 0 - if(req_one_access.len) - for(var/req in req_one_access) - if(req in accesses) //has an access from the single access list - return 1 - return 0 - return 1 -======= // Doesn't have access lists, always works if(!LAZYLEN(req_access) && !LAZYLEN(req_one_access)) return TRUE @@ -100,7 +54,6 @@ // Didn't find anything that matched return FALSE ->>>>>>> efc60df69d... Merge pull request #10510 from VOREStation/Arokha/memopt /proc/get_centcom_access(job) switch(job) @@ -318,4 +271,4 @@ proc/get_all_job_icons() //For all existing HUD icons else return - return "Unknown" //Return unknown if none of the above apply \ No newline at end of file + return "Unknown" //Return unknown if none of the above apply