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/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 cbeebe84..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.")); 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": {