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

Core: Make output when hinting something with multiple copies show up in a better order #3245

Merged
merged 3 commits into from
May 4, 2024

Conversation

ScipioWright
Copy link
Collaborator

@ScipioWright ScipioWright commented May 2, 2024

What is this fixing or adding?

Currently, when you hint an item that has multiple copies in the world, where some have been found, some have been previously hinted and found, some previously hinted and not found, etc., it outputs in this order:

  1. The hints you have previously hinted.
  2. The "there may be more hintables" message (when applicable)
  3. It puts together a list of all of the found instances of the hinted item that were not explicitly hinted for before and appends a random not-found hint to the list.
  4. It sorts the list from step 3 by whether the finding player is the player who is using the hint, with the hinting player's items towards the bottom, then outputs that.

This order isn't great, and gets worse the more copies of an item there are (hinting mcguffins for example).

This PR changes it so that it is in this order:

  1. Found copies of the item.
  2. Unfound copies of the item that were previously hinted.
  3. The new copy of the item you just hinted for.
  4. The "there may be more hintables" message (when applicable).

How was this tested?

Hosted a game with a few slots, released two of them, hinted from one of the released slots to verify the order was as desired. I recommend others test it too, because there's a good chance that there are scenarios that I missed.

Note for anyone who wants to test it: The server must be hosted locally, since this change is to the server, not the text client.

If this makes graphical changes, please attach screenshots.

Before:
image

After:
image

@github-actions github-actions bot added affects: core Issues/PRs that touch core and may need additional validation. waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels May 2, 2024
@ScipioWright ScipioWright added the is: enhancement Issues requesting new features or pull requests implementing new features. label May 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.

GOATed change, code makes sense, worked in practice when I tried it

MultiServer.py Outdated Show resolved Hide resolved
Copy link
Member

@Exempt-Medic Exempt-Medic left a comment

Choose a reason for hiding this comment

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

Tested ordering displayed for all 27 states of having available hints.

@ScipioWright ScipioWright added waiting-on: author Issue/PR is waiting for feedback or changes from its author. and removed waiting-on: peer-review Issue/PR has not been reviewed by enough people yet. labels May 3, 2024
@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: author Issue/PR is waiting for feedback or changes from its author. labels May 3, 2024
@NewSoupVi NewSoupVi merged commit d5683c4 into ArchipelagoMW:main May 4, 2024
16 checks passed
@ScipioWright ScipioWright deleted the hint-ordering branch May 4, 2024 02:28
jnschurig pushed a commit to Tranquilite0/Archipelago-SoulBlazer that referenced this pull request Jun 13, 2024
… in a better order (ArchipelagoMW#3245)

* Make the hint info show up in a better order

* Change how old_hints is modified/done

---------

Co-authored-by: NewSoupVi <[email protected]>
qwint pushed a commit to qwint/Archipelago that referenced this pull request Jun 24, 2024
… in a better order (ArchipelagoMW#3245)

* Make the hint info show up in a better order

* Change how old_hints is modified/done

---------

Co-authored-by: NewSoupVi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: core Issues/PRs that touch core and may need additional validation. is: enhancement Issues requesting new features or pull requests implementing new features. waiting-on: core-review Issue/PR has been peer-reviewed and is ready to be merged or needs input from a core maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants