summaryrefslogtreecommitdiff
path: root/src/industry.h
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2010-11-13 15:13:14 +0000
committeralberth <alberth@openttd.org>2010-11-13 15:13:14 +0000
commit4d419b9f3e058be20f62e494829e8ae1b167e82b (patch)
tree7d941886dab023347474b25e71d88e9e98904e5e /src/industry.h
parent67549a206c438dee83f7a5c3cca86cef316edad6 (diff)
downloadopenttd-4d419b9f3e058be20f62e494829e8ae1b167e82b.tar.xz
(svn r21170) -Codechange: Store industry management data in the save game (some of it is used in the very near future).
Diffstat (limited to 'src/industry.h')
-rw-r--r--src/industry.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/industry.h b/src/industry.h
index 9ff0e5403..c65c65b48 100644
--- a/src/industry.h
+++ b/src/industry.h
@@ -146,7 +146,10 @@ 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.
+ byte min_number; ///< Smallest number of industries that should exist (either \c 0 or \c 1).
uint16 target_count; ///< Desired number of industries of this type.
+ uint16 max_wait; ///< Starting number of turns to wait (copied to #wait_count).
+ uint16 wait_count; ///< Number of turns to wait before trying to build again.
void GetIndustryTypeData(IndustryType it);
};
@@ -156,6 +159,7 @@ struct IndustryTypeBuildData {
*/
struct IndustryBuildData {
IndustryTypeBuildData builddata[NUM_INDUSTRYTYPES]; ///< Industry build data for every industry type.
+ uint32 wanted_inds; ///< Number of wanted industries (bits 31-16), and a fraction (bits 15-0).
void SetupTargetCount();
void TryBuildNewIndustry();