OpenTTD
Data Structures | Macros | Typedefs | Variables
subsidy_base.h File Reference

Subsidy base class. More...

#include "cargo_type.h"
#include "company_type.h"
#include "subsidy_type.h"
#include "core/pool_type.hpp"

Go to the source code of this file.

Data Structures

struct  Subsidy
 Struct about subsidies, offered and awarded. More...
 

Macros

#define FOR_ALL_SUBSIDIES_FROM(var, start)   FOR_ALL_ITEMS_FROM(Subsidy, subsidy_index, var, start)
 
#define FOR_ALL_SUBSIDIES(var)   FOR_ALL_SUBSIDIES_FROM(var, 0)
 

Typedefs

typedef Pool< Subsidy, SubsidyID, 1, 256 > SubsidyPool
 

Variables

SubsidyPool _subsidy_pool
 Pool for the subsidies.
 
static const uint SUBSIDY_OFFER_MONTHS = 12
 Constants related to subsidies. More...
 
static const uint SUBSIDY_CONTRACT_MONTHS = 12
 Duration of subsidy after awarding.
 
static const uint SUBSIDY_PAX_MIN_POPULATION = 400
 Min. population of towns for subsidised pax route.
 
static const uint SUBSIDY_CARGO_MIN_POPULATION = 900
 Min. population of destination town for cargo route.
 
static const uint SUBSIDY_MAX_PCT_TRANSPORTED = 42
 Subsidy will be created only for towns/industries with less % transported.
 
static const uint SUBSIDY_MAX_DISTANCE = 70
 Max. length of subsidised route (DistanceManhattan)
 

Detailed Description

Subsidy base class.

Definition in file subsidy_base.h.

Variable Documentation

◆ SUBSIDY_OFFER_MONTHS

const uint SUBSIDY_OFFER_MONTHS = 12
static

Constants related to subsidies.

Duration of subsidy offer

Definition at line 56 of file subsidy_base.h.

Referenced by CreateSubsidy().