|
OpenTTD Source 20251117-master-g7398d2e290
|
Functions related to subsidies. More...
#include "source_type.h"#include "station_type.h"#include "company_type.h"#include "cargo_type.h"Go to the source code of this file.
Functions | |
| void | DeleteSubsidyWith (Source src) |
| Delete the subsidies associated with a given cargo source type and id. | |
| bool | CheckSubsidised (CargoType cargo_type, CompanyID company, Source src, const Station *st) |
| Tests whether given delivery is subsidised and possibly awards the subsidy to delivering company. | |
| void | RebuildSubsidisedSourceAndDestinationCache () |
| Perform a full rebuild of the subsidies cache. | |
Functions related to subsidies.
Definition in file subsidy_func.h.
Tests whether given delivery is subsidised and possibly awards the subsidy to delivering company.
| cargo_type | type of cargo |
| company | company delivering the cargo |
| src | source of cargo |
| st | station where the cargo is delivered to |
Definition at line 507 of file subsidy.cpp.
References Town::cache, Station::catchment_tiles, Destination, Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Get(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_industry_pool >::Get(), include(), Station::industries_near, Industry, INVALID_TILE, IsTileType(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_subsidy_pool >::Iterate(), MP_HOUSE, TownCache::part_of_subsidy, BaseStation::rect, Source, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), Town, and Source::type.
Referenced by DeliverGoods().
| void DeleteSubsidyWith | ( | Source | source | ) |
Delete the subsidies associated with a given cargo source type and id.
| source | The source to look for. |
Definition at line 119 of file subsidy.cpp.
References InvalidateWindowData(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_subsidy_pool >::Iterate(), RebuildSubsidisedSourceAndDestinationCache(), and WC_SUBSIDIES_LIST.
Referenced by Town::~Town().
| void RebuildSubsidisedSourceAndDestinationCache | ( | ) |
Perform a full rebuild of the subsidies cache.
Definition at line 103 of file subsidy.cpp.
References Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::Iterate().
Referenced by ChangeOwnershipOfCompanyItems(), CheckCaches(), DeleteSubsidyWith(), and InitializeWindowsAndCaches().