OpenTTD Source
20241121-master-g67a0fccfad
|
Command definitions related to subsidies. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdCreateSubsidy (DoCommandFlag flags, CargoID cid, SourceType src_type, SourceID src, SourceType dst_type, SourceID dst) |
Create a new subsidy. More... | |
Command definitions related to subsidies.
Definition in file subsidy_cmd.h.
CommandCost CmdCreateSubsidy | ( | DoCommandFlag | flags, |
CargoID | cid, | ||
SourceType | src_type, | ||
SourceID | src, | ||
SourceType | dst_type, | ||
SourceID | dst | ||
) |
Create a new subsidy.
flags | type of operation |
cid | CargoID of subsidy. |
src_type | SourceType of source. |
src | SourceID of source. |
dst_type | SourceType of destination. |
dst | SourceID of destination. |
Definition at line 244 of file subsidy.cpp.
References _current_company, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_subsidy_pool >::CanAllocateItem(), CMD_ERROR, CreateSubsidy(), DC_EXEC, CargoSpec::Get(), Industry, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_town_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_industry_pool >::IsValidID(), NUM_CARGO, OWNER_DEITY, and Town.