Infinitay / essence-pouch-tracking

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

fix: Updated init. plugin & tracking state on start/reset, fix GOTR Varbit #34

Closed Infinitay closed 1 day ago

Infinitay commented 2 days ago

Summary

This PR aims to fix some of the issues listed in #32 where certain cases don't initialize the plugin properly primarily when enabling/installing the plugin while a player is already logged in.

Hopefully this covers all of the potential invalid stat problems due to first-starting the plugin when logged in.

Code changes

Infinitay commented 1 day ago

After 9d3842c made it so that all essence pouches are reset and initialized when resetting except only what was in your inventory. Previous, pouches were initialized when reset based on what pouch(es) were in your inventory.

The following are pictures of the behavior immediately after clicking the reset button

Before

image

After

image

This should be in parity with first-time installs because

startUp -> #loadTrackingState -> tracking state will be null for first time installs -> #updateTrackingState

resetConfiguration -> #resetTrackingState -> sets tracking state to null -> #updateTrackingState