Skip to content

Commit

Permalink
[MIRROR] fix up interlude tp stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
MuckerMayhem authored and SuhEugene committed Jan 30, 2024
1 parent dddcf39 commit 729af9b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
11 changes: 9 additions & 2 deletions code/game/machinery/bluespace_drive.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 3 additions & 2 deletions maps/torch/torch_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)

0 comments on commit 729af9b

Please sign in to comment.