From 9cf23741ca92c438569d9cd2275470366e664078 Mon Sep 17 00:00:00 2001 From: "baloh.matevz@gmail.com" Date: Sat, 5 Jan 2013 03:37:22 +0000 Subject: [PATCH] - Fixed department security, so you no longer spawn in walls - Applied some changes that happened to jobs since department security was started. git-svn-id: http://tgstation13.googlecode.com/svn/trunk@5467 316c924e-a436-60f5-8080-3fe189b3f50e --- code/WorkInProgress/Sigyn/Department Sec/jobs.dm | 10 +++++++++- code/WorkInProgress/Sigyn/Softcurity/access.dm | 6 ++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm index ff6f96237a0..5c1587123f0 100644 --- a/code/WorkInProgress/Sigyn/Department Sec/jobs.dm +++ b/code/WorkInProgress/Sigyn/Department Sec/jobs.dm @@ -30,7 +30,15 @@ proc/assign_sec_to_department(var/mob/living/carbon/human/H) if(destination) spawn(15) if(H) - H.loc = pick(get_area_turfs(destination)) + var/turf/T + var/safety = 0 + while(safety < 25) + T = pick(get_area_turfs(destination)) + if(!H.Move(T)) + safety += 1 + continue + else + break H << "You have been assigned to [department]!" if(locate(/obj/item/weapon/card/id, H)) var/obj/item/weapon/card/id/I = locate(/obj/item/weapon/card/id, H) diff --git a/code/WorkInProgress/Sigyn/Softcurity/access.dm b/code/WorkInProgress/Sigyn/Softcurity/access.dm index e009b946c11..d0dace17bf7 100644 --- a/code/WorkInProgress/Sigyn/Softcurity/access.dm +++ b/code/WorkInProgress/Sigyn/Softcurity/access.dm @@ -131,6 +131,12 @@ return 1 return 0 +/obj/item/proc/GetAccess() + return list() + +/obj/item/proc/GetID() + return null + /obj/proc/check_access(obj/item/weapon/card/id/I) if (istype(I, /obj/item/device/pda))