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.
This commit is contained in:
FabianK3
2024-11-14 14:14:28 +00:00
committed by GitHub
parent a38c2a27b5
commit 1950910e67
2 changed files with 8 additions and 1 deletions
+2 -1
View File
@@ -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