230static const int MAX_PRICE_MODIFIER = 16;
A sort-of mixin that implements 'at(pos)' and 'operator[](pos)' only for a specific enum class.
ScoreID
Score categories in the detailed performance rating.
@ Begin
The lowest valid value.
@ Delivered
Units of cargo delivered in the last four quaters.
@ MinIncome
Income in the quater with the lowest profit of the last 12 quaters.
@ Vehicles
Number of vehicles that turned profit last year.
@ Stations
Number of recently-serviced stations.
@ Total
Total points out of possible points ,must always be the last entry.
@ Loan
The amount of money company can take as a loan.
@ MaxIncome
Income in the quater with the highest profit of the last 12 quaters.
@ MinProfit
The profit of the vehicle with the lowest income.
@ Cargo
Number of types of cargo delivered in the last four quaters.
static const uint LOCK_DEPOT_TILE_FACTOR
Multiplier for how many regular tiles a lock counts.
static const uint LEVELCROSSING_TRACKBIT_FACTOR
Multiplier for how many regular track bits a level crossing counts.
static const int64_t MAX_LOAN_LIMIT
The max amount possible to configure for a max loan of a company.
EconomyType
Type of the game economy.
@ Original
Imitates original TTD economy.
@ Begin
The lowest valid value.
@ Frozen
Stops production changes and industry closures.
@ End
Economy type end marker.
@ Smooth
Makes production changes more often, and in smaller steps.
static const int MIN_PRICE_MODIFIER
Maximum NewGRF price modifiers.
static const uint ROAD_STOP_TRACKBIT_FACTOR
Multiplier for how many regular track bits a bay stop counts.
static const uint ROAD_DEPOT_TRACKBIT_FACTOR
Multiplier for how many regular track bits a road depot counts.
std::array< Money, EXPENSES_END > Expenses
Data type for storage of Money for each ExpensesType category.
ExpensesType
Types of expenses.
@ EXPENSES_ROADVEH_RUN
Running costs road vehicles.
@ EXPENSES_END
Number of expense types.
@ EXPENSES_TRAIN_RUN
Running costs trains.
@ EXPENSES_AIRCRAFT_REVENUE
Revenue from aircraft.
@ EXPENSES_CONSTRUCTION
Construction costs.
@ EXPENSES_AIRCRAFT_RUN
Running costs aircraft.
@ EXPENSES_ROADVEH_REVENUE
Revenue from road vehicles.
@ EXPENSES_PROPERTY
Property costs.
@ EXPENSES_OTHER
Other expenses.
@ EXPENSES_SHIP_REVENUE
Revenue from ships.
@ EXPENSES_LOAN_INTEREST
Interest payments over the loan.
@ EXPENSES_TRAIN_REVENUE
Revenue from trains.
@ EXPENSES_SHIP_RUN
Running costs ships.
@ INVALID_EXPENSES
Invalid expense type.
@ EXPENSES_NEW_VEHICLES
New vehicles.
PriceCategory
Categories of a price bases.
@ PCAT_RUNNING
Price is affected by "vehicle running cost" difficulty setting.
@ PCAT_CONSTRUCTION
Price is affected by "construction cost" difficulty setting.
@ PCAT_NONE
Not affected by difficulty settings.
static const int LOAN_INTERVAL
The "steps" in loan size, in British Pounds!
static const uint TUNNELBRIDGE_TRACKBIT_FACTOR
Multiplier for how many regular track bits a tunnel/bridge counts.
static const int MIN_CARGO_SCALE
Minimum allowed value of town_cargo_scale/industry_cargo_scale.
static const int64_t INITIAL_LOAN
The size of loan for a new company, in British Pounds!
static const uint64_t MAX_INFLATION
Maximum inflation (including fractional part) without causing overflows in int64_t price computations...
Price
Enumeration of all base prices for use with Prices.
@ BuildStationTruck
Price for building lorry stations.
@ InfrastructureWater
Canals maintenance cost.
@ ClearStationBus
Price for destroying bus stops.
@ BuildStationBus
Price for building bus stops.
@ ClearStationAirport
Price for destroying airports.
@ ClearCanal
Price for destroying canals.
@ BuildObject
Price for building new objects.
@ RunningTrainElectric
Running cost of electric trains.
@ ClearTrees
Price for destroying trees.
@ Begin
The lowest valid value.
@ ClearStationTruck
Price for destroying lorry stations.
@ BuildVehicleWagon
Price for purchasing new wagons.
@ BuildStationAirport
Price for building airports.
@ BuildVehicleTrain
Price for purchasing new train engines.
@ ClearStationDock
Price for destroying docks.
@ ClearRough
Price for destroying rough land.
@ ClearStationRail
Price for destroying rail stations.
@ Terraform
Price for terraforming land, e.g. rising, lowering and flattening.
@ ClearTunnel
Price for destroying tunnels.
@ BuildIndustryRaw
Price for funding new raw industries, e.g. coal mine, forest.
@ RunningTrainSteam
Running cost of steam trains.
@ ClearRocks
Price for destroying rocks.
@ BuildDepotShip
Price for building ship depots.
@ ClearFields
Price for destroying fields.
@ InfrastructureAirport
Airports maintenance cost.
@ ClearRoad
Price for destroying roads.
@ BuildVehicleShip
Price for purchasing new ships.
@ Invalid
Invalid base price.
@ BuildStationRailLength
Additional price for building rail stations dependent on their length.
@ BuildWaypointBuoy
Price for building new buoys.
@ ClearDepotRoad
Price for destroying road vehicle depots.
@ BuildSignals
Price for building rail signals.
@ BuildFoundation
Price for building foundation under other constructions e.g. roads, rails, depots,...
@ ClearAqueduct
Price for destroying aqueducts.
@ BuildIndustry
Price for funding new industries.
@ BuildCanal
Price for building new canals.
@ ClearWaypointBuoy
Price for destroying buoys.
@ BuildAqueduct
Price for building new aqueducts.
@ BuildTunnel
Price for building tunnels.
@ ClearWater
Price for destroying water e.g. see, rives.
@ BuildBridge
Price for building bridges.
@ BuildStationRail
Price for building rail stations.
@ ClearIndustry
Price for destroying industries.
@ TownAction
Price for interaction with local authorities.
@ BuildVehicleAircraft
Price for purchasing new aircrafts.
@ StationValue
Stations value and additional constant company running fee.
@ RunningAircraft
Running cost of aircrafts.
@ RunningTrainDiesel
Running cost of diesel trains.
@ ClearSignals
Price for destroying rail signals.
@ ClearGrass
Price for destroying grass.
@ ClearHouse
Price for destroying houses and other town buildings.
@ BuildStationDock
Price for building docks.
@ BuildRail
Price for building rails.
@ ClearDepotShip
Price for destroying ship depots.
@ BuildTrees
Price for planting trees.
@ InfrastructureRail
Rails maintenance cost.
@ BuildTown
Price for funding new towns and cities.
@ ClearDepotTrain
Price for destroying train depots.
@ BuildRoad
Price for building roads.
@ ClearObject
Price for destroying objects.
@ BuildVehicleRoad
Price for purchasing new road vehicles.
@ ClearWaypointRail
Price for destroying rail waypoints.
@ InfrastructureRoad
Roads maintenance cost.
@ ClearLock
Price for destroying locks.
@ BuildDepotRoad
Price for building road vehicle depots.
@ RunningShip
Running cost of ships.
@ BuildWaypointRail
Price for building new rail waypoints.
@ BuildLock
Price for building new locks.
@ RunningRoadveh
Running cost of road vehicles.
@ BuildDepotTrain
Price for building train depots.
@ ClearRail
Price for destroying rails.
@ ClearBridge
Price for destroying bridges.
@ InfrastructureStation
Stations maintenance cost.
static constexpr int SCORE_MAX
The max score that can be in the performance history.
static const int MAX_CARGO_SCALE
Maximum allowed value of town_cargo_scale/industry_cargo_scale.
static const int DEF_CARGO_SCALE
Default value of town_cargo_scale/industry_cargo_scale.
Type (helpers) for enums.
constexpr std::underlying_type_t< enum_type > to_underlying(enum_type e)
Implementation of std::to_underlying (from C++23)
#define DECLARE_INCREMENT_DECREMENT_OPERATORS(enum_type)
For some enums it is useful to have pre/post increment/decrement operators.
An overflow safe integer-like type.
Definition of Pool, structure used to access PoolItems, and PoolItem, base structure for Vehicle,...
Helper class to perform the cargo payment.
uint64_t inflation_payment
Cumulated inflation of cargo payment since game start; 16 bit fractional part.
uint8_t infl_amount
inflation amount
uint64_t inflation_prices
Cumulated inflation of prices since game start; 16 bit fractional part.
Money old_max_loan_unround
Old: Unrounded max loan.
int16_t fluct
Economy fluctuation status.
uint8_t infl_amount_pr
inflation rate for payment rates
uint32_t industry_daily_change_counter
Bits 31-16 are number of industry to be performed, 15-0 are fractional collected daily.
uint32_t industry_daily_increment
The value which will increment industry_daily_change_counter. Computed value. NOSAVE.
uint16_t old_max_loan_unround_fract
Old: Fraction of the unrounded max loan.
Money max_loan
NOSAVE: Maximum possible loan.
uint8_t interest_rate
Interest.
Templated helper to make a PoolID a single POD value.
Data structure for storing how the score is computed for a single score id.
int needed
How much you need to get the perfect score.
int score
How much score it will give.