Merge pull request #3463 from Citadel-Station-13/upstream-merge-31784

[MIRROR] Next round of shuttle fixes at the cost of a small piece of my sanity
This commit is contained in:
LetterJay
2017-10-18 07:35:34 -04:00
committed by GitHub
4 changed files with 29 additions and 10 deletions
+1 -1
View File
@@ -127,7 +127,7 @@
checkLandingSpot()
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/checkLandingTurf(turf/T)
return T && (!blacklisted_turfs || !blacklisted_turfs[T]) && (!space_turfs_only || isspaceturf(T))
return T && (!blacklisted_turfs || !blacklisted_turfs[T]) && (!space_turfs_only || isspaceturf(T)) && (T.x > 1 && T.y > 1 && T.x < world.maxx && T.y < world.maxy)
/obj/machinery/computer/camera_advanced/shuttle_docker/proc/generateBlacklistedTurfs()
blacklisted_turfs = list()
+14 -6
View File
@@ -60,6 +60,9 @@ All ShuttleMove procs go here
//Source turf changes
ChangeTurf(turf_type, baseturf_type, FALSE, TRUE)
if(rotation)
newT.shuttleRotate(rotation) //see shuttle_rotate.dm
return TRUE
// Called on the new turf after everything has been moved
@@ -160,8 +163,9 @@ All ShuttleMove procs go here
/obj/machinery/camera/beforeShuttleMove(turf/newT, rotation, move_mode)
. = ..()
GLOB.cameranet.removeCamera(src)
. |= MOVE_CONTENTS
if(. & MOVE_AREA)
. |= MOVE_CONTENTS
GLOB.cameranet.removeCamera(src)
/obj/machinery/camera/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir)
. = ..()
@@ -198,7 +202,8 @@ All ShuttleMove procs go here
/obj/machinery/thruster/beforeShuttleMove(turf/newT, rotation, move_mode)
. = ..()
. |= MOVE_CONTENTS
if(. & MOVE_AREA)
. |= MOVE_CONTENTS
/obj/machinery/atmospherics/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir)
. = ..()
@@ -299,11 +304,13 @@ All ShuttleMove procs go here
/obj/structure/grille/beforeShuttleMove(turf/newT, rotation, move_mode)
. = ..()
. |= MOVE_CONTENTS
if(. & MOVE_AREA)
. |= MOVE_CONTENTS
/obj/structure/lattice/beforeShuttleMove(turf/newT, rotation, move_mode)
. = ..()
. |= MOVE_CONTENTS
if(. & MOVE_AREA)
. |= MOVE_CONTENTS
/obj/structure/disposalpipe/afterShuttleMove(list/movement_force, shuttle_dir, shuttle_preferred_direction, move_dir)
. = ..()
@@ -317,7 +324,8 @@ All ShuttleMove procs go here
/obj/structure/shuttle/beforeShuttleMove(turf/newT, rotation, move_mode)
. = ..()
. |= MOVE_CONTENTS
if(. & MOVE_AREA)
. |= MOVE_CONTENTS
/************************************Misc move procs************************************/
+12 -3
View File
@@ -566,8 +566,10 @@
index++
var/turf/oldT = place
var/turf/newT = new_turfs[index]
if(!newT || !oldT)
continue
if(!newT)
return DOCKING_NULL_DESTINATION
if(!oldT)
return DOCKING_NULL_SOURCE
var/area/old_area = oldT.loc
var/move_mode = old_area.beforeShuttleMove(shuttle_areas) //areas
@@ -673,7 +675,14 @@
// then try again
switch(mode)
if(SHUTTLE_CALL)
if(dock(destination, preferred_direction) != DOCKING_SUCCESS)
var/error = dock(destination, preferred_direction)
if(error && error & (DOCKING_NULL_DESTINATION | DOCKING_NULL_SOURCE))
var/msg = "A mobile dock in transit exited dock() with an error. This is most likely a mapping problem: Error: [error], ([src]) ([previous])"
WARNING(msg)
message_admins(msg)
mode = SHUTTLE_IDLE
return
else if(error)
setTimer(20)
return
if(SHUTTLE_RECALL)