Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Roamer mode to use new navigation functions #318

Merged
merged 1 commit into from
May 8, 2024

Conversation

hanzi
Copy link
Collaborator

@hanzi hanzi commented May 7, 2024

Description

This removes calls to the deprecated same-map navigation function in favour of the new cross-map one.

Doing that simplifies the code a little bit, and hopefully also fixes #316 (at least I wasn't able to reproduce the behaviour anymore.)

As a semi-related fix, this resolves an issue where reapplying Repel would lead to the player continue running in the same direction until they hit an obstacle.

Changes

  • modules/map_path.py - Fix a bug where the bot would crash if map object data wasn't fully loaded yet by the game.
  • modules/modes/util/items.py - Fix the bug where the player would stuck running in one direction after re-applying Repel.
  • modules/modes/roamer_reset.py - Migrated navigation functions.

Checklist

  • Black Linter has been ran, using --line-length 120 argument
  • Wiki has been updated (if relevant)

This removes calls to the deprecated same-map navigation function in favour of the new cross-map one.

Doing that simplifies the code a little bit, and hopefully also fixes 40Cakes#316 (at least I wasn't able to reproduce the behaviour anymore.)

As a semi-related fix, this resolves an issue where reapplying Repel would lead to the player continue running in the same direction until they hit an obstacle.
@hanzi hanzi merged commit 3072458 into 40Cakes:main May 8, 2024
1 check passed
@hanzi hanzi deleted the roamer-fix branch May 8, 2024 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Roamers FRLG throwing errors seems at random at the start of the loop
2 participants