OpenTTD Source: src/news_cmd.h File Reference

OpenTTD Source 14.0-RC3

Functions
news_cmd.h File Reference
`#include "command_type.h"`
`#include "company_type.h"`
`#include "news_type.h"`

Go to the source code of this file.

## Functions
CommandCost | CmdCustomNewsItem (DoCommandFlag flags, NewsType type, NewsReferenceType reftype1, CompanyID company, uint32_t reference, const std::string &text)
| Create a new custom news item. More...

## Detailed Description

Command definitions related to news messages.

Definition in file news_cmd.h.

## Function Documentation

## ◆ CmdCustomNewsItem()

CommandCost CmdCustomNewsItem | ( | DoCommandFlag | flags,
|  | NewsType | type,
|  | NewsReferenceType | reftype1,
|  | CompanyID | company,
|  | uint32_t | reference,
|  | const std::string & | text
| ) |  |

Create a new custom news item.

Parameters

  flags | type of operation @aram type NewsType of the message.
  reftype1 | NewsReferenceType of first reference.
  company | Company this news message is for.
  reference | First reference of the news message.
  text | The text of the news message.

Returns
  the cost of this operation or an error

Definition at line 865 of file news_gui.cpp.

References _current_company, _local_company, AddNewsItem(), CMD_ERROR, DC_EXEC, INVALID_OWNER, SpecializedStation< Station, false >::IsValidID(), 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<&_engine_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_company_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_vehicle_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem<&_industry_pool >::IsValidID(), IsValidTile(), NF_NORMAL, NR_ENGINE, NR_INDUSTRY, NR_NONE, NR_STATION, NR_TILE, NR_TOWN, NR_VEHICLE, NT_END, OWNER_DEITY, SetDParamStr(), and NewsStringData::string.