Track traversed entrances in data storage#24
Conversation
|
I think I'm missing what this is supposed to do because can you not just broadcast the portal the player is entering as they go through it from the HQ? UT should already know where it's going since that's in slot data. |
|
It's not just about the portals, it's mostly about all the transitions between the maps. For the portals specifically, it does indeed track only the portals that were entered as UT knows the destination. |
|
Also, just to keep track of things, there appears to be a bug in the PR where the datastorage is wiped when going back to the menu and reloading a save. I have not really investigated that yet. |
9ffe542 to
f8da763
Compare
| foreach (var portal in startingPortals) | ||
| { | ||
| Console.WriteLine(portal); | ||
| Console.WriteLine($"Starting portal: {portal}"); |
There was a problem hiding this comment.
Can we instead have this write
Starting portals:
Searing Crags
Howling Grotto
etc
If this is still happening, you should be able to make it safe by calling initialize on the datastore object on initial connect https://archipelagomw.github.io/Archipelago.MultiClient.Net/docs/helpers/datastore.html |
|
Yeah I eventually figured out what was the issue. It's just missing a small refactoring to more everything tracker related in a single class and then this is ready to go |
What is this adding
This adds tracking of the traversed entrances in the AP data storage. The goal is to use the deferred entrances support in Universal Tracker to not spoil the ER roll when opening the map tracker.
I have a working version of the apworld, but it is mixed up with some slight logic improvements that I need to clean up so it is compatible with what's released. It also depends on ArchipelagoMW/Archipelago#6030, so it is not like it needs to be ready right away. It's here if you want to see https://github.com/Jouramie/Archipelago/tree/Messenger/ut-transition-tracker-support
I am currently testing this in an async. I'll mark it as ready when I'm convinced everything works perfectly!
Implementation comments
I am not really satisfied of how the
ItemsAndLocationsHandlerask theArchipelagoClientto sync the state in theRandoLevelManager.cs. This really has a spaghetti smell to have a handler asking the client to talk to the manager... But, I think those are the places where it was the easiest to integrate, given the current state of code base. I am open to suggestion if there is a better way to do.Testing
Overworld
Both side of the connection are noted once visited
Portal unlocks are also tracked