#[0.0.7] Research progress shows 99%

6 messages · Page 1 of 1 (latest)

graceful gulch
#

I remember fixing the issue of 0% research progress when researching an item afterwards. Well, now the research is all done, but the research progress is 99%.

#

For reference, in my other early archive (i.e., before the 0% fix), the progress was 100%

#

Only for reference, the way I think the arithmetic should work is this:

float progress;
if (researched == all) {
progress = 1f;
} else {
progress = researched * 1.0f / all;
if (progress < 0.01f && researched > 0) {
progress = 0.01f;
}
}
string s = (int)(progress * 100) + "%";
or:
----have bug----
float progress = researched * 1.0f / all;
string s = (int)Math.Ceiling(progress * 100) + "%";
----have bug----
And, I'd suggest recalculating the progress every time the archive is loaded, rather than only when the research is complete.

#

Or, why not consider having the research show one decimal place?

float progress = researched * 1.0f / all;
string s = progress.ToString("0.#%");

dreamy cedarBOT
#

🚑 Your bug report has been verified and is now in the triage phase. We're working to reproduce and fix it.