Add support for matchmaker sending clients off to game server

This commit is contained in:
NG (Graham) committed 2025-06-19 22:05:16 -04:00
1 parent 8cd63c3122
commit 9f74a2e76a
24 files changed
+543 -45

No files matched your search

+6 -1
View File
@@ -54,7 +54,7 @@ pub trait UserAuthenticator {
}
#[async_trait::async_trait]
pub trait User<C>: ChatUser {
pub trait User<C>: ChatUser + LobbyUser {
fn ext(&self, ty: std::any::TypeId) -> Option<&'_ (dyn std::any::Any + Send + Sync + 'static)>;
fn token(&self) -> &'_ super::UserToken;
fn is_mod(&self) -> bool;
@@ -225,3 +225,8 @@ impl SanctionType {
}
}
}
#[async_trait::async_trait]
pub trait LobbyUser {
async fn player_data(&self) -> Result<crate::data::player_data::PlayerData, polariton_server::operations::SimpleOpError>;
}