From f72c21b606c779f2e4a5ea58a72c9fcb23e540c7 Mon Sep 17 00:00:00 2001 From: Krausus Date: Wed, 3 Jun 2015 20:46:23 -0400 Subject: [PATCH 1/2] Fixes Escape Objective Issues Escaping on pods will now work properly, and being handcuffed will cause failure regardless of where you are. --- code/game/gamemodes/objective.dm | 33 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 629bd53c8b7..287054aa297 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -389,6 +389,16 @@ datum/objective/silence datum/objective/escape explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody." + var/escape_areas = list(/area/shuttle/escape/centcom, + /area/shuttle/escape_pod1/centcom, + /area/shuttle/escape_pod1/transit, + /area/shuttle/escape_pod2/centcom, + /area/shuttle/escape_pod2/transit, + /area/shuttle/escape_pod3/centcom, + /area/shuttle/escape_pod3/transit, + /area/shuttle/escape_pod5/centcom, + /area/shuttle/escape_pod5/transit, + /area/centcom/evac) check_completion() if(issilicon(owner.current)) @@ -399,27 +409,16 @@ datum/objective/escape return 0 if(!owner.current || owner.current.stat == DEAD) return 0 + if(istype(owner.current, /mob/living/carbon)) + var/mob/living/carbon/C = owner.current + if (C.handcuffed) // If you're cuffed, you're in custody. + return 0 var/turf/location = get_turf(owner.current.loc) if(!location) return 0 - if(istype(location, /turf/simulated/shuttle/floor4)) // Fails tratiors if they are in the shuttle brig -- Polymorph - if(istype(owner.current, /mob/living/carbon)) - var/mob/living/carbon/C = owner.current - if (!C.handcuffed) - return 1 - return 0 - - var/area/check_area = location.loc - if(istype(check_area, /area/shuttle/escape/centcom)) - return 1 - if(istype(check_area, /area/shuttle/escape_pod1/centcom)) - return 1 - if(istype(check_area, /area/shuttle/escape_pod2/centcom)) - return 1 - if(istype(check_area, /area/shuttle/escape_pod3/centcom)) - return 1 - if(istype(check_area, /area/shuttle/escape_pod5/centcom)) + var/area/check_area = get_area(location) + if(check_area && check_area.type in escape_areas) return 1 else return 0 From 716d146ddd6c18f9e64002fd79f19a1eb1ef0647 Mon Sep 17 00:00:00 2001 From: Krausus Date: Thu, 4 Jun 2015 13:14:44 -0400 Subject: [PATCH 2/2] Makes escape objectives fail if restrained Also returns the "alive and free" wording to escape objectives. --- code/game/gamemodes/objective.dm | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/code/game/gamemodes/objective.dm b/code/game/gamemodes/objective.dm index 287054aa297..14244e1c4fc 100644 --- a/code/game/gamemodes/objective.dm +++ b/code/game/gamemodes/objective.dm @@ -388,7 +388,7 @@ datum/objective/silence datum/objective/escape - explanation_text = "Escape on the shuttle or an escape pod alive and without being in custody." + explanation_text = "Escape on the shuttle or an escape pod alive and free." var/escape_areas = list(/area/shuttle/escape/centcom, /area/shuttle/escape_pod1/centcom, /area/shuttle/escape_pod1/transit, @@ -409,10 +409,8 @@ datum/objective/escape return 0 if(!owner.current || owner.current.stat == DEAD) return 0 - if(istype(owner.current, /mob/living/carbon)) - var/mob/living/carbon/C = owner.current - if (C.handcuffed) // If you're cuffed, you're in custody. - return 0 + if(owner.current.restrained()) + return 0 var/turf/location = get_turf(owner.current.loc) if(!location) return 0