10 #ifndef SUBSIDY_BASE_H 11 #define SUBSIDY_BASE_H SourceType
Types of cargo source and destination.
Owner
Enum for all companies/owners.
static const uint SUBSIDY_CONTRACT_MONTHS
Duration of subsidy after awarding.
basic types related to subsidies
CompanyID awarded
Subsidy is awarded to this company; INVALID_COMPANY if it's not awarded to anyone.
SourceID src
Index of source. Either TownID or IndustryID.
static const uint SUBSIDY_OFFER_MONTHS
Constants related to subsidies.
bool IsAwarded() const
Tests whether this subsidy has been awarded to someone.
SourceType dst_type
Destination of subsidised path (ST_INDUSTRY or ST_TOWN)
SourceID dst
Index of destination. Either TownID or IndustryID.
void AwardTo(CompanyID company)
Marks subsidy as awarded, creates news and AI event.
static const uint SUBSIDY_MAX_PCT_TRANSPORTED
Subsidy will be created only for towns/industries with less % transported.
Types related to cargoes...
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle...
static const uint SUBSIDY_CARGO_MIN_POPULATION
Min. population of destination town for cargo route.
~Subsidy()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter ...
static const uint SUBSIDY_MAX_DISTANCE
Max. length of subsidised route (DistanceManhattan)
CargoID cargo_type
Cargo type involved in this subsidy, CT_INVALID for invalid subsidy.
Base class for all PoolItems.
Base class for all pools.
Struct about subsidies, offered and awarded.
Subsidy()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
uint16 SourceID
Contains either industry ID, town ID or company ID (or INVALID_SOURCE)
SourceType src_type
Source of subsidised path (ST_INDUSTRY or ST_TOWN)
Types related to companies.
byte CargoID
Cargo slots to indicate a cargo type within a game.
byte remaining
Remaining months when this subsidy is valid.
SubsidyPool _subsidy_pool
Pool for the subsidies.
static const uint SUBSIDY_PAX_MIN_POPULATION
Min. population of towns for subsidised pax route.