shpaass / yafc-ce

Powerful Factorio calculator/analyser that works with mods
GNU General Public License v3.0
54 stars 20 forks source link

Add an auto balance button to the new Summary page. #234

Closed DaleStan closed 1 month ago

DaleStan commented 1 month ago

This closes #175. I was unable to eliminate the issues where I had to click "Auto balance" multiple times, but I suspect it's related to #169. Hopefully this change will make it easier to reproduce, and thus fix, that bug.

There are attempts to detect negative feedback conditions, and they sometimes work, but the usual exit condition is the if (updateOrder.Count == 0) "no more updates available" test, even when more updates will become available once the pages finish recalculating.

shpaass commented 1 month ago

@veger Pinging just in case you want to take a look at it later.

veger commented 1 month ago

Nice cleanup of my messy C# code! There are much C# details I can learn about. :smile:

I see 2 references to #169 in the code. This issue got closed, so either something else is causing the glitches (now) or the task is closed prematurely. @DaleStan did you encounter them (as well) without these TODO/HACKs?

DaleStan commented 1 month ago

@veger You'll probably get these emails at the same time, but I am still seeing #169, both with and without the HACK.

The TODO is just that the the negative-feedback detection should be revisited after fixing #169, to make sure it's still working and not too aggressive.