20inline void AddCompanyNewsItem(
EncodedString &&headline, std::unique_ptr<CompanyNewsInformation> cni)
Container for an encoded string, created by GetEncodedString.
Types related to the industry.
void AddVehicleNewsItem(EncodedString &&headline, NewsType type, VehicleID vehicle, StationID station=StationID::Invalid())
Adds a newsitem referencing a vehicle.
void DeleteIndustryNews(IndustryID iid)
Remove news regarding given industry.
void DeleteStationNews(StationID sid)
Remove news regarding given station so there are no 'unknown station now accepts Mail' or 'First trai...
void AddVehicleAdviceNewsItem(AdviceType advice_type, EncodedString &&headline, VehicleID vehicle)
Adds a vehicle-advice news item.
uint32_t SerialiseNewsReference(const NewsReference &reference)
Encode a NewsReference for serialisation, e.g.
void DeleteInvalidEngineNews()
Remove engine announcements for invalid engines.
void InitNewsItemStructs()
Initialize the news-items data structures.
void AddNewsItem(EncodedString &&headline, NewsType type, NewsStyle style, NewsFlags flags, NewsReference ref1={}, NewsReference ref2={}, std::unique_ptr< NewsAllocatedData > &&data=nullptr, AdviceType advice_type=AdviceType::Invalid)
Add a new newsitem to be shown.
const NewsItem * GetStatusbarNews()
Get pointer to the current status bar news item.
void DeleteVehicleNews(VehicleID vid, AdviceType advice_type=AdviceType::Invalid)
Delete news with a given advice type about a vehicle.
@ Advice
Bits of news about vehicles of the company.
@ CompanyInfo
Company info (new companies, bankruptcy messages)
NewsStyle
News Window Styles.
@ Company
Company news item. (Newspaper with face)
@ Small
Small news item. (Information window with text and viewport)
@ Thin
Thin news item. (Newspaper with headline and viewport)
AdviceType
Sub type of the NewsType::Advice to be able to remove specific news items.
std::variant< std::monostate, TileIndex, VehicleID, StationID, IndustryID, TownID, EngineID > NewsReference
References to objects in news.
@ 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).
Types related to stations.
Information about a single item of news.
Types related to vehicles.