Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
Fix: Correct display of industry requires/produces in Build Industry window #6990
During development of the patch for 16 cargoes in/out I forgot to look at the Build Industry window and didn't notice it fails showing the required/produced cargoes correctly for 4+ in/3+ out.
This is an attempt at fixing this. It's not very idiomatic, in that it uses partial strings and concatenates in code. The alternative would be to have 16 strings for "Requires: list of cargoes" and 16 stings for "Produces: list of cargoes", one for each number possible.
I attempt to support correct pluralization of the Requires/Produces at the beginning, but it has the unfortunate side effect of the number of items also being printed. A solution is needed for this.
Another case that probably needs attention is that the minimum window size is measured to fit the longest cargo list line, in other words, neither of the Requires nor Produces lines can ever break. An industry with many ins/outs could make the entire window unreasonably large. It might be an idea to impose a max for the minimum window size, such that sufficiently long lines can be broken.