OpenTTD Source 20250428-master-g68ba2735ea
|
Types related to news. More...
#include "core/enum_type.hpp"
#include "engine_type.h"
#include "industry_type.h"
#include "gfx_type.h"
#include "sound_type.h"
#include "station_type.h"
#include "strings_type.h"
#include "timer/timer_game_calendar.h"
#include "timer/timer_game_economy.h"
#include "town_type.h"
#include "vehicle_type.h"
Go to the source code of this file.
Data Structures | |
struct | NewsTypeData |
Per-NewsType data. More... | |
struct | NewsAllocatedData |
Container for any custom data that must be deleted after the news item has reached end-of-life. More... | |
struct | NewsItem |
Information about a single item of news. More... | |
struct | CompanyNewsInformation |
Data that needs to be stored for company news messages. More... | |
Typedefs | |
using | NewsReference = std::variant< std::monostate, TileIndex, VehicleID, StationID, IndustryID, TownID, EngineID > |
References to objects in news. | |
using | NewsFlags = EnumBitSet< NewsFlag, uint8_t > |
using | NewsContainer = std::list< NewsItem > |
Container type for storing news items. | |
using | NewsIterator = NewsContainer::const_iterator |
Iterator type for news items. | |
Enumerations | |
enum class | NewsType : uint8_t { ArrivalCompany , ArrivalOther , Accident , AccidentOther , CompanyInfo , IndustryOpen , IndustryClose , Economy , IndustryCompany , IndustryOther , IndustryNobody , Advice , NewVehicles , Acceptance , Subsidies , General , End } |
Type of news. More... | |
enum class | AdviceType : uint8_t { AircraftDestinationTooFar , AutorenewFailed , Order , RefitFailed , TrainStuck , VehicleLost , VehicleOld , VehicleUnprofitable , VehicleWaiting , Invalid } |
Sub type of the NewsType::Advice to be able to remove specific news items. More... | |
enum class | NewsStyle : uint8_t { Thin , Small , Normal , Vehicle , Company } |
News Window Styles. More... | |
enum class | NewsFlag : uint8_t { InColour , NoTransparency , Shaded , VehicleParam0 } |
Various OR-able news-item flags. More... | |
enum class | NewsDisplay : uint8_t { Off , Summary , Full } |
News display options. More... | |
Types related to news.
Definition in file news_type.h.
using NewsContainer = std::list<NewsItem> |
Container type for storing news items.
Definition at line 173 of file news_type.h.
using NewsFlags = EnumBitSet<NewsFlag, uint8_t> |
Definition at line 94 of file news_type.h.
using NewsIterator = NewsContainer::const_iterator |
Iterator type for news items.
Definition at line 174 of file news_type.h.
using NewsReference = std::variant<std::monostate, TileIndex, VehicleID, StationID, IndustryID, TownID, EngineID> |
References to objects in news.
Definition at line 73 of file news_type.h.
|
strong |
Sub type of the NewsType::Advice to be able to remove specific news items.
Definition at line 50 of file news_type.h.
|
strong |
News display options.
Enumerator | |
---|---|
Off | Only show a reminder in the status bar. |
Summary | Show ticker. |
Full | Show newspaper. |
Definition at line 99 of file news_type.h.
|
strong |
Various OR-able news-item flags.
Definition at line 88 of file news_type.h.
|
strong |
News Window Styles.
Enumerator | |
---|---|
Thin | Thin news item. (Newspaper with headline and viewport) |
Small | Small news item. (Information window with text and viewport) |
Normal | Normal news item. (Newspaper with text only) |
Vehicle | Vehicle news item. (new engine available) |
Company | Company news item. (Newspaper with face) |
Definition at line 76 of file news_type.h.
|
strong |
Type of news.
Enumerator | |
---|---|
ArrivalCompany | First vehicle arrived for company. |
ArrivalOther | First vehicle arrived for competitor. |
Accident | An accident or disaster has occurred. |
AccidentOther | An accident or disaster has occurred. |
CompanyInfo | Company info (new companies, bankruptcy messages) |
IndustryOpen | Opening of industries. |
IndustryClose | Closing of industries. |
Economy | Economic changes (recession, industry up/dowm) |
IndustryCompany | Production changes of industry serviced by local company. |
IndustryOther | Production changes of industry serviced by competitor(s) |
IndustryNobody | Other industry production changes. |
Advice | Bits of news about vehicles of the company. |
NewVehicles | New vehicle has become available. |
Acceptance | A type of cargo is (no longer) accepted. |
Subsidies | News about subsidies (announcements, expirations, acceptance) |
General | General news (from towns) |
End | end-of-array marker |
Definition at line 28 of file news_type.h.