diff --git a/code/__HELPERS/areas.dm b/code/__HELPERS/areas.dm
index 3e097c46f3c..daf7f9dcc38 100644
--- a/code/__HELPERS/areas.dm
+++ b/code/__HELPERS/areas.dm
@@ -15,6 +15,8 @@
var/turf/sourceT = found_turfs[1]
if(break_if_found[sourceT.type])
return FALSE
+ if (is_type_in_typecache(sourceT.loc, GLOB.typecache_shuttle_area))
+ return FALSE
found_turfs.Cut(1, 2)
var/dir_flags = checked_turfs[sourceT]
for(var/dir in GLOB.alldirs)
@@ -37,7 +39,7 @@
var/static/blacklisted_areas = typecacheof(/area/space)
var/list/turfs = detect_room(get_turf(creator), blacklisted_turfs)
if(!turfs)
- to_chat(creator, "The new area must be completely airtight.")
+ to_chat(creator, "The new area must be completely airtight and not a part of a shuttle.")
return
if(turfs.len > BP_MAX_ROOM_SIZE)
to_chat(creator, "The room you're in is too big. It is [((turfs.len / BP_MAX_ROOM_SIZE)-1)*100]% larger than allowed.")
@@ -45,7 +47,7 @@
var/list/areas = list("New Area" = /area)
for(var/i in 1 to turfs.len)
var/area/place = get_area(turfs[i])
- if(blacklisted_areas[place.type])
+ if(blacklisted_areas[place.type] || GLOB.typecache_shuttle_area[place.type])
continue
if(!place.requires_power || place.noteleport || place.hidden)
continue // No expanding powerless rooms etc
@@ -91,4 +93,4 @@
to_chat(creator, "You have created a new area, named [newA.name]. It is now weather proof, and constructing an APC will allow it to be powered.")
return TRUE
-#undef BP_MAX_ROOM_SIZE
\ No newline at end of file
+#undef BP_MAX_ROOM_SIZE
diff --git a/code/_globalvars/lists/typecache.dm b/code/_globalvars/lists/typecache.dm
index ad4564cf3b4..f1e2b03790f 100644
--- a/code/_globalvars/lists/typecache.dm
+++ b/code/_globalvars/lists/typecache.dm
@@ -9,3 +9,4 @@ GLOBAL_LIST_INIT(typecache_living, typecacheof(/mob/living))
GLOBAL_LIST_INIT(typecache_machine_or_structure, typecacheof(list(/obj/machinery, /obj/structure)))
+GLOBAL_LIST_INIT(typecache_shuttle_area, typecacheof(/area/shuttle))
diff --git a/code/game/atoms_movable.dm b/code/game/atoms_movable.dm
index 8ef95348818..957ee01a6a9 100644
--- a/code/game/atoms_movable.dm
+++ b/code/game/atoms_movable.dm
@@ -690,10 +690,18 @@
message_admins("[src] has been moved out of bounds in [ADMIN_COORDJMP(currentturf)]. Moving it to [ADMIN_COORDJMP(targetturf)].")
/atom/movable/proc/in_bounds()
- . = FALSE
+ var/static/list/allowed_shuttles = typecacheof(list(/area/shuttle/syndicate, /area/shuttle/escape, /area/shuttle/pod_1, /area/shuttle/pod_2, /area/shuttle/pod_3, /area/shuttle/pod_4))
var/turf/T = get_turf(src)
- if (T && (is_centcom_level(T.z) || is_station_level(T.z) || is_transit_level(T.z)))
- . = TRUE
+ if (!T)
+ return FALSE
+ if (is_station_level(T.z) || is_centcom_level(T.z))
+ return TRUE
+ if (is_transit_level(T.z))
+ var/area/A = T.loc
+ if (is_type_in_typecache(A, allowed_shuttles))
+ return TRUE
+
+ return FALSE
/* Language procs */
diff --git a/code/game/turfs/space/space.dm b/code/game/turfs/space/space.dm
index 4f6ab44a5e4..ed21431fe70 100644
--- a/code/game/turfs/space/space.dm
+++ b/code/game/turfs/space/space.dm
@@ -130,7 +130,24 @@
return
if(destination_z && destination_x && destination_y)
- A.forceMove(locate(destination_x, destination_y, destination_z))
+ var/tx = destination_x
+ var/ty = destination_y
+ var/turf/DT = locate(tx, ty, destination_z)
+ var/itercount = 0
+ while(DT.density || istype(DT.loc,/area/shuttle)) // Extend towards the center of the map, trying to look for a better place to arrive
+ if (itercount++ >= 100)
+ log_game("SPACE Z-TRANSIT ERROR: Could not not find a safe place to land [A] within 100 iterations.")
+ break
+ if (tx < 128)
+ tx++
+ else
+ tx--
+ if (ty < 128)
+ ty++
+ else
+ ty--
+ DT = locate(tx, ty, destination_z)
+ A.forceMove(DT)
if(isliving(A))
var/mob/living/L = A
diff --git a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
index ce750e6a88d..3fc2ec01db2 100644
--- a/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
+++ b/code/modules/antagonists/nukeop/equipment/nuclear_challenge.dm
@@ -81,5 +81,6 @@
return TRUE
#undef CHALLENGE_TELECRYSTALS
+#undef CHALLENGE_TIME_LIMIT
#undef CHALLENGE_MIN_PLAYERS
#undef CHALLENGE_SHUTTLE_DELAY
diff --git a/code/modules/ruins/spaceruin_code/caravanambush.dm b/code/modules/ruins/spaceruin_code/caravanambush.dm
index 603af76f1a7..772b851aa12 100644
--- a/code/modules/ruins/spaceruin_code/caravanambush.dm
+++ b/code/modules/ruins/spaceruin_code/caravanambush.dm
@@ -163,4 +163,4 @@
jumpto_ports = list("caravansyndicate3_ambush" = 1, "caravansyndicate3_listeningpost" = 1)
view_range = 10
x_offset = -1
- y_offset = -3
\ No newline at end of file
+ y_offset = -3
diff --git a/code/modules/shuttle/white_ship.dm b/code/modules/shuttle/white_ship.dm
index 79c2fda7ed0..ba472030e1a 100644
--- a/code/modules/shuttle/white_ship.dm
+++ b/code/modules/shuttle/white_ship.dm
@@ -17,4 +17,3 @@
x_offset = -6
y_offset = -10
designate_time = 100
-