ZeroGwafa / ArchMatCounter

9 stars 10 forks source link

double counting materials #23

Closed lunaras13 closed 1 month ago

lunaras13 commented 2 months ago

currently it checks the chat box every time there is a screen load and double counts those materials. for example if you just farmed 30 of something and want to teleport away, 5 of them are still in chat box so upon completion of the teleport it adds 5 to the total collected again.

perhaps some code to keep track of the last 10 collections including their time stamp and not allow it to count it a second time would work

currently the only fix is stopping the thing every time ur inventory gets full but that's the kind of hassle that defeats the purpose of using the app

ZeroGwafa commented 1 month ago

I may have a fix for this. Did some refactoring (code needs a TON more love. Silly past self).

Testing it for a few hours, if everything looks good, i'll push the change.

Question: Is there any trigger that grants multiple materials on the same tick?

ExInferi commented 1 month ago

Question: Is there any trigger that grants multiple materials on the same tick?

image These ones came to mind to me:

All of these can theoretically even stack together.

I've been using sessionStorage for preventing duplicates these days. You can check out WildyRewards - a fork of a fork of a fork of SerenTracker, to see it in action.

ZeroGwafa commented 1 month ago

Ok, did a bit of refactoring here

NOTE You will want to have at least 5 timestamps visible for the rare-but-can-happen of Fortune/Brush/Screener/Porters to be tracked properly. Otherwise, there is a chance a material will be missed.