Evolve icon indicating copy to clipboard operation
Evolve copied to clipboard

Fix partial fulfillment for >1 support structs

Open yarukishi opened this issue 10 months ago • 0 comments

The code for distributing insufficient support to non-homeworld buildings does not correctly factor in cases where supportSize is different from 1. This causes situations where, for example, more than the total sum of support may be spent on Colonies on Tau Ceti, which results in negative support for the next building in the array, High-Tech Factories.

Keeping the same code structure where (used_support + operating) is fixed to (used_support + operating * supportSize) could still result in fractional building support, so I added a call to Math.floor() instead.

Tested with the following save file. negative support.txt

yarukishi avatar Apr 28 '24 06:04 yarukishi