* Get scaled industry generation probabilities. * @param water Whether to get land or water industry probabilities. * @returns Probability information. */
| 2469 | * @returns Probability information. |
| 2470 | */ |
| 2471 | static IndustryGenerationProbabilities GetScaledProbabilities(bool water) |
| 2472 | { |
| 2473 | IndustryGenerationProbabilities p{}; |
| 2474 | |
| 2475 | for (IndustryType it = 0; it < NUM_INDUSTRYTYPES; it++) { |
| 2476 | p.probs[it] = GetScaledIndustryGenerationProbability(it, water, &p.force_one[it]); |
| 2477 | p.total += p.probs[it]; |
| 2478 | if (p.force_one[it]) p.num_forced++; |
| 2479 | } |
| 2480 | |
| 2481 | return p; |
| 2482 | } |
| 2483 | |
| 2484 | /** |
| 2485 | * This function will create random industries during game creation. |
no test coverage detected