1
0
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:
NG (Graham)
2025-06-10 20:52:36 -04:00
parent 5e2a915892
commit 4baa1ef911
23 changed files with 851 additions and 6 deletions

20
rc_core/src/data/lobby.rs Normal file
View 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 _),
}
}
}

View File

@@ -14,6 +14,7 @@ pub mod crf;
pub mod channel;
pub mod sanction;
pub mod robot_data;
pub mod lobby;
pub mod error_codes;

View File

@@ -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(),
}
}