From ae1169d13ac81be2980828878df07700b8a7c3bb Mon Sep 17 00:00:00 2001 From: VampyrBytes Date: Fri, 19 Feb 2016 10:17:29 +0000 Subject: [PATCH 1/3] Prevents return when exiled and inside something Fixes #3529 If an object going through the awaygate contains a player with an exile implant in, travel is prevented --- code/modules/awaymissions/gateway.dm | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 964da2ca2b9..1fe4c550f9a 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -236,13 +236,22 @@ obj/machinery/gateway/centerstation/process() if(!ready) return if(!active) return if(istype(M, /mob/living/carbon)) - for(var/obj/item/weapon/implant/exile/E in M)//Checking that there is an exile implant in the contents - if(E.imp_in == M)//Checking that it's actually implanted vs just in their pocket - M << "\black The station gate has detected your exile implant and is blocking your entry." - return + if (exilecheck(M)) return + if(istype(M, /obj)) + for(var/mob/living/carbon/F in M) + if (exilecheck(F)) return M.forceMove(get_step(stationgate.loc, SOUTH)) M.dir = SOUTH +/obj/machinery/gateway/centeraway/proc/exilecheck(var/mob/living/carbon/M) + var/found = 0 + for(var/obj/item/weapon/implant/exile/E in M)//Checking that there is an exile implant in the contents + if(E.imp_in == M)//Checking that it's actually implanted vs just in their pocket + if(!(found)) + M << "\black The station gate has detected your exile implant and is blocking your entry." + found = 1 + return 1 + return 0 /obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob, params) if(istype(W,/obj/item/device/multitool)) From 7bfe2a104084912950aba823cc9fae966284b1af Mon Sep 17 00:00:00 2001 From: VampyrBytes Date: Fri, 19 Feb 2016 10:41:15 +0000 Subject: [PATCH 2/3] strips testing variable --- code/modules/awaymissions/gateway.dm | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 1fe4c550f9a..18d86ff51a9 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -244,12 +244,9 @@ obj/machinery/gateway/centerstation/process() M.dir = SOUTH /obj/machinery/gateway/centeraway/proc/exilecheck(var/mob/living/carbon/M) - var/found = 0 for(var/obj/item/weapon/implant/exile/E in M)//Checking that there is an exile implant in the contents if(E.imp_in == M)//Checking that it's actually implanted vs just in their pocket - if(!(found)) - M << "\black The station gate has detected your exile implant and is blocking your entry." - found = 1 + M << "\black The station gate has detected your exile implant and is blocking your entry." return 1 return 0 From d4d16ac98ba99e58f802a59a14df705e4a99d815 Mon Sep 17 00:00:00 2001 From: VampyrBytes Date: Fri, 19 Feb 2016 13:47:47 +0000 Subject: [PATCH 3/3] fixes /blacks --- code/modules/awaymissions/gateway.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/awaymissions/gateway.dm b/code/modules/awaymissions/gateway.dm index 18d86ff51a9..cc4ddb95856 100644 --- a/code/modules/awaymissions/gateway.dm +++ b/code/modules/awaymissions/gateway.dm @@ -246,16 +246,16 @@ obj/machinery/gateway/centerstation/process() /obj/machinery/gateway/centeraway/proc/exilecheck(var/mob/living/carbon/M) for(var/obj/item/weapon/implant/exile/E in M)//Checking that there is an exile implant in the contents if(E.imp_in == M)//Checking that it's actually implanted vs just in their pocket - M << "\black The station gate has detected your exile implant and is blocking your entry." + M << "The station gate has detected your exile implant and is blocking your entry." return 1 return 0 /obj/machinery/gateway/centeraway/attackby(obj/item/device/W as obj, mob/user as mob, params) if(istype(W,/obj/item/device/multitool)) if(calibrated) - user << "\black The gate is already calibrated, there is no work for you to do here." + user << "The gate is already calibrated, there is no work for you to do here." return else - user << "Recalibration successful!: \black This gate's systems have been fine tuned. Travel to this gate will now be on target." + user << "Recalibration successful!: This gate's systems have been fine tuned. Travel to this gate will now be on target." calibrated = 1 return