70 std::vector<std::string>
args;
93 std::span<const ManagerStint>
stints;
99 std::span<const InboxMessage>
inbox;
151std::vector<std::size_t>
filter(std::span<const NewsItem> items,
155std::size_t
variant(
NewsKind kind, std::uint32_t first, std::uint32_t second,
Manages the match calendar for a season.
Definition calendar.h:133
Singleton class that acts as an in-memory cache for the database state.
Definition gamedata.h:43
Represents the core game state and logic.
Definition game.h:48
The world news feed: dated stories derived from saved data.
Definition news_feed.h:127
std::vector< std::size_t > filter(std::span< const NewsItem > items, const NewsFilter &filter)
Definition news_feed.cpp:825
constexpr std::uint16_t LEADER_MIN_PLAYED
Definition news_feed.h:133
constexpr int RACE_GAMES_LEFT
Definition news_feed.h:135
std::vector< NewsItem > build(const NewsSources &sources, const GameDateValue &from, const GameDateValue &to)
Definition news_feed.cpp:745
std::size_t variant(NewsKind kind, std::uint32_t first, std::uint32_t second, const GameDateValue &date, std::size_t count)
Definition news_feed.cpp:731
std::vector< NewsItem > forGame(const Game &game, const GameData &gamedata)
Definition news_feed.cpp:784
constexpr std::uint32_t MAJOR_FEE
Definition news_feed.h:129
constexpr int UPSET_REPUTATION_GAP
Definition news_feed.h:131
constexpr int RACE_POINTS_GAP
Definition news_feed.h:136
const char * newsKindKey(NewsKind kind)
Definition news_feed.cpp:696
NewsKind
What a news story is about (filter of the news screen).
Definition news_feed.h:34
Represents a specific date in the game world.
Definition gamedate.h:20
A competition a story belongs to (id 0: none).
Definition news_feed.h:49
bool operator==(const NewsCompetition &other) const =default
MatchType type
Definition news_feed.h:50
What the news screen shows (unset fields: everything).
Definition news_feed.h:111
std::optional< LeagueID > country
Definition news_feed.h:112
bool matches(const NewsItem &item) const
Definition news_feed.cpp:724
std::optional< NewsCompetition > competition
Definition news_feed.h:113
std::optional< NewsKind > kind
Definition news_feed.h:114
One story of the world news feed.
Definition news_feed.h:64
TeamID other_team_id
Definition news_feed.h:73
std::vector< std::string > args
Definition news_feed.h:70
std::string headline() const
Definition news_feed.cpp:719
GameDateValue date
Definition news_feed.h:65
TeamID away_id
Definition news_feed.h:78
NewsCompetition competition
Definition news_feed.h:68
NewsKind kind
Definition news_feed.h:66
std::string headline_key
Definition news_feed.h:69
PlayerID player_id
Definition news_feed.h:71
TeamID team_id
Definition news_feed.h:72
LeagueID country
Definition news_feed.h:67
std::uint32_t weight
Definition news_feed.h:79
GameDateValue match_date
Definition news_feed.h:76
bool has_match
Definition news_feed.h:75
TeamID home_id
Definition news_feed.h:77
The saved facts the feed is built from.
Definition news_feed.h:87
std::span< const SeasonHistoryEntry > history
Definition news_feed.h:103
std::span< const Vacancy > vacancies
Definition news_feed.h:97
const Calendar * calendar
Definition news_feed.h:90
std::span< const RecordEntry > records
Definition news_feed.h:102
std::string manager_name
Definition news_feed.h:94
std::span< const ManagerStint > stints
Definition news_feed.h:93
std::span< const InboxMessage > inbox
Definition news_feed.h:99
TeamID managed_team
Definition news_feed.h:104
GameDateValue world_start
Definition news_feed.h:106
std::span< const AiManager > managers
Definition news_feed.h:96
const GameData * gamedata
Definition news_feed.h:88
std::span< const TransferRecord > transfers
Definition news_feed.h:91
std::span< const AwardRecord > awards
Definition news_feed.h:100
MatchType
Represents the type or category of a match.
Definition types.h:40
uint8_t LeagueID
Type alias for League identifiers.
Definition types.h:15
uint16_t TeamID
Type alias for Team identifiers.
Definition types.h:18
uint32_t PlayerID
Type alias for Player identifiers.
Definition types.h:21