From 1d4820d9cc2ee738f0f5e8cbb4c27efe140870bc Mon Sep 17 00:00:00 2001 From: AnturK Date: Sat, 24 Jun 2017 18:48:39 +0200 Subject: [PATCH] Fixes whiteship escape (#28734) --- code/__DEFINES/shuttles.dm | 1 + code/game/atoms.dm | 13 ++++++++++--- code/modules/shuttle/emergency.dm | 3 ++- 3 files changed, 13 insertions(+), 4 deletions(-) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index a133816f2d5a..aa36135eb7d7 100644 --- a/code/__DEFINES/shuttles.dm +++ b/code/__DEFINES/shuttles.dm @@ -27,6 +27,7 @@ #define UNLAUNCHED 0 #define ENDGAME_LAUNCHED 1 #define EARLY_LAUNCHED 2 +#define ENDGAME_TRANSIT 3 // Ripples, effects that signal a shuttle's arrival #define SHUTTLE_RIPPLE_TIME 100 diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 11e90cdce7da..3bcb55894fe8 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -108,16 +108,23 @@ /atom/proc/onCentcom() var/turf/T = get_turf(src) if(!T) - return 0 + return FALSE + + + if(T.z == ZLEVEL_TRANSIT) + for(var/A in SSshuttle.mobile) + var/obj/docking_port/mobile/M = A + if(M.launch_status == ENDGAME_TRANSIT && T in M.areaInstance) + return TRUE if(T.z != ZLEVEL_CENTCOM)//if not, don't bother - return 0 + return FALSE //check for centcomm shuttles for(var/A in SSshuttle.mobile) var/obj/docking_port/mobile/M = A if(M.launch_status == ENDGAME_LAUNCHED && T in M.areaInstance) - return 1 + return TRUE //finally check for centcom itself return istype(T.loc,/area/centcom) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 4c0dde7cf0b0..1a9fef595738 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -387,7 +387,8 @@ if(istype(M, /obj/docking_port/mobile/pod)) M.dock(SSshuttle.getDock("[M.id]_away")) //Escape pods dock at centcomm else - continue //Mapping a new docking point for each ship mappers could potentially want docking with centcomm would take up lots of space, just let them keep flying off into the sunset for their greentext + M.launch_status = ENDGAME_TRANSIT + //Mapping a new docking point for each ship mappers could potentially want docking with centcomm would take up lots of space, just let them keep flying off into the sunset for their greentext // now move the actual emergency shuttle to centcomm // unless the shuttle is "hijacked"