diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm
index 8cf6c56037..6b364e63e7 100644
--- a/code/modules/mining/aux_base.dm
+++ b/code/modules/mining/aux_base.dm
@@ -318,7 +318,8 @@ obj/docking_port/stationary/public_mining_dock
qdel(Mport)
return
- for(var/L in landing_turfs) //You land NEAR the base, not IN it.
+ for(var/i in 1 to landing_turfs.len) //You land NEAR the base, not IN it.
+ var/turf/L = landing_turfs[i]
if(!L) //This happens at map edges
to_chat(user, "Unable to secure a valid docking zone. Please try again in an open area near, but not within the aux. mining base.")
SSshuttle.stationary.Remove(Mport)
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 2e0248b2cd..2b02708b8c 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -84,15 +84,7 @@
//returns turfs within our projected rectangle in a specific order.
//this ensures that turfs are copied over in the same order, regardless of any rotation
-/obj/docking_port/proc/return_ordered_turfs(_x, _y, _z, _dir, area_type)
- if(!_dir)
- _dir = dir
- if(!_x)
- _x = x
- if(!_y)
- _y = y
- if(!_z)
- _z = z
+/obj/docking_port/proc/return_ordered_turfs(_x, _y, _z, _dir)
var/cos = 1
var/sin = 0
switch(_dir)
@@ -108,52 +100,14 @@
. = list()
- var/xi
- var/yi
- for(var/dx=0, dx