From 1950910e678e693910e4e925e77504e9d8558f4e Mon Sep 17 00:00:00 2001 From: FabianK3 <21039694+FabianK3@users.noreply.github.com> Date: Thu, 14 Nov 2024 15:14:28 +0100 Subject: [PATCH] Fixed ladder access (#20150) ### Introduction With the port of SSthrowing from TG (see #19421) an additional check got added to `/atom/movable/Move`. The check ``` if(!newloc || newloc == loc) return ``` prevents the move method from an unnecessary movement. The method is also used by ladders to move the player to the ladder before climbing it - With the new additional check it was no longer possible to grab ladders if you are on the same tile, because the move method would run the location check and return, skipping the movement, which is correct, but results in failing to climb the ladder after all ("You fail to reach the ladder."). This PR fixes this small but very annoying issue. ### What changed? To not further modify the move method an additional check has been added to the ladder-climb code to skip the move method when the player is already on the same tile. --- code/modules/multiz/structures.dm | 3 ++- html/changelogs/fabiank3-ladder-acces-fix.yml | 6 ++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 html/changelogs/fabiank3-ladder-acces-fix.yml diff --git a/code/modules/multiz/structures.dm b/code/modules/multiz/structures.dm index 70f205bcf91..e243ad2c60a 100644 --- a/code/modules/multiz/structures.dm +++ b/code/modules/multiz/structures.dm @@ -81,7 +81,8 @@ if (!istype(G)) G = M.r_hand - if(!M.Move(get_turf(src))) + var/turf/T = get_turf(src) + if(M.loc != T && !M.Move(T)) to_chat(M, SPAN_NOTICE("You fail to reach \the [src].")) return diff --git a/html/changelogs/fabiank3-ladder-acces-fix.yml b/html/changelogs/fabiank3-ladder-acces-fix.yml new file mode 100644 index 00000000000..7399fef6aa6 --- /dev/null +++ b/html/changelogs/fabiank3-ladder-acces-fix.yml @@ -0,0 +1,6 @@ +author: FabianK3 + +delete-after: True + +changes: + - bugfix: "Fixed not being able to climb ladders if you are standing on the same tile."