diff --git a/VERSION b/VERSION index cd99d386..30f101cb 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.14.0 \ No newline at end of file +1.14.1 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index 42d68b36..71b94753 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.14.0", + "version": "1.14.1", "description": "", "main": "index.js", "scripts": { diff --git a/client/assets/styles/controls.less b/client/assets/styles/controls.less index a5938475..e0fca483 100644 --- a/client/assets/styles/controls.less +++ b/client/assets/styles/controls.less @@ -27,7 +27,7 @@ aside { flex-flow: column;; } - grid-template-rows: min-content 3fr 3fr 1fr; + grid-template-rows: min-content 1fr 1fr min-content; grid-gap: 0.5em 0; } @@ -132,7 +132,7 @@ aside { .ready { flex: 1; - font-size: 200%; + font-size: 2.5em; } .quit { diff --git a/client/package.json b/client/package.json index c603670b..6cbd9ae5 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.14.0", + "version": "1.14.1", "description": "", "main": "index.js", "scripts": { diff --git a/client/src/events.jsx b/client/src/events.jsx index 72609eb0..6af704bd 100644 --- a/client/src/events.jsx +++ b/client/src/events.jsx @@ -166,9 +166,12 @@ function registerEvents(store) { function setInvite(code) { if (!code) return store.dispatch(actions.setInvite(null)); const link = `${document.location.origin}#join=${code}`; - navigator.clipboard.writeText(link).then(() => { - notify('Invite link copied to clipboard.'); - }, () => {}); + + if (navigator.clipboard) { + navigator.clipboard.writeText(link).then(() => { + notify('Invite link copied to clipboard.'); + }, () => {}); + } return store.dispatch(actions.setInvite(code)); } diff --git a/core/Cargo.toml b/core/Cargo.toml index dc97bf1a..9b41f066 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml_core" -version = "1.14.0" +version = "1.14.1" authors = ["ntr ", "mashy "] [dependencies] diff --git a/core/src/game.rs b/core/src/game.rs index 0140e7a2..2ee6de59 100644 --- a/core/src/game.rs +++ b/core/src/game.rs @@ -804,7 +804,7 @@ impl Game { } } - fn finish(mut self) -> Game { + pub fn finish(mut self) -> Game { self.phase = Phase::Finished; // self.log.push(format!("Game finished.")); @@ -835,7 +835,7 @@ impl Game { return self; } - info!("upkeep game: {:} vs {:}", self.players[0].name, self.players[1].name); + info!("upkeep {:?} {:} vs {:}", self.id, self.players[0].name, self.players[1].name); for player in self.players.iter_mut() { if !player.ready { @@ -2348,7 +2348,7 @@ mod tests { game.new_resolve(Cast::new(target, player_id, target, Skill::Absorb)); assert!(game.construct_by_id(target).unwrap().affected(Effect::Absorb)); - + game.new_resolve(Cast::new(source, target_player_id, target, Skill::Silence)); assert!(game.construct_by_id(target).unwrap().affected(Effect::Silence)); assert!(game.construct_by_id(target).unwrap().affected(Effect::Absorption)); diff --git a/ops/package.json b/ops/package.json index bd5b728b..21612bde 100644 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.14.0", + "version": "1.14.1", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 01ca5d67..f8a489ed 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.14.0" +version = "1.14.1" authors = ["ntr "] [dependencies] diff --git a/server/src/warden.rs b/server/src/warden.rs index 644e78db..33f6d712 100644 --- a/server/src/warden.rs +++ b/server/src/warden.rs @@ -13,6 +13,7 @@ use pg::{ PgPool, games_need_upkeep, + game_get, game_update, game_write, game_delete, @@ -157,6 +158,12 @@ fn fetch_instances(mut tx: Transaction) -> Result { } for mut instance in instances_idle(&mut tx)? { + if let Some(game_id) = instance.current_game_id() { + let mut game = game_get(&mut tx, game_id)?; + game = game.finish(); + game_update(&mut tx, &game)?; + } + instance.finish(); instance_update(&mut tx, instance)?; } diff --git a/studios/package.json b/studios/package.json index 2bac12e1..0224a1f2 100644 --- a/studios/package.json +++ b/studios/package.json @@ -1,6 +1,6 @@ { "name": "mnml-studios", - "version": "1.14.0", + "version": "1.14.1", "description": "", "main": "index.js", "scripts": {