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

TUNIC: Error catching for logic bugs in ER #3082

Merged
merged 4 commits into from
Apr 13, 2024

Conversation

ScipioWright
Copy link
Collaborator

What is this fixing or adding?

Currently, if there was an error encountered where a location is unreachable in entrance rando, it would raise an exception that isn't the most clear to a host.
Now, it'll log a warning and make the entrance hint "Inaccessible". This is so that gen can continue, since I wouldn't want something like this that doesn't always lead to a game that can't be beaten to stop games from happening.

There aren't any currently known bugs in the entrance rando logic, this is mostly a just in case.

How was this tested?

Test gens.
Easy way to test is to go to the line in er_scripts that is while len(connected_regions) < len(non_dead_end_regions): and change it to while len(connected_regions) < len(non_dead_end_regions) - 10:, with the entrance rando option enabled in the yaml. It might take a few tries for it to actually proc.

If this makes graphical changes, please attach screenshots.

N/A

@ScipioWright ScipioWright added the is: refactor/cleanup Improvements to code/output readability or organizization. label Apr 2, 2024
@github-actions github-actions bot added the waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. label Apr 2, 2024
Copy link
Member

@NewSoupVi NewSoupVi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems completely risk-free (In fact, it's almost negative-risk)

warning(f"{location.name} is not logically accessible for "
f"{self.multiworld.get_file_safe_player_name(self.player)}. "
"Creating entrance hint Inaccessible. "
"Please report this to the Tunic rando devs.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not nearly funny enough, needs to have at least 3 layers of self-deprecation or flirty vibes /j

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So true

@ScipioWright ScipioWright added waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels Apr 3, 2024
@Berserker66 Berserker66 added waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world. and removed waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer. labels Apr 11, 2024
@ScipioWright
Copy link
Collaborator Author

For worlds with multiple maintainers, are we meant to get approvals from all of the maintainers? I'm the main one doing all of the entrance rando stuff, so this doesn't really have anything to do with Silent

@Berserker66 Berserker66 merged commit fbeba1e into ArchipelagoMW:main Apr 13, 2024
15 checks passed
@ScipioWright ScipioWright deleted the tunc-hint-error-catching branch April 14, 2024 16:32
EmilyV99 pushed a commit to EmilyV99/Archipelago that referenced this pull request Apr 15, 2024
EmilyV99 pushed a commit to EmilyV99/Archipelago that referenced this pull request Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is: refactor/cleanup Improvements to code/output readability or organizization. waiting-on: world-maintainer Issue/PR is waiting for feedback or approval by the maintainer of a world.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants