From 5b53c6cf45a52714273f2ae60ac109c3477f6b84 Mon Sep 17 00:00:00 2001 From: fleure Date: Mon, 17 Feb 2014 19:25:34 +0000 Subject: [PATCH] Better fix for security access --- .../Sigyn/Department Sec/jobs.dm | 38 +++++++++---------- 1 file changed, 17 insertions(+), 21 deletions(-) diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm index 709a0c460f4..ee005a2e037 100644 --- a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm +++ b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm @@ -8,50 +8,46 @@ var/list/sec_departments = list("engineering", "supply", "medical", "science") else var/department = pick(sec_departments) sec_departments -= department - var/access = null + var/dep_access = null var/destination = null switch(department) if("supply") H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/cargo(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/supply(H), slot_ears) - access = list(access_mailsorting, access_mining) + dep_access = list(access_mailsorting, access_mining) destination = /area/security/checkpoint/supply if("engineering") H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/engine(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/engi(H), slot_ears) - access = list(access_construction, access_engine) + dep_access = list(access_construction, access_engine) destination = /area/security/checkpoint/engineering if("medical") H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/med(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/med(H), slot_ears) - access = list(access_medical) + dep_access = list(access_medical) destination = /area/security/checkpoint/medical if("science") H.equip_to_slot_or_del(new /obj/item/clothing/under/rank/security/science(H), slot_w_uniform) H.equip_to_slot_or_del(new /obj/item/device/radio/headset/headset_sec/department/sci(H), slot_ears) - access = list(access_research) + dep_access = list(access_research) destination = /area/security/checkpoint/science var/teleport = 0 if(!config.sec_start_brig) if(destination) if(!ticker || ticker.current_state <= GAME_STATE_SETTING_UP) teleport = 1 - spawn(10) - if(H) - if(teleport) - var/turf/T - var/safety = 0 - while(safety < 25) - T = safepick(get_area_turfs(destination)) - if(T && !H.Move(T)) - safety += 1 - continue - else - break - H << "You have been assigned to [department]!" - var/obj/item/weapon/card/id/I = locate(/obj/item/weapon/card/id, H) - if(I) - I.access |= access + if(teleport) + var/turf/T + var/safety = 0 + while(safety < 25) + T = safepick(get_area_turfs(destination)) + if(T && !H.Move(T)) + safety += 1 + continue + else + break + H << "You have been assigned to [department]!" + access += dep_access