From 35e8cc3e22ea8a7e8493543fc5a7ba0ce612d2c9 Mon Sep 17 00:00:00 2001 From: Emmett Gaines Date: Sun, 10 Dec 2017 18:44:00 -0500 Subject: [PATCH] minor improvements (#33424) --- code/modules/mining/aux_base.dm | 3 +- code/modules/shuttle/shuttle.dm | 78 +++++++-------------------------- 2 files changed, 19 insertions(+), 62 deletions(-) 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