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

UpdateHint: create_if_not_exists (Allows clients to hint own items in other worlds) #4316

Closed
wants to merge 7 commits into from

Conversation

NewSoupVi
Copy link
Member

@NewSoupVi NewSoupVi commented Dec 1, 2024

Basically, this is supposed to "supercede" #3523, and the concept of LocationScouts with create_as_hint in general.

I'm not sure if this should be its own new command called CreateHint instead.
If it were its own command, we could let the client provide a list of locations like with LocationScouts.
However, we would also have to maintain some stuff in two places. In my estimation, anything that you specify when creating a hint is also something you'd want to be able to update.

Lmk what you think.

@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 Dec 1, 2024
@NewSoupVi NewSoupVi added the is: enhancement Issues requesting new features or pull requests implementing new features. label Dec 1, 2024
@NewSoupVi NewSoupVi changed the title UpdateHint: create_if_not_exists UpdateHint: create_if_not_exists (For hinting off-world items) Dec 1, 2024
@NewSoupVi NewSoupVi changed the title UpdateHint: create_if_not_exists (For hinting off-world items) UpdateHint: create_if_not_exists (For hinting own items in other worlds) Dec 1, 2024
@NewSoupVi NewSoupVi changed the title UpdateHint: create_if_not_exists (For hinting own items in other worlds) UpdateHint: create_if_not_exists (Allows clients to hint own items in other worlds) Dec 1, 2024
@NewSoupVi
Copy link
Member Author

NewSoupVi commented Dec 1, 2024

On #3523, and also just from many interactions with users and world devs who have in-game hints, I can confidently say that this is a highly requested feature. I'm hoping we can make it happen this time.

Copy link
Contributor

@EmilyV99 EmilyV99 left a comment

Choose a reason for hiding this comment

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

LGTM, read through all the code.

Copy link
Collaborator

@Jarno458 Jarno458 left a comment

Choose a reason for hiding this comment

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

I would really like the ability of creating hints in bulk (like an array of locations to create hints for)
this is often useful for opening shops and sending hints for everything the player knows at that point

Also this way of creating hints through updates does not allow to silently create hint or to not broadcast hints a 2nd time, like scout locations has

@NewSoupVi
Copy link
Member Author

NewSoupVi commented Dec 1, 2024

does not allow to silently create hint

LocationScouts does not allow this either. create_as_hint = 0 will just send back the location info and not create a hint at all.

or to not broadcast hints a 2nd time

That is how this PR works, though. This PR will only create & broadcast the hint if it doesn't already exist.
The functionality that is removed in this PR is to rebroadcast hints over and over.

The list thing is fair though. I might separate it out into its own command for that reason, more opinions welcome

[{
"cmd": "InvalidPacket",
"type": "arguments",
"text": 'UpdateHint: Desired hint does not already exist. '
Copy link
Collaborator

Choose a reason for hiding this comment

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

i would remove already from this scentence

[{
"cmd": "InvalidPacket",
"type": "arguments",
"text": 'UpdateHint: Must use "unspecified"/None status for items for other players.',
Copy link
Collaborator

Choose a reason for hiding this comment

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

for items for other players is a bit odd, as its items send by other players. not items for those other players

[{
"cmd": "InvalidPacket",
"type": "arguments",
"text": "UpdateHint: No Permission",
Copy link
Collaborator

Choose a reason for hiding this comment

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

No Permission Might be on purpose but this gives no information on why your getting this response, and if its as part of an implementation error by the client, then it might not help the dev to understand what went wrong

try:
status = HintStatus(status)
status = HintStatus(status_int)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would move the try/catch for status = HintStatus(status_int) above the hint = ctx.get_hint(client.team, location_player, location) as it breaks the flow that there is a check for if hint is None right below it

@NewSoupVi
Copy link
Member Author

Decided to go with a new command instead.

#4317

@NewSoupVi NewSoupVi closed this Dec 1, 2024
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: peer-review Issue/PR has not been reviewed by enough people yet.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants