From 1e7c986ab54e72c02aeaca233de704634c810a70 Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Wed, 28 Jun 2017 08:31:55 -0500 Subject: [PATCH 1/4] Fixes emergency shuttle endgame state --- code/modules/shuttle/emergency.dm | 7 +------ code/modules/shuttle/emergency.dm.rej | 15 +++++++++++++++ code/modules/shuttle/shuttle.dm | 23 +++++++++++++++++++++++ 3 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 code/modules/shuttle/emergency.dm.rej diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index 5b3ac7f4d1..d5c41a98a4 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -347,9 +347,7 @@ //move each escape pod (or applicable spaceship) to its corresponding transit dock for(var/A in SSshuttle.mobile) var/obj/docking_port/mobile/M = A - if(M.launch_status == UNLAUNCHED) //Pods will not launch from the mine/planet, and other ships won't launch unless we tell them to. - M.launch_status = ENDGAME_LAUNCHED - M.enterTransit() + M.on_emergency_launch() //now move the actual emergency shuttle to its transit dock var/list/areas = list() @@ -551,9 +549,6 @@ SSshuttle.emergency = current_emergency SSshuttle.backup_shuttle = src -#undef UNLAUNCHED -#undef LAUNCHED -#undef EARLY_LAUNCHED #undef TIMELEFT #undef ENGINES_START_TIME #undef ENGINES_STARTED diff --git a/code/modules/shuttle/emergency.dm.rej b/code/modules/shuttle/emergency.dm.rej new file mode 100644 index 0000000000..7628ddb700 --- /dev/null +++ b/code/modules/shuttle/emergency.dm.rej @@ -0,0 +1,15 @@ +diff a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm (rejected hunks) +@@ -383,12 +381,7 @@ + //move each escape pod to its corresponding escape dock + for(var/A in SSshuttle.mobile) + var/obj/docking_port/mobile/M = A +- if(M.launch_status == ENDGAME_LAUNCHED) +- if(istype(M, /obj/docking_port/mobile/pod)) +- M.dock(SSshuttle.getDock("[M.id]_away")) //Escape pods dock at centcomm +- else +- 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 ++ M.on_emergency_dock() + + // now move the actual emergency shuttle to centcomm + // unless the shuttle is "hijacked" diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm index b9457f9394..df967e485f 100644 --- a/code/modules/shuttle/shuttle.dm +++ b/code/modules/shuttle/shuttle.dm @@ -826,4 +826,27 @@ return ..() +//Called when emergency shuttle leaves the station +/obj/docking_port/mobile/proc/on_emergency_launch() + if(launch_status == UNLAUNCHED) //Pods will not launch from the mine/planet, and other ships won't launch unless we tell them to. + launch_status = ENDGAME_LAUNCHED + enterTransit() + +/obj/docking_port/mobile/emergency/on_emergency_launch() + return + +//Called when emergency shuttle docks at centcom +/obj/docking_port/mobile/proc/on_emergency_dock() + //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 + if(launch_status == ENDGAME_LAUNCHED) + launch_status = ENDGAME_TRANSIT + +/obj/docking_port/mobile/pod/on_emergency_dock() + if(launch_status == ENDGAME_LAUNCHED) + dock(SSshuttle.getDock("[id]_away")) //Escape pods dock at centcomm + launch_status = SHUTTLE_ENDGAME + +/obj/docking_port/mobile/emergency/on_emergency_dock() + return + #undef DOCKING_PORT_HIGHLIGHT From 8cd84f7496ef1f6ecd95cc4f635af7de50e223ba Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 29 Jun 2017 04:44:26 -0500 Subject: [PATCH 2/4] Update emergency.dm --- code/modules/shuttle/emergency.dm | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index d5c41a98a4..c9e99551ab 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -378,14 +378,10 @@ M.parallax_slowdown() if(time_left <= 0) - //move each escape pod to its corresponding escape dock - for(var/A in SSshuttle.mobile) - var/obj/docking_port/mobile/M = A - if(M.launch_status == ENDGAME_LAUNCHED) - 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 + //move each escape pod to its corresponding escape dock + for(var/A in SSshuttle.mobile) + var/obj/docking_port/mobile/M = A + M.on_emergency_dock() // now move the actual emergency shuttle to centcomm // unless the shuttle is "hijacked" From 1c9a15f74de20c496928d48c00a0fe73aa346632 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 29 Jun 2017 05:07:12 -0500 Subject: [PATCH 3/4] Update emergency.dm --- code/modules/shuttle/emergency.dm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/code/modules/shuttle/emergency.dm b/code/modules/shuttle/emergency.dm index c9e99551ab..3465b7006e 100644 --- a/code/modules/shuttle/emergency.dm +++ b/code/modules/shuttle/emergency.dm @@ -378,9 +378,9 @@ M.parallax_slowdown() if(time_left <= 0) - //move each escape pod to its corresponding escape dock - for(var/A in SSshuttle.mobile) - var/obj/docking_port/mobile/M = A + //move each escape pod to its corresponding escape dock + for(var/A in SSshuttle.mobile) + var/obj/docking_port/mobile/M = A M.on_emergency_dock() // now move the actual emergency shuttle to centcomm From 8404651a8253c0fe7416b297b2bad21e15e08cd3 Mon Sep 17 00:00:00 2001 From: LetterJay Date: Thu, 29 Jun 2017 05:28:34 -0500 Subject: [PATCH 4/4] Update shuttles.dm --- code/__DEFINES/shuttles.dm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/code/__DEFINES/shuttles.dm b/code/__DEFINES/shuttles.dm index 134a4ea496..b5f221975f 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 @@ -50,4 +51,4 @@ //Engine related #define ENGINE_COEFF_MIN 0.5 #define ENGINE_COEFF_MAX 2 -#define ENGINE_DEFAULT_MAXSPEED_ENGINES 5 \ No newline at end of file +#define ENGINE_DEFAULT_MAXSPEED_ENGINES 5