diff --git a/code/modules/mining/aux_base.dm b/code/modules/mining/aux_base.dm index b8bea629a17..3b7ef0674a2 100644 --- a/code/modules/mining/aux_base.dm +++ b/code/modules/mining/aux_base.dm @@ -302,19 +302,16 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove() if(!Mport) user << "This station is not equipped with an approprite mining shuttle. Please contact Nanotrasen Support." return - var/search_radius = max(Mport.width, Mport.height)*0.5 - var/list/landing_areas = get_areas_in_range(search_radius, landing_spot) - for(var/area/shuttle/auxillary_base/AB in landing_areas) //You land NEAR the base, not IN it. - user << "The mining shuttle must not land within the mining base itself." - SSshuttle.stationary.Remove(Mport) - qdel(Mport) - return + var/obj/docking_port/mobile/mining_shuttle + var/list/landing_turfs = list() //List of turfs where the mining shuttle may land. for(var/S in SSshuttle.mobile) var/obj/docking_port/mobile/MS = S if(MS.id != "mining") continue mining_shuttle = MS + landing_turfs = mining_shuttle.return_ordered_turfs(x,y,z,dir) + break if(!mining_shuttle) //Not having a mining shuttle is a map issue user << "No mining shuttle signal detected. Please contact Nanotrasen Support." @@ -322,6 +319,13 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove() qdel(Mport) return + for(var/L in landing_turfs) //You land NEAR the base, not IN it. + if(istype(get_area(L), /area/shuttle/auxillary_base)) + user << "The mining shuttle must not land within the mining base itself." + SSshuttle.stationary.Remove(Mport) + qdel(Mport) + return + if(!mining_shuttle.canDock(Mport)) 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) @@ -331,7 +335,7 @@ obj/docking_port/stationary/public_mining_dock/onShuttleMove() aux_base_console.set_mining_mode() //Lets the colony park the shuttle there, now that it has a dock. user << "Mining shuttle calibration successful! Shuttle interface available at base console." anchored = 1 //Locks in place to mark the landing zone. - playsound(src.loc, 'sound/machines/ping.ogg', 50, 0) + playsound(loc, 'sound/machines/ping.ogg', 50, 0) /obj/structure/mining_shuttle_beacon/proc/clear_cooldown() anti_spam_cd = 0