-
Notifications
You must be signed in to change notification settings - Fork 816
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
MultiServer: Fix LocationScouts with "only_new" broadcasting hints for found locations over and over #4482
base: main
Are you sure you want to change the base?
MultiServer: Fix LocationScouts with "only_new" broadcasting hints for found locations over and over #4482
Conversation
The only thing that's awkward here is that |
conceptually i like it but will need to have more extensive testing than the original pr that ended up accidentally breaking things |
Let's specify what that means Since this adds an That much I am confident in. I won't prime reviewers about anything else. |
Btw, I would specifically also like some opinions about making this a new input param for the notify_hints function called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did a mix of create_as_hint 0, 1, 2, and !hint in a text client
for unchecked locations:
0 never sent a message but always returned the relevant info
1 always sent a message as expected
2 sent a message if the hint wasn't already printed jsoned (by !hint or by create as hint 1 or a previous create as hint 2)
for checked locations:
0 never sent a message
1 always sent a message as expected
2 sent a message if the hint wasn't already printed jsoned by create as hint 2 but when used after create as hint 1 or !hint create as hint 2 would still send a message
!hint everything seemed to re-send all hints (found or not) to other players (the relevant ones)
I think the create as hint 2 not respecting hints on found locations from other sources is a bit weird, but at least it stops duplicating at some point
but wasn't 'not sending found hints requested by the user to other users` part of the thing we wanted to fix?
In the case of However, I'm not so sure about create_as_hint = 1 followed by create_as_hint = 2. I wonder if this PR shouldn't reuse |
Ok, gonna update the PR, I think I will just make this a new attribute. |
…om/NewSoupVi/Archipelago into scouts_work_differently_from_hints
Ok, I think I like this solution because it gives the client devs the maximum amount of options for different use cases Devs of games with "shop"-like scouts, where a finished multi should have a complete catalogue of all scouted shop items, can just send We could even add a new flag to this called "broadcast_even_if_found", then we'd have all 4 behaviors: create_as_hint=1 + broadcast_even_if_found=False: Rebroadcast only unfound scouts over and over. But I might add that to CreateHints instead tbh, after we (hopefully) merge this PR. |
you're telling me i gotta do all that testing again? :p |
Yes :) |
This PR makes it so hints created with LocationScouts create_as_hint = 2 always persist, so that they do not get rebroadcasted if the packet gets sent again.
History:
In #4214, we changed the behavior of LocationScouts with create_as_hint=2 to fix an issue where already found locations would still broadcast every time they were scouted.
However, this had the unintended consequence of making
!hint Power Star
not just broadcast every previously found Power Star, but also make all of those hints persist.As a result, we reverted the change in #4367.
However, this brings back the old problem as well. There were two proposed solutions to the issue, I have chosen to go with this one. For the record, the other one is "don't broadcast nor create hints for already found locations, even in the case of LocationScouts"