Evolve
Evolve copied to clipboard
Fix partial fulfillment for >1 support structs
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