mirror of
https://git.ngram.ca/OpenJam/rc-servers
synced 2026-08-23 23:08:52 +00:00
Add minimum matchmaking lobby server
This commit is contained in:
20
rc_core/src/data/lobby.rs
Normal file
20
rc_core/src/data/lobby.rs
Normal file
@@ -0,0 +1,20 @@
|
||||
#[repr(i8)]
|
||||
#[derive(Debug)]
|
||||
pub enum LobbyType {
|
||||
None = -1,
|
||||
CustomGame = 1,
|
||||
QuickPlay = 2,
|
||||
Solo = 3
|
||||
}
|
||||
|
||||
impl LobbyType {
|
||||
pub fn from_int(i: i32) -> Result<Self, i16> {
|
||||
match i {
|
||||
-1 => Ok(Self::None),
|
||||
1 => Ok(Self::CustomGame),
|
||||
2 => Ok(Self::QuickPlay),
|
||||
3 => Ok(Self::Solo),
|
||||
_ => Err(super::error_codes::WebServicesError::UnexpectedError as _),
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@ pub mod crf;
|
||||
pub mod channel;
|
||||
pub mod sanction;
|
||||
pub mod robot_data;
|
||||
pub mod lobby;
|
||||
|
||||
pub mod error_codes;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ fn default_gameplay_settings() -> super::GameplaySettings {
|
||||
shield_hps: 2_000,
|
||||
request_review_level: 10_000,
|
||||
critical_ratio: 5.0,
|
||||
cross_promo_image: "https://git.ngram.ca/assets/img/logo.png".to_owned(),
|
||||
cross_promo_image: "https://git.ngram.ca/OpenJam/servers/raw/branch/main/assets/robocraft/favicon.jpg".to_owned(),
|
||||
cross_promo_link: "https://git.ngram.ca/OpenJam/servers".to_owned(),
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user