Add singleplayer and campaign rewards screens #70

This commit is contained in:
NG (Graham) committed 2026-01-01 08:07:32 -05:00
1 parent 4ec64a9cd9
commit 782d28efec
11 files changed
+375 -5

No files matched your search

+7 -1
View File
@@ -61,7 +61,7 @@ pub trait UserAuthenticator {
}
#[async_trait::async_trait]
pub trait User<C>: ChatUser + SocialUser + LobbyUser + MultiplayerUser + IntercomUser + CommonUser {
pub trait User<C>: ChatUser + SocialUser + LobbyUser + MultiplayerUser + SingleplayerUser + IntercomUser + CommonUser {
async fn unlocked_parts(&self) -> Vec<u32>;
async fn selected_garage(&self) -> (String, u32);
async fn select_garage(&self, slot: i32) -> Result<(), i16>;
@@ -438,3 +438,9 @@ pub struct MatchRewards {
pub robits_earned: i32,
pub premium_robits_earned: i32,
}
#[async_trait::async_trait]
pub trait SingleplayerUser: Send + Sync {
// regular singleplayer and campaign mode
async fn save_game_result(&self, guid: &str, result: crate::data::game_result::GameResult) -> Result<(), polariton_server::operations::SimpleOpError>;
}