#include "core/geometry_type.hpp"
#include "station_type.h"
#include "town_type.h"
#include "industry_type.h"
#include "company_type.h"
Go to the source code of this file.
Functions | |
Pair | SetupSubsidyDecodeParam (const struct Subsidy *s, bool mode) |
void | DeleteSubsidyWith (SourceType type, SourceID index) |
bool | CheckSubsidised (CargoID cargo_type, CompanyID company, SourceType src_type, SourceID src, const Station *st) |
Tests whether given delivery is subsidised and possibly awards the subsidy to delivering company. | |
void | SubsidyMonthlyHandler () |
void | RebuildSubsidisedSourceAndDestinationCache () |
void | DeleteSubsidy (struct Subsidy *s) |
Definition in file subsidy_func.h.
bool CheckSubsidised | ( | CargoID | cargo_type, | |
CompanyID | company, | |||
SourceType | src_type, | |||
SourceID | src, | |||
const Station * | st | |||
) |
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_type | type of src | |
src | index of source | |
st | station where the cargo is delivered to |
Definition at line 329 of file subsidy.cpp.
References Subsidy::awarded, Subsidy::AwardTo(), SmallVector< T, S >::Begin(), Rect::bottom, Subsidy::cargo_type, Subsidy::dst, Subsidy::dst_type, SmallVector< T, S >::End(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tcache, Tzero >::PoolItem< Tpool >::Get(), Station::GetCatchmentRect(), SmallVector< T, S >::Include(), Station::industries_near, INVALID_SOURCE, Subsidy::IsAwarded(), StationRect::IsEmpty(), IsTileType(), Rect::left, MP_HOUSE, POS_DST, POS_SRC, BaseStation::rect, Rect::right, Subsidy::src, Subsidy::src_type, ST_INDUSTRY, ST_TOWN, TileXY(), and Rect::top.
Referenced by DeliverGoods().