Travel to: fix travel to on ramps #74762
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Bugfixes "Travel to no longer cancels on moving up/down on a ramp"
Purpose of change
Travel to doesn't work with ramps:
Cataclysm_.Dark.Days.Ahead.-.0.G-10289-g31fb5cbf61-dirty.2024-06-24.19-21-45.mp4
Commanding the character to
Travel to
.Note the bottom right: The moment you step down it cancels.
Describe the solution
get_movement_action_from_delta
(called only inget_next_auto_move_direction
):ACTION_NULL
instead ofACTION_MOVE_FORTH_LEFT
.get_next_auto_move_direction
:route
, so if the character wants to move, but fails, it now takes two cycles instead of one to detect this. However, it still terminates.Describe alternatives you've considered
Change the path generation to know about ramps and produce the path accordingly. I prefer this as this is simple and also fixes ramp movement in my upcoming PR:
Testing
Travel to
across ramp now works:Cataclysm_.Dark.Days.Ahead.-.0.G-10289-g9fcb743a1e-dirty.2024-06-24.19-10-11.mp4
Indeed, the character can walk on the wrong floor, if they automove onto a ramp they didn't expect:
Before (better)
Cataclysm_.Dark.Days.Ahead.-.0.G-10289-g31fb5cbf61-dirty.2024-06-24.19-26-26.mp4
After (worse)
Cataclysm_.Dark.Days.Ahead.-.0.G-10289-g31fb5cbf61-dirty.2024-06-24.19-35-53.mp4
However, I believe this PR is a net benefit.
Overmap
travel to
still says "You cannot reach the destination" when on such a bridge, but that is likely a different problem.Additional context
Originally found here: #74644 (comment)