Ephenia / Pokeclicker-Scripts

Various scripts & enhancements for the game Pokéclicker.
https://github.com/Ephenia/Pokeclicker-Scripts
GNU General Public License v3.0
184 stars 263 forks source link

Update autoHatchery to include Mega, sort by hatchery selection #311

Closed vityav closed 1 year ago

vityav commented 1 year ago

Now includes the hatchery dropdown that filters on mega evolution status, and sorts based on the hatchery sorting dropdown instead of the main screen party sort.

morsok commented 1 year ago

Been testing this for a few days, works really well for me. Did not see bugs or edge cases yet.

vityav commented 1 year ago

I found two problems with it: one being that the getHatcherySortedList() returns an empty array until the first time you open the hatchery window, the other being that the sorted list is pre-computed on opening and doesn't update if things change (particularly noticeable if you're trying to hatch by something like "Times Hatched"). I pushed a change to the branch to update the sorted hatchery list in the background once a second and use that directly. I haven't noticed any latency overhead from doing this on my phone or computer, but I don't know if there was another reason the devs used a pre-computed list for the function.

Ephenia commented 1 year ago

This PR is approved, but will now be undergoing a grace period to have any further issues be fixed that need to be before it gets merged.

Ephenia commented 1 year ago

This will now be merged and put through.