From 7bb0fe4961465df48832c320778209cd73ae9184 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 17 Jan 2020 17:40:56 +1000 Subject: [PATCH 1/8] monochrome shapes --- server/src/img.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/src/img.rs b/server/src/img.rs index ef14b0ec..7620df7d 100644 --- a/server/src/img.rs +++ b/server/src/img.rs @@ -113,10 +113,10 @@ pub fn shapes_write(id: Uuid) -> Result { ]; let num_dist = WeightedIndex::new(n_shapes_items.iter().map(|v| v.1))?; let n_shapes = num_dist.sample(&mut rng) as usize; + let h = rng.gen_range(0, 360); write!(&mut svg, "")?; for i in 0..n_shapes + 1 { - let h = rng.gen_range(0, 360); let s = s_dist.sample(&mut rng) as usize; let l = l_dist.sample(&mut rng) as usize; let colour = format!("hsl({:}, {:}%, {:}%)", h, s, l); From 03c528ce19930dbd365e72c9d8b6236957136aec Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 17 Jan 2020 17:41:08 +1000 Subject: [PATCH 2/8] v1.12.3 --- VERSION | 2 +- acp/package.json | 2 +- client/package.json | 2 +- core/Cargo.toml | 2 +- ops/package.json | 2 +- server/Cargo.toml | 2 +- studios/package.json | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/VERSION b/VERSION index 69669de6..c56eaaaf 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.12.2 \ No newline at end of file +1.12.3 \ No newline at end of file diff --git a/acp/package.json b/acp/package.json index cb7abeda..c072126b 100644 --- a/acp/package.json +++ b/acp/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.12.2", + "version": "1.12.3", "description": "", "main": "index.js", "scripts": { diff --git a/client/package.json b/client/package.json index 977344f7..25380772 100644 --- a/client/package.json +++ b/client/package.json @@ -1,6 +1,6 @@ { "name": "mnml-client", - "version": "1.12.2", + "version": "1.12.3", "description": "", "main": "index.js", "scripts": { diff --git a/core/Cargo.toml b/core/Cargo.toml index 4f9ed720..7c9f9cf5 100644 --- a/core/Cargo.toml +++ b/core/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml_core" -version = "1.12.2" +version = "1.12.3" authors = ["ntr ", "mashy "] [dependencies] diff --git a/ops/package.json b/ops/package.json index d1d30272..9b864f9a 100644 --- a/ops/package.json +++ b/ops/package.json @@ -1,6 +1,6 @@ { "name": "mnml-ops", - "version": "1.12.2", + "version": "1.12.3", "description": "", "main": "index.js", "scripts": { diff --git a/server/Cargo.toml b/server/Cargo.toml index 76a849df..7abd8ee8 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "mnml" -version = "1.12.2" +version = "1.12.3" authors = ["ntr "] [dependencies] diff --git a/studios/package.json b/studios/package.json index 93382d32..ae3d5feb 100644 --- a/studios/package.json +++ b/studios/package.json @@ -1,6 +1,6 @@ { "name": "mnml-studios", - "version": "1.12.2", + "version": "1.12.3", "description": "", "main": "index.js", "scripts": { From d23da8fb98b2f99a8f80804cb266c51015c0251b Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 17 Jan 2020 17:50:40 +1000 Subject: [PATCH 3/8] remove 1,1 shape combo --- server/src/img.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/server/src/img.rs b/server/src/img.rs index 7620df7d..3708b067 100644 --- a/server/src/img.rs +++ b/server/src/img.rs @@ -105,7 +105,6 @@ pub fn shapes_write(id: Uuid) -> Result { let shape_dist = WeightedIndex::new(shapes.iter().map(|v| v.1))?; let n_shapes_items = [ - (1, 1), (2, 2), (3, 5), (4, 10), From c8bccffe7f312c68e5b0c8dfdff20e80d8999fb4 Mon Sep 17 00:00:00 2001 From: ntr Date: Fri, 17 Jan 2020 17:57:04 +1000 Subject: [PATCH 4/8] add word --- client/src/components/play.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/play.jsx b/client/src/components/play.jsx index 1450a2df..2b32af8a 100644 --- a/client/src/components/play.jsx +++ b/client/src/components/play.jsx @@ -95,7 +95,7 @@ function Play(args) { type="submit"> Invite -
Play against friend
+
Play against a friend
); From c0cbfe6e0fb7d3562741ab2693a623511c28e255 Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 19 Jan 2020 12:15:16 +1000 Subject: [PATCH 5/8] disable ready until picking a skill in tutorial --- client/src/components/game.ctrl.btns.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/src/components/game.ctrl.btns.jsx b/client/src/components/game.ctrl.btns.jsx index 9b898345..a374ae80 100644 --- a/client/src/components/game.ctrl.btns.jsx +++ b/client/src/components/game.ctrl.btns.jsx @@ -86,7 +86,9 @@ function GameCtrlBtns(args) { quit(); } - const readyBtn = ; + const noTargets = !authenticated && game.stack.length === 0; + + const readyBtn = ; const quitBtn = ; return ( From 8e18ca033fca941add0c32d0745fe2bfba371c4e Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 19 Jan 2020 12:22:32 +1000 Subject: [PATCH 6/8] highlight animation hurrr --- client/assets/styles/game.less | 13 +++++++++++++ client/src/components/game.construct.jsx | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/client/assets/styles/game.less b/client/assets/styles/game.less index 1746abea..e7bfac87 100644 --- a/client/assets/styles/game.less +++ b/client/assets/styles/game.less @@ -85,6 +85,10 @@ .effects { align-self: flex-start; } + + &.highlight { + animation: highlight 1s infinite alternate; + } } .game-construct .name { @@ -93,6 +97,15 @@ } } +@keyframes highlight { + from { + background: @black; + } + to { + background: @silver; + } +} + .game-construct { display: grid; diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index a5c163c2..01790c8a 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -15,6 +15,7 @@ const addState = connect( ws, game, + authenticated, activeSkill, animFocus, resolution, @@ -28,6 +29,8 @@ const addState = connect( } return { + game, + authenticated, activeSkill, animFocus, resolution, @@ -51,6 +54,8 @@ class GameConstruct extends preact.Component { render() { const { // Changing state variables + authenticated, + game, activeSkill, animFocus, resolution, @@ -74,6 +79,7 @@ class GameConstruct extends preact.Component { }; const unfocus = animFocus && !animFocus.includes(construct.id) ? 'unfocus' : ''; + const highlight = !authenticated && activeSkill && game.stack.length === 0 ? 'highlight' : ''; const crypSkills = player ?
{range(0, 3).map(j => )}
@@ -84,7 +90,7 @@ class GameConstruct extends preact.Component {
selectSkillTarget(construct.id)} style={ activeSkill ? { cursor: 'pointer' } : {}} - class={`game-construct ${ko} ${koEvent()} ${unfocus}`}> + class={`game-construct ${ko} ${koEvent()} ${unfocus} ${highlight}`}>
{crypSkills} From 09cf3c3f3f4b4f5af527934b4ca3500644405c26 Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 19 Jan 2020 12:26:18 +1000 Subject: [PATCH 7/8] always highlight opponent in tutorial --- client/src/components/game.construct.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index 01790c8a..187c12a3 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -79,7 +79,7 @@ class GameConstruct extends preact.Component { }; const unfocus = animFocus && !animFocus.includes(construct.id) ? 'unfocus' : ''; - const highlight = !authenticated && activeSkill && game.stack.length === 0 ? 'highlight' : ''; + const highlight = !authenticated && activeSkill ? 'highlight' : ''; const crypSkills = player ?
{range(0, 3).map(j => )}
From f70a6afe772afee272c26c36aad4f8fe1284b2fa Mon Sep 17 00:00:00 2001 From: ntr Date: Sun, 19 Jan 2020 12:31:08 +1000 Subject: [PATCH 8/8] noob proof surely --- client/src/components/game.construct.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/client/src/components/game.construct.jsx b/client/src/components/game.construct.jsx index 187c12a3..f3980794 100644 --- a/client/src/components/game.construct.jsx +++ b/client/src/components/game.construct.jsx @@ -79,13 +79,14 @@ class GameConstruct extends preact.Component { }; const unfocus = animFocus && !animFocus.includes(construct.id) ? 'unfocus' : ''; - const highlight = !authenticated && activeSkill ? 'highlight' : ''; + + const targeted = game.stack.find(c => c.target === construct.id); + const highlight = !authenticated && !targeted && activeSkill ? 'highlight' : ''; const crypSkills = player ?
{range(0, 3).map(j => )}
:
; - return (
selectSkillTarget(construct.id)}