1
0
mirror of https://git.ngram.ca/OpenJam/rc-servers synced 2026-08-23 23:08:52 +00:00

Add singleplayer and campaign rewards screens #70

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

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>;
}