Merge branch 'release/1.12.3'
This commit is contained in:
commit
cbcf73b241
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-client",
|
||||
"version": "1.12.2",
|
||||
"version": "1.12.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-client",
|
||||
"version": "1.12.2",
|
||||
"version": "1.12.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -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,
|
||||
@ -75,16 +80,18 @@ class GameConstruct extends preact.Component {
|
||||
|
||||
const unfocus = animFocus && !animFocus.includes(construct.id) ? 'unfocus' : '';
|
||||
|
||||
const targeted = game.stack.find(c => c.target === construct.id);
|
||||
const highlight = !authenticated && !targeted && activeSkill ? 'highlight' : '';
|
||||
|
||||
const crypSkills = player
|
||||
? <div class="skills"> {range(0, 3).map(j => <SkillBtn key={j} construct={construct} i={j} />)} </div>
|
||||
: <div></div>;
|
||||
|
||||
|
||||
return (
|
||||
<div
|
||||
onClick={() => selectSkillTarget(construct.id)}
|
||||
style={ activeSkill ? { cursor: 'pointer' } : {}}
|
||||
class={`game-construct ${ko} ${koEvent()} ${unfocus}`}>
|
||||
class={`game-construct ${ko} ${koEvent()} ${unfocus} ${highlight}`}>
|
||||
<div class="left">
|
||||
{crypSkills}
|
||||
<ConstructEffectBox construct={construct} />
|
||||
|
||||
@ -86,7 +86,9 @@ function GameCtrlBtns(args) {
|
||||
quit();
|
||||
}
|
||||
|
||||
const readyBtn = <button disabled={animating} class="ready" onClick={() => sendReady()}>Ready</button>;
|
||||
const noTargets = !authenticated && game.stack.length === 0;
|
||||
|
||||
const readyBtn = <button disabled={animating || noTargets} class="ready" onClick={() => sendReady()}>Ready</button>;
|
||||
const quitBtn = <button disabled={animating} class="quit" onClick={quitClick}>Back</button>;
|
||||
|
||||
return (
|
||||
|
||||
@ -95,7 +95,7 @@ function Play(args) {
|
||||
type="submit">
|
||||
Invite
|
||||
</button>
|
||||
<figcaption>Play against friend</figcaption>
|
||||
<figcaption>Play against a friend</figcaption>
|
||||
</figure>
|
||||
|
||||
);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mnml_core"
|
||||
version = "1.12.2"
|
||||
version = "1.12.3"
|
||||
authors = ["ntr <ntr@smokestack.io>", "mashy <mashy@mnml.gg>"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-ops",
|
||||
"version": "1.12.2",
|
||||
"version": "1.12.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
[package]
|
||||
name = "mnml"
|
||||
version = "1.12.2"
|
||||
version = "1.12.3"
|
||||
authors = ["ntr <ntr@smokestack.io>"]
|
||||
|
||||
[dependencies]
|
||||
|
||||
@ -105,7 +105,6 @@ pub fn shapes_write(id: Uuid) -> Result<Uuid, Error> {
|
||||
let shape_dist = WeightedIndex::new(shapes.iter().map(|v| v.1))?;
|
||||
|
||||
let n_shapes_items = [
|
||||
(1, 1),
|
||||
(2, 2),
|
||||
(3, 5),
|
||||
(4, 10),
|
||||
@ -113,10 +112,10 @@ pub fn shapes_write(id: Uuid) -> Result<Uuid, Error> {
|
||||
];
|
||||
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, "<svg xmlns='http://www.w3.org/2000/svg' version='1.1' viewBox='-250 -250 500 500' width='1000' height='1000'><g>")?;
|
||||
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);
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "mnml-studios",
|
||||
"version": "1.12.2",
|
||||
"version": "1.12.3",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user