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

Add Quest Bookmarking #127

Merged
merged 9 commits into from
May 26, 2024
Merged

Add Quest Bookmarking #127

merged 9 commits into from
May 26, 2024

Conversation

Caedis
Copy link
Member

@Caedis Caedis commented Jan 4, 2024

@Caedis Caedis marked this pull request as draft January 4, 2024 23:18
Copy link

@Glease Glease left a comment

Choose a reason for hiding this comment

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

  1. save load is a bit awkward. most of write logic is in QuestInstance but most of read logic is in QuestDatabase. perhaps just move them all to QuestDatabase?
  2. as mentioned on discord. this should probably be called favorite bookmark rather than pin.
  3. GUI code is always if it works then ship it. we don't check code quality in this area.

src/main/java/betterquesting/questing/QuestInstance.java Outdated Show resolved Hide resolved
@Caedis
Copy link
Member Author

Caedis commented Jan 5, 2024

Now the question is, what icon to make to use on the quest instead of the pins

image

@Caedis
Copy link
Member Author

Caedis commented Jan 5, 2024

Took over the bookmark icon and change the quest line icon to a better match
image

@Caedis Caedis changed the title Add Quest Pinning Add Quest Bookmarking Jan 5, 2024
@Caedis
Copy link
Member Author

Caedis commented Jan 7, 2024

Hmm, losing bookmarks on a server

@Caedis
Copy link
Member Author

Caedis commented Mar 10, 2024

Current issues:

  • Bookmarks are not saving when on a server. This is because the quests are handled on the server.

@Lyfts
Copy link
Member

Lyfts commented May 20, 2024

Bookmarks are now handled by the client and are unique for each world/server.

@Lyfts Lyfts marked this pull request as ready for review May 20, 2024 14:32
@Lyfts Lyfts requested a review from a team May 20, 2024 14:32
@Caedis
Copy link
Member Author

Caedis commented May 20, 2024

Looks good, i'll take a look at it in game later today

Copy link
Member Author

@Caedis Caedis left a comment

Choose a reason for hiding this comment

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

The order the quests are bookmarked should be kept.

In the screenshot, the IV circuit was the last one I bookmarked.

image

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Also if a server and a sp world have the same name, the bookmark files will be shared i believe

@Lyfts
Copy link
Member

Lyfts commented May 21, 2024

The world name is only used for local worlds for servers their ip+port will be used as file name.

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Cool, didnt even realize that colon were valid in file names

@eigenraven
Copy link
Member

Colons are not valid in filenames on Windows: https://learn.microsoft.com/en-us/windows/win32/fileio/naming-a-file#naming-conventions

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Thats what i thought. Worked fine for me on linux

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

maybe change it to ip-port

@Lyfts
Copy link
Member

Lyfts commented May 21, 2024

I'm already replacing the colon with a dot

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Oh, didnt notice that. That works then

@Lyfts
Copy link
Member

Lyfts commented May 21, 2024

Alright bookmarks will now keep their order and I also implemented a simple method to skip iterating over the entire quest list if no bookmarks have changed.

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Perfect, thanks!
image

...i can't approve it since its my pr lol

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

hmmm

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Something is not updating when I change SP worlds
Currently in a sp world with this bookmarked
image

but, the list is showing the bookmarks from the other world
image

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

I had 2 bookmarks that were shared between the 2 worlds

@Lyfts
Copy link
Member

Lyfts commented May 21, 2024

Oh my bad I forgot to reset the flag when loading bookmarks

@Lyfts
Copy link
Member

Lyfts commented May 21, 2024

It seems to load correctly now, good catch.

@Caedis
Copy link
Member Author

Caedis commented May 21, 2024

Perfect

@Dream-Master Dream-Master enabled auto-merge (squash) May 26, 2024 22:00
Copy link
Member

@Dream-Master Dream-Master left a comment

Choose a reason for hiding this comment

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

tested works

@Dream-Master Dream-Master merged commit 0cd606f into master May 26, 2024
1 check passed
@Dream-Master Dream-Master deleted the feature/pins branch May 26, 2024 22:00
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.

5 participants