gmiclotte / gear-optimizer

Gear optimizer for NGU Idle.
24 stars 19 forks source link

Select import type dynamically based on file type #92

Closed tomerpeleg-pub closed 2 years ago

tomerpeleg-pub commented 2 years ago

Right now the optimiser errors out silently if you try to load a json file as per past usage. This was a little confusing to me personally since I didn't notice the change in wording on the button and no error was shown. I'm not sure if the plan is to remove support for NGUSav.es completely eventually, but if not then for now it might be nicer to support both.

This PR re-enables loading save files using the NGUSav.es for anyone that might prefer it. The correct parser to use is selected based on the file type - specifically, if the type is JSON then the old NGUSav.es parser is used, otherwise the new raw parser is used.

gmiclotte commented 2 years ago

Oh my bad, I was told that NGUSav.es hadn't worked for a long time, but looking through Discord that seems to not entirely be the case.

Thanks a lot for the PR

gmiclotte commented 2 years ago

2022-04-26_14-23

Renamed the button and added a tooltip instead.

Thanks again!