73using NewsReference = std::variant<std::monostate, TileIndex, VehicleID, StationID, IndustryID, TownID, EngineID>;
148 std::unique_ptr<NewsAllocatedData>
data;
152 std::string GetStatusText()
const;
Container for an encoded string, created by GetEncodedString.
Types related to engines.
Type (helpers) for enums.
Types related to the graphics and/or input devices.
Types related to the industry.
@ Invalid
GRF is unusable with this version of OpenTTD.
@ Advice
Bits of news about vehicles of the company.
@ General
General news (from towns)
@ ArrivalCompany
First vehicle arrived for company.
@ CompanyInfo
Company info (new companies, bankruptcy messages)
@ AccidentOther
An accident or disaster has occurred.
@ IndustryCompany
Production changes of industry serviced by local company.
@ IndustryClose
Closing of industries.
@ IndustryOpen
Opening of industries.
@ NewVehicles
New vehicle has become available.
@ Economy
Economic changes (recession, industry up/dowm)
@ IndustryNobody
Other industry production changes.
@ Subsidies
News about subsidies (announcements, expirations, acceptance)
@ ArrivalOther
First vehicle arrived for competitor.
@ Accident
An accident or disaster has occurred.
@ Acceptance
A type of cargo is (no longer) accepted.
@ IndustryOther
Production changes of industry serviced by competitor(s)
NewsContainer::const_iterator NewsIterator
Iterator type for news items.
std::list< NewsItem > NewsContainer
Container type for storing news items.
NewsStyle
News Window Styles.
@ Company
Company news item. (Newspaper with face)
@ Small
Small news item. (Information window with text and viewport)
@ Normal
Normal news item. (Newspaper with text only)
@ Thin
Thin news item. (Newspaper with headline and viewport)
@ Vehicle
Vehicle news item. (new engine available)
AdviceType
Sub type of the NewsType::Advice to be able to remove specific news items.
@ TrainStuck
The train got stuck and needs to be unstuck manually.
@ VehicleLost
The vehicle has become lost.
@ VehicleWaiting
The vehicle is waiting in the depot.
@ Order
Something wrong with the order, e.g. invalid or duplicate entries, too few entries.
@ AutorenewFailed
Autorenew or autoreplace failed.
@ VehicleOld
The vehicle is starting to get old.
@ VehicleUnprofitable
The vehicle is costing you money.
@ AircraftDestinationTooFar
Next (order) destination is too far for the aircraft type.
@ RefitFailed
The refit order failed to execute.
std::variant< std::monostate, TileIndex, VehicleID, StationID, IndustryID, TownID, EngineID > NewsReference
References to objects in news.
NewsFlag
Various OR-able news-item flags.
@ NoTransparency
News item disables transparency in the viewport.
@ VehicleParam0
String param 0 contains a vehicle ID. (special autoreplace behaviour)
@ Shaded
News item uses shaded colours.
@ InColour
News item is shown in colour (otherwise it is shown in black & white).
NewsDisplay
News display options.
@ Off
Only show a reminder in the status bar.
SoundFx
Sound effects from baseset.
Types related to stations.
Types related to strings.
uint32_t StringID
Numeric value that represents a string, independent of the selected language.
Container for any custom data that must be deleted after the news item has reached end-of-life.
Information about a single item of news.
TimerGameCalendar::Date date
Calendar date to show for the news.
std::unique_ptr< NewsAllocatedData > data
Custom data for the news item that will be deallocated (deleted) when the news item has reached its e...
NewsType type
Type of the news.
EncodedString headline
Headline of news.
AdviceType advice_type
The type of advice, to be able to remove specific advices later on.
TimerGameEconomy::Date economy_date
Economy date of the news item, never shown but used to calculate age.
NewsFlags flags
Window style for the news.
NewsReference ref2
Reference 2 to some object: Used for scrolling after clicking on the news, and for deleting the news ...
NewsReference ref1
Reference 1 to some object: Used for a possible viewport, scrolling after clicking on the news,...
NewsDisplay GetDisplay() const
Return the news display option.
const char *const name
Name.
NewsTypeData(const char *name, uint8_t age, SoundFx sound)
Construct this entry.
const SoundFx sound
Sound.
const uint8_t age
Maximum age of news items (in days)
Templated helper to make a type-safe 'typedef' representing a single POD value.
Definition of the game-calendar-timer.
Definition of the game-economy-timer.
Types related to vehicles.