OpenTTD Source: src/subsidy_base.h File Reference

OpenTTD Source 15.0-RC2

Data Structures | Typedefs | Variables
subsidy_base.h File Reference

Subsidy base class. More...

`#include "cargo_type.h"`
`#include "company_type.h"`
`#include "source_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...

## Typedefs
using | SubsidyPool = Pool< Subsidy, SubsidyID, 1 >

## Variables
SubsidyPool | _subsidy_pool
static const uint | SUBSIDY_OFFER_MONTHS = 12
| Constants related to subsidies.
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)
static const uint | SUBSIDY_TOWN_CARGO_RADIUS = 6
| Extent of a tile area around town center when scanning for town cargo acceptance and production (6 ~= min catchment + min station / 2)

## Detailed Description

Subsidy base class.

Definition in file subsidy_base.h.

## Typedef Documentation

## ◆ SubsidyPool

using SubsidyPool = Pool<Subsidy, SubsidyID, 1>

Definition at line 19 of file subsidy_base.h.

## Variable Documentation

## ◆ SUBSIDY_CARGO_MIN_POPULATION

const uint SUBSIDY_CARGO_MIN_POPULATION = 900
| static

Min. population of destination town for cargo route.

Definition at line 56 of file subsidy_base.h.

Referenced by FindSubsidyTownCargoRoute().

## ◆ SUBSIDY_MAX_DISTANCE

const uint SUBSIDY_MAX_DISTANCE = 70
| static

Max. length of subsidised route (DistanceManhattan)

Definition at line 58 of file subsidy_base.h.

Referenced by CheckSubsidyDistance(), and FindSubsidyPassengerRoute().

## ◆ SUBSIDY_MAX_PCT_TRANSPORTED

const uint SUBSIDY_MAX_PCT_TRANSPORTED = 42
| static

Subsidy will be created only for towns/industries with less % transported.

Definition at line 57 of file subsidy_base.h.

Referenced by FindSubsidyIndustryCargoRoute(), FindSubsidyPassengerRoute(), and FindSubsidyTownCargoRoute().

## ◆ SUBSIDY_OFFER_MONTHS

const uint SUBSIDY_OFFER_MONTHS = 12
| static

Constants related to subsidies.

Duration of subsidy offer

Definition at line 54 of file subsidy_base.h.

Referenced by CreateSubsidy().

## ◆ SUBSIDY_PAX_MIN_POPULATION

const uint SUBSIDY_PAX_MIN_POPULATION = 400
| static

Min. population of towns for subsidised pax route.

Definition at line 55 of file subsidy_base.h.

Referenced by FindSubsidyPassengerRoute().

## ◆ SUBSIDY_TOWN_CARGO_RADIUS

const uint SUBSIDY_TOWN_CARGO_RADIUS = 6
| static

Extent of a tile area around town center when scanning for town cargo acceptance and production (6 ~= min catchment + min station / 2)

Definition at line 59 of file subsidy_base.h.

Referenced by FindSubsidyCargoDestination(), and FindSubsidyTownCargoRoute().