pacenotes_shared/game.rs
1//! Game ids, as used in `installer/DESIGN.md` rev. 2 and `installer/src/gamedir.rs`.
2//! The set is open: a new game needs no protocol bump.
3
4pub const GAME_RBR: &str = "rbr";
5pub const GAME_DIRT_RALLY2: &str = "dirtrally2";
6pub const GAME_ASSETTOCORSA: &str = "assettocorsa";
7pub const GAME_BEAMNG: &str = "beamng";
8
9/// Lets the server spot a game id filed where something else belongs.
10pub const KNOWN_GAMES: [&str; 4] = [GAME_RBR, GAME_DIRT_RALLY2, GAME_ASSETTOCORSA, GAME_BEAMNG];
11
12/// The game of a package from a manifest written before games existed, which listed RBR only.
13pub fn default_game() -> String {
14 GAME_RBR.to_string()
15}