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

Split Tracker Services & Regions #584

Merged
merged 29 commits into from
Nov 3, 2024
Merged

Conversation

MattEqualsCoder
Copy link
Collaborator

@MattEqualsCoder MattEqualsCoder commented Oct 7, 2024

Still a WIP. UI is pretty broken, and I need to do a ton of testing.

Basically, this implements the following:

  • Split tracker functionality into multiple services
  • Split dungeons into four interfaces IHasTreasure, IHasReward, IHasBoss, and IHasPrerequisite
  • Updated the database and lots of the code to reflect this
  • Rather than listen to larger events from the tracker, I'm updating it to listen to events on specific locations, bosses, etc.

Todos:

  • Fix UI (bosses not showing up properly, Hyrule Castle's key logic seems messed up)
  • Test, test, test
    • Make sure works with keysanity turned on
    • Make sure multiplayer still works
    • Make sure autotracking all types of things works (items, bosses, & rewards)
    • Make sure plandos still work
  • Convert old database entries to the new format
  • Try to see if I can get it so that the unit test matches up

@CPColin
Copy link
Collaborator

CPColin commented Oct 10, 2024

This all seems sensible so far!

Copy link
Member

@Vivelin Vivelin left a comment

Choose a reason for hiding this comment

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

Almost there!
image

So far, I'm a fan of moving more logic into the object classes themselves (Boss, Item, etc.).

I am more than a little confused now about the existence of ItemService and TrackerItemService, or WorldService and TrackerLocationService. Could these be consolidated somehow? Or at least a name that doesn't make it feel like we duplicated them?

_ => null
};

public bool IsKeysanityForArea
Copy link
Member

Choose a reason for hiding this comment

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

I feel like the "ForArea" in the name here just adds confusion. Wouldn't just "IsKeysanity" be enough?

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 TrackerItemService and TrackerLocationService are for tracking things, and the ItemService and WorldService are more for querying data from the world(s), so to speak.

I do think there's a bit of shuffling things around a bit, though. The ItemService also weirdly enough also has stuff to get Rewards and Bosses. We could move all of that stuff into the WorldService, and if we want to rename it to be like "WorldQueryService" or something, I think that would make sense. It's for looking up locations, items, rewards, and bosses in the world (or worlds if playing a multiworld).

That would leave the main important thing in the ItemService the creation and caching of the two progression states. So maybe that could be renamed "ProgressionService"?

@MattEqualsCoder MattEqualsCoder marked this pull request as ready for review October 26, 2024 12:47
@MattEqualsCoder MattEqualsCoder changed the title (Draft) Split Tracker Services & Regions Split Tracker Services & Regions Oct 26, 2024
@MattEqualsCoder MattEqualsCoder merged commit 331b769 into main Nov 3, 2024
2 checks passed
@MattEqualsCoder MattEqualsCoder deleted the ap-mode-model-updates branch November 3, 2024 22:45
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.

3 participants