(svn r21168) -Feature: Use desired industry counts rather than relative probability to decide which industry to build.

This commit is contained in:
alberth
2010-11-13 15:07:34 +00:00
parent e861487bcb
commit 3211ab301e
2 changed files with 44 additions and 12 deletions

View File

@@ -146,6 +146,7 @@ void ReleaseDisastersTargetingIndustry(IndustryID);
/** Data for managing the number of industries of a single industry type. */
struct IndustryTypeBuildData {
uint32 probability; ///< Relative probability of building this industry.
uint16 target_count; ///< Desired number of industries of this type.
void GetIndustryTypeData(IndustryType it);
};
@@ -156,6 +157,7 @@ struct IndustryTypeBuildData {
struct IndustryBuildData {
IndustryTypeBuildData builddata[NUM_INDUSTRYTYPES]; ///< Industry build data for every industry type.
void SetupTargetCount();
void TryBuildNewIndustry();
};