OpenTTD Source 20260206-master-g4d4e37dbf1
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
flagstype of operation
typeNewsType of the message.
companyCompany this news message is for.
referenceFirst reference of the news message.
textThe text of the news message.
Returns
the cost of this operation or an error

Definition at line 946 of file news_gui.cpp.

References _current_company, _local_company, AddNewsItem(), CMD_ERROR, End, Execute, INVALID_OWNER, SpecializedStation< Station, false >::IsValidID(), IsValidTile(), Normal, OWNER_DEITY, and BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test().