Infinitay / essence-pouch-tracking

BSD 2-Clause "Simplified" License
0 stars 0 forks source link

fix: Prevent updating pouch state if there are unknown stored/decay states #37

Closed Infinitay closed 8 hours ago

Infinitay commented 1 day ago

EssencePouch

EssencePouchTrackingPlugin

Infinitay commented 1 day ago

Avoiding merging this until I test it with a few actual runecrafting runs. I tested this at a bank briefly and it seemed to function as intended but I'm lacking sleep right now, and I don't want to push a broken fix.

Infinitay commented 14 hours ago

Changes for e11b730 and 981f7b0

EssencePouch

EssencePouchTrackingPlugin

Infinitay commented 12 hours ago

Reset the plugin and started a game of GOTR everything was working fine until a pouch degraded. Missed checking for degraded pouches for #36. Other than that, everything was okay.

I started the game resetting the plugin.

The only issue was when a pouch degraded and that is due to pouches map changes from the previous PR. Test this PR again after fixing the degraded pouches map.

Infinitay commented 8 hours ago

077ae63

EssencePouchTrackingPlugin

Infinitay commented 8 hours ago

I realized that when checking a pouch with an unknownStored flag, it would reset the state back. This was because it was loading the save state, but it was never updated after setting the pouches after the check. Fixed with a0a129e

TODO Also, I am debating whether or not to change it such that we only load the tracking state once on GameState.LOGGED_IN. This is because there are different times that state fires:

  1. When first logging into the game
  2. Sometimes when you go into new parts of the map
  3. When you world hop

It might be best to just load the tracking state when the player first logs into the game. Perhaps something to consider in the future if I ever refactor.