From 18f47d2ef35b90148b8aa9b0dca2fa87ef523f66 Mon Sep 17 00:00:00 2001 From: S34N <12197162+S34NW@users.noreply.github.com> Date: Sun, 13 Jun 2021 18:08:15 +0100 Subject: [PATCH] Fixes broken shuttle and escape pod rotation (#16154) * Fixes shuttle rotation * Apply AA suggestions * Apply suggestions from code review Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> Co-authored-by: AffectedArc07 <25063394+AffectedArc07@users.noreply.github.com> --- code/game/shuttle_engines.dm | 8 +------- code/game/turfs/simulated/walls_mineral.dm | 3 +++ code/modules/shuttle/shuttle_rotate.dm | 3 +++ 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/code/game/shuttle_engines.dm b/code/game/shuttle_engines.dm index 3e40186623d..6b3ff950dbe 100644 --- a/code/game/shuttle_engines.dm +++ b/code/game/shuttle_engines.dm @@ -6,10 +6,7 @@ armor = list(melee = 100, bullet = 10, laser = 10, energy = 0, bomb = 0, bio = 0, rad = 0, fire = 50, acid = 70) //default + ignores melee /obj/structure/shuttle/shuttleRotate(rotation) - ..() - var/matrix/M = transform - M.Turn(rotation) - transform = M + return //This override is needed to properly rotate the object when on a shuttle that is rotated. /obj/structure/shuttle/engine name = "engine" @@ -30,14 +27,11 @@ opacity = 1 /obj/structure/shuttle/engine/propulsion/burst - name = "burst" /obj/structure/shuttle/engine/propulsion/burst/left - name = "left" icon_state = "burst_l" /obj/structure/shuttle/engine/propulsion/burst/right - name = "right" icon_state = "burst_r" /obj/structure/shuttle/engine/router diff --git a/code/game/turfs/simulated/walls_mineral.dm b/code/game/turfs/simulated/walls_mineral.dm index 9d743ae9c18..6e8891f64e0 100644 --- a/code/game/turfs/simulated/walls_mineral.dm +++ b/code/game/turfs/simulated/walls_mineral.dm @@ -7,6 +7,9 @@ canSmoothWith = null smooth = SMOOTH_TRUE +/turf/simulated/wall/mineral/shuttleRotate(rotation) + return //This override is needed to properly rotate the object when on a shuttle that is rotated. + /turf/simulated/wall/mineral/gold name = "gold wall" desc = "A wall with gold plating. Swag!" diff --git a/code/modules/shuttle/shuttle_rotate.dm b/code/modules/shuttle/shuttle_rotate.dm index 2adaad8e166..9d1989e70fb 100644 --- a/code/modules/shuttle/shuttle_rotate.dm +++ b/code/modules/shuttle/shuttle_rotate.dm @@ -56,6 +56,9 @@ If ever any of these procs are useful for non-shuttles, rename it to proc/rotate d2 = temp update_icon() +/obj/structure/shuttle/engine/shuttleRotate(rotation, params) + setDir(angle2dir(rotation+dir2angle(dir))) + //Fixes dpdir on shuttle rotation /obj/structure/disposalpipe/shuttleRotate(rotation, params) . = ..()