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

@@ -455,6 +455,10 @@ impl Database {
.and_then(|(_, player)| player))
}
pub async fn insert_player(&self, entity: crate::schema::multiplayer_game_player::ActiveModel) -> Result<crate::schema::multiplayer_game_player::Model, sea_orm::DbErr> {
entity.insert(&self.orm).await
}
pub async fn insert_players(&self, entities: Vec<crate::schema::multiplayer_game_player::ActiveModel>) -> Result<(), sea_orm::DbErr> {
crate::schema::multiplayer_game_player::Entity::insert_many(entities.into_iter()).exec(&self.orm).await?;
Ok(())