MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / GetIndustryTypeData

Method GetIndustryTypeData

src/industry_cmd.cpp:2621–2629  ·  view source on GitHub ↗

* Set the #probability and #min_number fields for the industry type \a it for a running game. * @param it Industry type. * @return At least one of the fields has changed value. */

Source from the content-addressed store, hash-verified

2619 * @return At least one of the fields has changed value.
2620 */
2621bool IndustryTypeBuildData::GetIndustryTypeData(IndustryType it)
2622{
2623 uint8_t min_number;
2624 uint32_t probability = GetIndustryGamePlayProbability(it, &min_number);
2625 bool changed = min_number != this->min_number || probability != this->probability;
2626 this->min_number = min_number;
2627 this->probability = probability;
2628 return changed;
2629}
2630
2631/** Decide how many industries of each type are needed. */
2632void IndustryBuildData::SetupTargetCount()

Callers 1

SetupTargetCountMethod · 0.80

Calls 1

Tested by

no test coverage detected