From 729af9b31ca73ceaa5cb3da36f245b7693a2d455 Mon Sep 17 00:00:00 2001 From: MuckerMayhem <1161516+MuckerMayhem@users.noreply.github.com> Date: Wed, 31 Jan 2024 00:15:23 +0300 Subject: [PATCH] [MIRROR] fix up interlude tp stuff --- code/game/machinery/bluespace_drive.dm | 11 +++++++++-- maps/torch/torch_procs.dm | 5 +++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/code/game/machinery/bluespace_drive.dm b/code/game/machinery/bluespace_drive.dm index 3a4be5d9f5b10..c65ebbfd420b4 100644 --- a/code/game/machinery/bluespace_drive.dm +++ b/code/game/machinery/bluespace_drive.dm @@ -218,8 +218,15 @@ continue if (GLOB.using_map.use_bluespace_interlude && prob(interlude_teleport_chance)) - addtimer(new Callback(GLOBAL_PROC, /proc/do_unstable_teleport_safe, mob, GetConnectedZlevels(mob.z)), rand(1, 2) MINUTES) - GLOB.using_map.do_interlude_teleport(mob, duration = rand(1, 2.5) MINUTES) + if (istype(mob, /mob/living/simple_animal) && prob(80)) + return + var/turf/T = pick_area_turf_in_connected_z_levels( + list(/proc/is_not_space_area), + list(/proc/not_turf_contains_dense_objects, /proc/IsTurfAtmosSafe), + zlevels[1]) + if (!T) + return + GLOB.using_map.do_interlude_teleport(mob, T, rand(1, 2.5) MINUTES) return if (mob != being) var/source_position = being.loc diff --git a/maps/torch/torch_procs.dm b/maps/torch/torch_procs.dm index 352fa294a1e5f..55e58b6ef01b6 100644 --- a/maps/torch/torch_procs.dm +++ b/maps/torch/torch_procs.dm @@ -86,11 +86,12 @@ /datum/map/torch/do_interlude_teleport(atom/movable/target, atom/destination, duration = 30 SECONDS, precision, type) var/turf/T = pick_area_turf(/area/bluespace_interlude/platform, list(/proc/not_turf_contains_dense_objects, /proc/IsTurfAtmosSafe)) - if (!T) + if (!T && destination) do_teleport(target, destination) return if (isliving(target)) to_chat(target, FONT_LARGE(SPAN_WARNING("Your vision goes blurry and nausea strikes your stomach. Where are you...?"))) do_teleport(target, T, precision, type) - addtimer(new Callback(GLOBAL_PROC, /proc/do_teleport, target, destination), duration) + if (destination) + addtimer(new Callback(GLOBAL_PROC, /proc/do_teleport, target, destination), duration)