OpenTTD Source: src/subsidy_cmd.h File Reference

OpenTTD Source 14.0-beta1

Functions
subsidy_cmd.h File Reference
`#include "command_type.h"`
`#include "cargo_type.h"`

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...

## Detailed Description

Command definitions related to subsidies.

Definition in file subsidy_cmd.h.

## Function Documentation

## ◆ CmdCreateSubsidy()

CommandCost CmdCreateSubsidy | ( | DoCommandFlag | flags,
|  | CargoID | cid,
|  | SourceType | src_type,
|  | SourceID | src,
|  | SourceType | dst_type,
|  | SourceID | dst
| ) |  |

Create a new subsidy.

Parameters

  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.

Returns
  the cost of this operation or an error

Definition at line 245 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.