OpenTTD Source 20241224-master-gee860a5c8e
|
Data for managing the number of industries of a single industry type. More...
#include <industry.h>
Public Member Functions | |
void | Reset () |
Reset the entry. | |
bool | GetIndustryTypeData (IndustryType it) |
Set the probability and min_number fields for the industry type it for a running game. | |
Data Fields | |
uint32_t | probability |
Relative probability of building this industry. | |
uint8_t | min_number |
Smallest number of industries that should exist (either 0 or 1 ). | |
uint16_t | target_count |
Desired number of industries of this type. | |
uint16_t | max_wait |
Starting number of turns to wait (copied to wait_count). | |
uint16_t | wait_count |
Number of turns to wait before trying to build again. | |
Data for managing the number of industries of a single industry type.
Definition at line 278 of file industry.h.
bool IndustryTypeBuildData::GetIndustryTypeData | ( | IndustryType | it | ) |
Set the probability and min_number fields for the industry type it for a running game.
it | Industry type. |
Definition at line 2543 of file industry_cmd.cpp.
References GetIndustryGamePlayProbability(), min_number, and probability.
Referenced by IndustryBuildData::SetupTargetCount().
void IndustryTypeBuildData::Reset | ( | ) |
Reset the entry.
Definition at line 2408 of file industry_cmd.cpp.
References max_wait, min_number, probability, target_count, and wait_count.
Referenced by ITBLChunkHandler::Load(), and IndustryBuildData::Reset().
uint16_t IndustryTypeBuildData::max_wait |
Starting number of turns to wait (copied to wait_count).
Definition at line 282 of file industry.h.
Referenced by Reset(), and IndustryBuildData::TryBuildNewIndustry().
uint8_t IndustryTypeBuildData::min_number |
Smallest number of industries that should exist (either 0
or 1
).
Definition at line 280 of file industry.h.
Referenced by GetIndustryTypeData(), Reset(), and IndustryBuildData::SetupTargetCount().
uint32_t IndustryTypeBuildData::probability |
Relative probability of building this industry.
Definition at line 279 of file industry.h.
Referenced by GetIndustryTypeData(), Reset(), and IndustryBuildData::SetupTargetCount().
uint16_t IndustryTypeBuildData::target_count |
Desired number of industries of this type.
Definition at line 281 of file industry.h.
Referenced by Reset(), IndustryBuildData::SetupTargetCount(), and IndustryBuildData::TryBuildNewIndustry().
uint16_t IndustryTypeBuildData::wait_count |
Number of turns to wait before trying to build again.
Definition at line 283 of file industry.h.
Referenced by Reset(), and IndustryBuildData::TryBuildNewIndustry().