OpenTTD Source: CompanyNewsInformation Struct Reference

OpenTTD Source 13.2.1

Public Member Functions | Data Fields
CompanyNewsInformation Struct Reference

Data that needs to be stored for company news messages. More...

`#include <news_type.h>`

Inheritance diagram for CompanyNewsInformation:

## Public Member Functions
| CompanyNewsInformation (const struct Company *c, const struct Company *other=nullptr)
| Fill the CompanyNewsInformation struct with the required data. More...

## Data Fields
std::string | company_name
| The name of the company.
std::string | president_name
| The name of the president.
std::string | other_company_name
| The name of the company taking over this one.
uint32 | face
| The face of the president.
byte | colour
| The colour related to the company.

## Detailed Description

Data that needs to be stored for company news messages.

The problem with company news messages are the custom name of the companies and the fact that the company data is reset, resulting in wrong names and such.

Definition at line 158 of file news_type.h.

## Constructor & Destructor Documentation

## ◆ CompanyNewsInformation()

CompanyNewsInformation::CompanyNewsInformation | ( | const struct Company * | c,
|  | const struct Company * | other = `nullptr`
| ) |  |

Fill the CompanyNewsInformation struct with the required data.

Parameters

  c | the current company.
  other | the other company (use `nullptr` if not relevant).

Definition at line 770 of file company_cmd.cpp.

References company_name, Pool< Titem, Tindex, Tgrowth_step, Tmax_size, Tpool_type, Tcache, Tzero >::PoolItem< Tpool >::index, and SetDParam().

The documentation for this struct was generated from the following files:

- src/news_type.h
- src/company_cmd.cpp