Class that handles news messages. More...
#include <script_news.hpp>
Public Types | |
enum | NewsType { NT_ARRIVAL_COMPANY = ::NS_ARRIVAL_COMPANY, NT_ARRIVAL_OTHER = ::NS_ARRIVAL_OTHER, NT_ACCIDENT = ::NS_ACCIDENT, NT_COMPANY_TROUBLE = ::NS_COMPANY_TROUBLE, NT_COMPANY_MERGER = ::NS_COMPANY_MERGER, NT_COMPANY_BANKRUPT = ::NS_COMPANY_BANKRUPT, NT_COMPANY_NEW = ::NS_COMPANY_NEW, NT_INDUSTRY_OPEN = ::NS_INDUSTRY_OPEN, NT_INDUSTRY_CLOSE = ::NS_INDUSTRY_CLOSE, NT_ECONOMY = ::NS_ECONOMY, NT_INDUSTRY_COMPANY = ::NS_INDUSTRY_COMPANY, NT_INDUSTRY_OTHER = ::NS_INDUSTRY_OTHER, NT_INDUSTRY_NOBODY = ::NS_INDUSTRY_NOBODY, NT_ADVICE = ::NS_ADVICE, NT_NEW_VEHICLES = ::NS_NEW_VEHICLES, NT_ACCEPTANCE = ::NS_ACCEPTANCE, NT_SUBSIDIES = ::NS_SUBSIDIES, NT_GENERAL = ::NS_GENERAL } |
Enumeration for corners of tiles. More... | |
Static Public Member Functions | |
static bool | Create (NewsType type, Text *text, ScriptCompany::CompanyID company) |
Create a news messages for a company. |
Class that handles news messages.
game
Definition at line 23 of file script_news.hpp.
enum ScriptNews::NewsType |
Enumeration for corners of tiles.
Definition at line 28 of file script_news.hpp.
bool ScriptNews::Create | ( | NewsType | type, | |
Text * | text, | |||
ScriptCompany::CompanyID | company | |||
) | [static] |
Create a news messages for a company.
type | The type of the news. | |
text | The text message to show (can be either a raw string, or a ScriptText object). | |
company | The company, or COMPANY_INVALID for all companies. |
Definition at line 21 of file script_news.cpp.
References CMD_CUSTOM_NEWS_ITEM, ScriptCompany::COMPANY_INVALID, ScriptObject::DoCommand(), EnforcePrecondition, Text::GetEncodedText(), NR_NONE, NT_ARRIVAL_COMPANY, NT_GENERAL, ScriptCompany::ResolveCompanyID(), and StrEmpty().