GSNews Class Reference

Class that handles news messages. More...


Public Types

enum  NewsType {
  NT_ACCIDENT,
  NT_COMPANY_INFO,
  NT_ECONOMY,
  NT_ADVICE,
  NT_ACCEPTANCE,
  NT_SUBSIDIES,
  NT_GENERAL
}
 Enumeration for the news types that a script can create news for. More...

Static Public Member Functions

static bool Create (NewsType type, Text *text, GSCompany::CompanyID company)
 Create a news messages for a company.


Detailed Description

Class that handles news messages.

Member Enumeration Documentation

Enumeration for the news types that a script can create news for.

Enumerator:
NT_ACCIDENT  Category accidents.
NT_COMPANY_INFO  Category company info.
NT_ECONOMY  Category economy.
NT_ADVICE  Category vehicle advice.
NT_ACCEPTANCE  Category acceptance changes.
NT_SUBSIDIES  Category subsidies.
NT_GENERAL  Category general.


Member Function Documentation

static bool GSNews::Create ( NewsType  type,
Text *  text,
GSCompany::CompanyID  company 
) [static]

Create a news messages for a company.

Parameters:
type The type of the news.
text The text message to show (can be either a raw string, or a GSText object).
company The company, or COMPANY_INVALID for all companies.
Returns:
True if the action succeeded.
Precondition:
text != NULL.

company == COMPANY_INVALID || ResolveCompanyID(company) != COMPANY_INVALID.


Generated on Sun Jun 22 19:46:05 2014 for OpenTTD Game API by  doxygen 1.5.6