Infinitay / essence-pouch-tracker

A RuneLite plugin that tracks both the amount of essence stored in your essence pouches and the amount of essence until decay.
https://runelite.net/plugin-hub/show/essence-pouch-tracking
BSD 2-Clause "Simplified" License
0 stars 1 forks source link

Incorrect state when RCing fast #13

Closed Infinitay closed 1 month ago

Infinitay commented 1 month ago

It seems like the bug came back because when I was in GOTR RCing fast, two pouches would track properly, but then the other two ended up being wrong

Infinitay commented 1 month ago
Infinitay commented 1 month ago

image

I suppose this is partially why Adam used ticks with his similar PouchActions class; however, his plugin had tick issues too - even inside the bank when filling pouches. It was even worse when emptying and crafting. I just tried it yet again to confirm once more, and all 4 pouches were inaccurate versus just my last two (medium and large) which was repeated in the image above.

I'm thinking of a few courses of action

  1. Start manually tracking when crafting since currently that's where the problem lies
  2. Experiment with sending ticks on actions and see if we need to be blocking/clearing and queues and other variables based on the first action in the queue and it's tick time
    • However, what if it's only that one action with the outdated tick? We'd be clearing the whole queue which is not right
    • Could cause issues with current implementation because if it allows onItemContainerChanged to run while we are still manipulating with the queue, there could be issues. Will have to experiment to confirm non-breaking
    • Could use a PriorityQueue with tick being the prio, but they shouldn't be out of order anyways

I'll begin working on manually tracking since it seems viable currently and go in hand with the rest of the spaghetti I've created

Infinitay commented 1 month ago

I pushed a PR #16 that greatly mitigates if not resolves this issue. I'll be testing it more tomorrow and hopefully accepting the PR and merging it onto master.

Infinitay commented 1 month ago

This has been resolved by #13 from my testing for a few hours at GOTR and < an hour normal RCing