upgrade spacetimedb to v2.0.1
This commit is contained in:
parent
5ebf3f6c05
commit
baab16144b
38 changed files with 481 additions and 1647 deletions
|
|
@ -16,13 +16,14 @@ mod lobby;
|
|||
|
||||
#[reducer]
|
||||
pub fn advance_game(ctx: &ReducerContext, mut game_timer: GameTimer) -> Result<(), String> {
|
||||
advance_game_private(ctx, game_timer)
|
||||
}
|
||||
|
||||
#[reducer]
|
||||
pub fn advance_game_private(ctx: &ReducerContext, mut game_timer: GameTimer) -> Result<(), String> {
|
||||
// checks every second (or more? when users make moves) on whether to advance the game's various states
|
||||
// TODO this, or allow player/debug to call this?
|
||||
|
||||
// if !ctx.sender_auth().is_internal() {
|
||||
// return Err("This reducer can only be called by the scheduler".to_string());
|
||||
// }
|
||||
|
||||
if let Some(mut lobby) = ctx.db.lobby().id().find(game_timer.lobby_id) {
|
||||
trace!("running schedule for lobby {}", lobby.id);
|
||||
match lobby.game_state {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue