OpenTTD Source
20241108-master-g80f628063a
|
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... | |
Typedefs | |
typedef Pool< Subsidy, SubsidyID, 1, 256 > | SubsidyPool |
Enumerations | |
enum class | SubsidyDecodeParamType { NewsOffered = 0 , NewsAwarded = 1 , NewsWithdrawn = 2 , Gui = 3 } |
Types of subsidy news messages, which determine how the date is printed and whether to use singular or plural cargo names. More... | |
Variables | |
SubsidyPool | _subsidy_pool |
static const uint | SUBSIDY_OFFER_MONTHS = 12 |
Constants related to subsidies. More... | |
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 catchmement + min station / 2) | |
Subsidy base class.
Definition in file subsidy_base.h.
|
strong |
Types of subsidy news messages, which determine how the date is printed and whether to use singular or plural cargo names.
Enumerator | |
---|---|
NewsOffered | News item for an offered subsidy. |
NewsAwarded | News item for an awarded subsidy. |
NewsWithdrawn | News item for a subsidy offer withdrawn, or expired subsidy. |
Gui | Subsidies listed in the Subsidy GUI. |
Definition at line 62 of file subsidy_base.h.
|
static |
Constants related to subsidies.
Duration of subsidy offer
Definition at line 54 of file subsidy_base.h.
Referenced by CreateSubsidy().