47 return this->awarded != CompanyID::Invalid();
Types related to cargoes...
uint8_t CargoType
Cargo slots to indicate a cargo type within a game.
Types related to companies.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Type for the source of cargo.
Base class for all PoolItems.
Base class for all pools.
A location from where cargo can come from (or go to).
Struct about subsidies, offered and awarded.
bool IsAwarded() const
Tests whether this subsidy has been awarded to someone.
CargoType cargo_type
Cargo type involved in this subsidy, INVALID_CARGO for invalid subsidy.
CompanyID awarded
Subsidy is awarded to this company; CompanyID::Invalid() if it's not awarded to anyone.
void AwardTo(CompanyID company)
Marks subsidy as awarded, creates news and AI event.
~Subsidy()
(Empty) destructor has to be defined else operator delete might be called with nullptr parameter
Subsidy()
We need an (empty) constructor so struct isn't zeroed (as C++ standard states)
Source dst
Destination of subsidised path.
Source src
Source of subsidised path.
uint16_t remaining
Remaining months when this subsidy is valid.
SubsidyPool _subsidy_pool("Subsidy")
Pool for the subsidies.
static const uint SUBSIDY_MAX_DISTANCE
Max. length of subsidised route (DistanceManhattan)
static const uint SUBSIDY_CARGO_MIN_POPULATION
Min. population of destination town for cargo route.
static const uint SUBSIDY_TOWN_CARGO_RADIUS
Extent of a tile area around town center when scanning for town cargo acceptance and production (6 ~=...
static const uint SUBSIDY_PAX_MIN_POPULATION
Min. population of towns for subsidised pax route.
static const uint SUBSIDY_MAX_PCT_TRANSPORTED
Subsidy will be created only for towns/industries with less % transported.
static const uint SUBSIDY_OFFER_MONTHS
Constants related to subsidies.
basic types related to subsidies