OpenTTD
Public Member Functions | Data Fields
IndustryTypeBuildData Struct Reference

Data for managing the number of industries of a single industry type. More...

#include <industry.h>

Public Member Functions

void Reset ()
 Reset the entry. More...
 
bool GetIndustryTypeData (IndustryType it)
 Set the probability and min_number fields for the industry type it for a running game. More...
 

Data Fields

uint32 probability
 Relative probability of building this industry.
 
byte min_number
 Smallest number of industries that should exist (either 0 or 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.
 

Detailed Description

Data for managing the number of industries of a single industry type.

Definition at line 155 of file industry.h.

Member Function Documentation

◆ GetIndustryTypeData()

bool IndustryTypeBuildData::GetIndustryTypeData ( IndustryType  it)

Set the probability and min_number fields for the industry type it for a running game.

Parameters
itIndustry type.
Returns
At least one of the fields has changed value.

Definition at line 2207 of file industry_cmd.cpp.

References GetIndustryGamePlayProbability().

◆ Reset()

void IndustryTypeBuildData::Reset ( )

Reset the entry.

Definition at line 2079 of file industry_cmd.cpp.

Referenced by Load_ITBL().


The documentation for this struct was generated from the following files: