OpenTTD Source: src/news_cmd.h File Reference

OpenTTD Source 15.0-RC2

Functions
news_cmd.h File Reference

Command definitions related to news messages. More...

`#include "command_func.h"`
`#include "company_type.h"`
`#include "news_func.h"`

Go to the source code of this file.

## Functions
CommandCost | CmdCustomNewsItem (DoCommandFlags flags, NewsType type, CompanyID company, NewsReference reference, const EncodedString &text)
| Create a new custom news item.

## Detailed Description

Command definitions related to news messages.

Definition in file news_cmd.h.

## Function Documentation

## ◆ CmdCustomNewsItem()

CommandCost CmdCustomNewsItem | ( | DoCommandFlags | flags,
|  | NewsType | type,
|  | CompanyID | company,
|  | NewsReference | reference,
|  | const EncodedString & | 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_id | 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 945 of file news_gui.cpp.

References _current_company, _local_company, AddNewsItem(), CMD_ERROR, End, Execute, INVALID_OWNER, SpecializedStation< Station, false >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_town_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_company_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_vehicle_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_industry_pool >::IsValidID(), Pool< Titem, Tindex, Tgrowth_step, Tpool_type, Tcache >::PoolItem<&_engine_pool >::IsValidID(), IsValidTile(), Normal, OWNER_DEITY, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().