OpenTTD Source
12.0-beta2
|
Go to the documentation of this file.
10 #ifndef SUBSIDY_BASE_H
11 #define SUBSIDY_BASE_H
uint16 remaining
Remaining months when this subsidy is valid.
@ NewsAwarded
News item for an awarded subsidy.
static const uint SUBSIDY_OFFER_MONTHS
Constants related to subsidies.
static const uint SUBSIDY_MAX_PCT_TRANSPORTED
Subsidy will be created only for towns/industries with less % transported.
@ NewsOffered
News item for an offered subsidy.
bool IsAwarded() const
Tests whether this subsidy has been awarded to someone.
Owner
Enum for all companies/owners.
Subsidy()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
static const uint SUBSIDY_CARGO_MIN_POPULATION
Min. population of destination town for cargo route.
CargoID cargo_type
Cargo type involved in this subsidy, CT_INVALID for invalid subsidy.
Struct about subsidies, offered and awarded.
static const uint SUBSIDY_TOWN_CARGO_RADIUS
Extent of a tile area around town center when scanning for town cargo acceptance and production (6 ~=...
uint16 SourceID
Contains either industry ID, town ID or company ID (or INVALID_SOURCE)
SourceID src
Index of source. Either TownID or IndustryID.
SourceID dst
Index of destination. Either TownID or IndustryID.
@ Gui
Subsidies listed in the Subsidy GUI.
@ NewsWithdrawn
News item for a subsidy offer withdrawn, or expired subsidy.
SourceType dst_type
Destination of subsidised path (ST_INDUSTRY or ST_TOWN)
SourceType
Types of cargo source and destination.
Base class for all pools.
static const uint SUBSIDY_MAX_DISTANCE
Max. length of subsidised route (DistanceManhattan)
SubsidyPool _subsidy_pool
Pool for the subsidies.
~Subsidy()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter
void AwardTo(CompanyID company)
Marks subsidy as awarded, creates news and AI event.
byte CargoID
Cargo slots to indicate a cargo type within a game.
@ INVALID_COMPANY
An invalid company.
SubsidyDecodeParamType
Types of subsidy news messages, which determine how the date is printed and whether to use singular o...
SourceType src_type
Source of subsidised path (ST_INDUSTRY or ST_TOWN)
Base class for all PoolItems.
CompanyID awarded
Subsidy is awarded to this company; INVALID_COMPANY if it's not awarded to anyone.
static const uint SUBSIDY_PAX_MIN_POPULATION
Min. population of towns for subsidised pax route.