diff --git a/code/_helpers/turfs.dm b/code/_helpers/turfs.dm index ffef7241722..cc908296198 100644 --- a/code/_helpers/turfs.dm +++ b/code/_helpers/turfs.dm @@ -104,6 +104,9 @@ //Are we doing shuttlework? Just to save another type check later. var/shuttlework = 0 + T.pre_translate_A(B) + B.pre_translate_B(T) + //Shuttle turfs handle their own fancy moving. if(istype(T,/turf/simulated/shuttle)) shuttlework = 1 @@ -116,7 +119,6 @@ var/old_dir1 = T.dir var/old_icon_state1 = T.icon_state var/old_icon1 = T.icon - var/old_underlays = T.underlays.Copy() var/old_decals = T.decals ? T.decals.Copy() : null X = B.ChangeTurf(T.type) @@ -124,7 +126,6 @@ X.icon_state = old_icon_state1 X.icon = old_icon1 X.copy_overlays(T, TRUE) - X.underlays = old_underlays X.decals = old_decals //Move the air from source to dest @@ -164,6 +165,9 @@ else T.ChangeTurf(get_base_turf_by_area(T)) + T.post_translate_A(B) + B.post_translate_B(T) + return TRUE //Used for border objects. This returns true if this atom is on the border between the two specified turfs diff --git a/code/game/turfs/turf.dm b/code/game/turfs/turf.dm index 2f54db48473..bcd53322b86 100644 --- a/code/game/turfs/turf.dm +++ b/code/game/turfs/turf.dm @@ -394,3 +394,17 @@ ChangeTurf(/turf/simulated/floor/airless, preserve_outdoors = TRUE) return TRUE return FALSE + + +// We're about to be the A-side in a turf translation +/turf/proc/pre_translate_A(var/turf/B) + return +// We're about to be the B-side in a turf translation +/turf/proc/pre_translate_B(var/turf/A) + return +// We were the the A-side in a turf translation +/turf/proc/post_translate_A(var/turf/B) + return +// We were the the B-side in a turf translation +/turf/proc/post_translate_B(var/turf/A) + return \ No newline at end of file