ekolis/stars-nova

decimal truncation glitch

Opened this issue · 0 comments

Describe the bug
I'm not sure how many places this happens but I know at least one.
queuecountC
It seems to be calculating total YearsToCompletion by adding up the YTC of each item. BUT items with <1 YTC get truncated to 0 YTC, thus when it adds them up it sees the total as 0 YTC. In this example the system has 61 resources, total needed is 75. Thus the actual YTC is 2.

What else does this? I'm not sure since I can't look at the code. But things I've seen where the math has behaved in unexpected ways:
Mining on planets seems to give less than it feels like it should I've seen planets just not produce anything even with 9 or more mines.
Population growth, well, there's a side request here, but it feels like pop growth isn't getting rounded properly.
Ships will decelerate due to running out of fuel one turn BEFORE they run out of fuel.