Merge branch 'release/1.12.1'
This commit is contained in:
commit
c641aca232
@ -3,6 +3,7 @@
|
|||||||
|
|
||||||
_ntr_
|
_ntr_
|
||||||
* can't reset password without knowing password =\
|
* can't reset password without knowing password =\
|
||||||
|
* hard reload client on version change
|
||||||
|
|
||||||
* audio
|
* audio
|
||||||
* animation effects
|
* animation effects
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-client",
|
"name": "mnml-client",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -48,6 +48,10 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.team {
|
||||||
|
grid-gap: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
.team, #targeting, .resolving-skill {
|
.team, #targeting, .resolving-skill {
|
||||||
width: calc(90% - 3em);
|
width: calc(90% - 3em);
|
||||||
}
|
}
|
||||||
@ -92,7 +96,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.player {
|
.player {
|
||||||
width: calc(90%);
|
width: calc(90% - 1.5em);
|
||||||
.game-construct {
|
.game-construct {
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
"left"
|
"left"
|
||||||
@ -110,11 +114,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.resolving-skill {
|
.resolving-skill {
|
||||||
width: calc(90%);
|
width: calc(90% - 1.5em);
|
||||||
}
|
}
|
||||||
|
|
||||||
.opponent {
|
.opponent {
|
||||||
width: calc(90%);
|
width: calc(90% - 1.5em);
|
||||||
.game-construct {
|
.game-construct {
|
||||||
grid-template-rows: 2fr min-content;
|
grid-template-rows: 2fr min-content;
|
||||||
grid-template-rows: 1fr;
|
grid-template-rows: 1fr;
|
||||||
@ -160,9 +164,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
aside {
|
aside {
|
||||||
font-size: 75%;
|
|
||||||
button {
|
button {
|
||||||
margin-bottom: 0.5em;
|
margin-bottom: 0.5em;
|
||||||
|
z-index: 50;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-client",
|
"name": "mnml-client",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -45,7 +45,6 @@ export const setTeamPage = value => ({ type: 'SET_TEAM_PAGE', value });
|
|||||||
export const setTeamSelect = value => ({ type: 'SET_TEAM_SELECT', value: Array.from(value) });
|
export const setTeamSelect = value => ({ type: 'SET_TEAM_SELECT', value: Array.from(value) });
|
||||||
|
|
||||||
export const setTutorial = value => ({ type: 'SET_TUTORIAL', value });
|
export const setTutorial = value => ({ type: 'SET_TUTORIAL', value });
|
||||||
export const setTutorialGame = value => ({ type: 'SET_TUTORIAL_GAME', value });
|
|
||||||
|
|
||||||
export const setVboxSelected = value => ({ type: 'SET_VBOX_SELECTED', value: value });
|
export const setVboxSelected = value => ({ type: 'SET_VBOX_SELECTED', value: value });
|
||||||
export const setVboxCombiner = value => ({ type: 'SET_VBOX_COMBINER', value });
|
export const setVboxCombiner = value => ({ type: 'SET_VBOX_COMBINER', value });
|
||||||
|
|||||||
@ -50,12 +50,11 @@ function Play(args) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
const list = () => {
|
const list = () => {
|
||||||
|
|
||||||
if (promptRegister) {
|
if (promptRegister) {
|
||||||
return (
|
return (
|
||||||
<div class='block-text'>
|
<div class='block-text'>
|
||||||
<p><b>You just won your first round of MNML.</b></p>
|
<p><b>You just won your first round of MNML.</b></p>
|
||||||
<p>Register below to play a real Bo5 against other players, play a practice round, customise your team & more...</p>
|
<p>Register below to play a real Bo5 against other players,<br/> play a practice round against a tougher AI opponent,<br/> customise your team & more...</p>
|
||||||
<p>glhf</p>
|
<p>glhf</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
|
|||||||
@ -64,12 +64,9 @@ function Skill(props) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// const skillChosen = game.stack.some(stack => stack.source_construct_id === construct.id);
|
// const skillChosen = game.stack.some(stack => stack.source === construct.id);
|
||||||
const targeting = game.stack.some(stack => stack.source_construct_id === construct.id && stack.skill === s.skill);
|
const targeting = game.stack.some(stack => stack.source === construct.id && stack.skill === s.skill);
|
||||||
|
|
||||||
// if (skillChosen && !targeting) {
|
|
||||||
// return false;
|
|
||||||
// }
|
|
||||||
const cdText = construct.skills[i].cd > 0
|
const cdText = construct.skills[i].cd > 0
|
||||||
? `${s.cd}T`
|
? `${s.cd}T`
|
||||||
: '';
|
: '';
|
||||||
|
|||||||
@ -9,8 +9,8 @@ const shapes = require('./shapes');
|
|||||||
const { effectInfo } = require('../utils');
|
const { effectInfo } = require('../utils');
|
||||||
|
|
||||||
const addState = connect(
|
const addState = connect(
|
||||||
({ game, account, animating, itemInfo, gameEffectInfo, tutorialGame }) =>
|
({ game, account, animating, itemInfo, gameEffectInfo, authenticated }) =>
|
||||||
({ game, account, animating, itemInfo, gameEffectInfo, tutorialGame })
|
({ game, account, animating, itemInfo, gameEffectInfo, authenticated })
|
||||||
);
|
);
|
||||||
|
|
||||||
class TargetSvg extends Component {
|
class TargetSvg extends Component {
|
||||||
@ -32,7 +32,6 @@ class TargetSvg extends Component {
|
|||||||
if (newProps.account !== this.props.account) return true;
|
if (newProps.account !== this.props.account) return true;
|
||||||
if (newProps.animating !== this.props.animating) return true;
|
if (newProps.animating !== this.props.animating) return true;
|
||||||
if (newProps.gameEffectInfo !== this.props.gameEffectInfo) return true;
|
if (newProps.gameEffectInfo !== this.props.gameEffectInfo) return true;
|
||||||
if (newProps.tutorialGame !== this.props.tutorialGame) return true;
|
|
||||||
if (newState.width !== this.state.width) return true;
|
if (newState.width !== this.state.width) return true;
|
||||||
if (newState.height !== this.state.height) return true;
|
if (newState.height !== this.state.height) return true;
|
||||||
return false;
|
return false;
|
||||||
@ -45,7 +44,7 @@ class TargetSvg extends Component {
|
|||||||
animating,
|
animating,
|
||||||
game,
|
game,
|
||||||
gameEffectInfo,
|
gameEffectInfo,
|
||||||
tutorialGame,
|
authenticated,
|
||||||
} = props;
|
} = props;
|
||||||
const { width, height } = state;
|
const { width, height } = state;
|
||||||
|
|
||||||
@ -53,10 +52,10 @@ class TargetSvg extends Component {
|
|||||||
if (game.phase === 'Finished') return false; // Clear everything if its over (in case of abandon)
|
if (game.phase === 'Finished') return false; // Clear everything if its over (in case of abandon)
|
||||||
|
|
||||||
// First time joining game phase
|
// First time joining game phase
|
||||||
if (tutorialGame) {
|
if (!authenticated && game.stack.length === 0) {
|
||||||
return (
|
return (
|
||||||
<div class="resolving-skill">
|
<div class="resolving-skill">
|
||||||
<h2>Select your skills, click on targets and then hit <b>READY</b>.</h2>
|
<h2><b>Select a skill</b> from each construct, <b>click a target</b> for that skill and then click <b>READY</b>.</h2>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -51,10 +51,11 @@ function Login(args) {
|
|||||||
<label for="username">Username</label>
|
<label for="username">Username</label>
|
||||||
<input
|
<input
|
||||||
class="login-input"
|
class="login-input"
|
||||||
type="email"
|
type="text"
|
||||||
placeholder="username"
|
placeholder="username"
|
||||||
tabIndex={1}
|
tabIndex={1}
|
||||||
value={name}
|
value={name}
|
||||||
|
autocomplete="username"
|
||||||
onInput={linkState(this, 'name')}
|
onInput={linkState(this, 'name')}
|
||||||
/>
|
/>
|
||||||
<label for="password">Password</label>
|
<label for="password">Password</label>
|
||||||
@ -63,6 +64,7 @@ function Login(args) {
|
|||||||
type="password"
|
type="password"
|
||||||
placeholder="password"
|
placeholder="password"
|
||||||
tabIndex={2}
|
tabIndex={2}
|
||||||
|
autocomplete="current-password"
|
||||||
value={password}
|
value={password}
|
||||||
onInput={linkState(this, 'password')}
|
onInput={linkState(this, 'password')}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@ -30,10 +30,6 @@ function registerEvents(store) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function clearTutorialGame() {
|
|
||||||
store.dispatch(actions.setTutorialGame(null));
|
|
||||||
}
|
|
||||||
|
|
||||||
function setPing(ping) {
|
function setPing(ping) {
|
||||||
store.dispatch(actions.setPing(ping));
|
store.dispatch(actions.setPing(ping));
|
||||||
}
|
}
|
||||||
@ -231,7 +227,6 @@ function registerEvents(store) {
|
|||||||
clearInstance,
|
clearInstance,
|
||||||
clearMtxActive,
|
clearMtxActive,
|
||||||
clearTutorial,
|
clearTutorial,
|
||||||
clearTutorialGame,
|
|
||||||
setAccount,
|
setAccount,
|
||||||
setAuthenticated,
|
setAuthenticated,
|
||||||
setAccountInstances,
|
setAccountInstances,
|
||||||
|
|||||||
@ -54,7 +54,6 @@ module.exports = {
|
|||||||
teamSelect: createReducer([null, null, null], 'SET_TEAM_SELECT'),
|
teamSelect: createReducer([null, null, null], 'SET_TEAM_SELECT'),
|
||||||
|
|
||||||
tutorial: createReducer(1, 'SET_TUTORIAL'),
|
tutorial: createReducer(1, 'SET_TUTORIAL'),
|
||||||
tutorialGame: createReducer(1, 'SET_TUTORIAL_GAME'),
|
|
||||||
|
|
||||||
vboxSelected: createReducer({ storeSelect: [], stashSelect: [] }, 'SET_VBOX_SELECTED'),
|
vboxSelected: createReducer({ storeSelect: [], stashSelect: [] }, 'SET_VBOX_SELECTED'),
|
||||||
vboxCombiner: createReducer(null, 'SET_VBOX_COMBINER'),
|
vboxCombiner: createReducer(null, 'SET_VBOX_COMBINER'),
|
||||||
|
|||||||
@ -12,7 +12,7 @@ function errorToast(err) {
|
|||||||
return toast.error({
|
return toast.error({
|
||||||
title: 'BEEP BOOP',
|
title: 'BEEP BOOP',
|
||||||
message: err,
|
message: err,
|
||||||
position: 'topRight',
|
position: 'bottomLeft',
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -129,7 +129,6 @@ function createSocket(events) {
|
|||||||
{ game_id: gameId, construct_id: constructId, target_construct_id: targetConstructId, skill },
|
{ game_id: gameId, construct_id: constructId, target_construct_id: targetConstructId, skill },
|
||||||
]);
|
]);
|
||||||
events.setActiveSkill(null);
|
events.setActiveSkill(null);
|
||||||
events.clearTutorialGame();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function sendGameSkillClear(gameId) {
|
function sendGameSkillClear(gameId) {
|
||||||
@ -342,7 +341,7 @@ function createSocket(events) {
|
|||||||
function onOpen() {
|
function onOpen() {
|
||||||
toast.info({
|
toast.info({
|
||||||
message: 'connected',
|
message: 'connected',
|
||||||
position: 'topRight',
|
position: 'bottomLeft',
|
||||||
});
|
});
|
||||||
|
|
||||||
sendPing();
|
sendPing();
|
||||||
@ -361,7 +360,7 @@ function createSocket(events) {
|
|||||||
console.error('WebSocket closed', event);
|
console.error('WebSocket closed', event);
|
||||||
toast.warning({
|
toast.warning({
|
||||||
message: 'disconnected',
|
message: 'disconnected',
|
||||||
position: 'topRight',
|
position: 'bottomLeft',
|
||||||
});
|
});
|
||||||
return setTimeout(connect, 5000);
|
return setTimeout(connect, 5000);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -208,7 +208,7 @@ function postData(url = '/', data = {}) {
|
|||||||
|
|
||||||
function errorToast(message) {
|
function errorToast(message) {
|
||||||
toast.error({
|
toast.error({
|
||||||
position: 'topRight',
|
position: 'bottomLeft',
|
||||||
drag: false,
|
drag: false,
|
||||||
close: false,
|
close: false,
|
||||||
message,
|
message,
|
||||||
@ -217,7 +217,7 @@ function errorToast(message) {
|
|||||||
|
|
||||||
function infoToast(message) {
|
function infoToast(message) {
|
||||||
toast.info({
|
toast.info({
|
||||||
position: 'topRight',
|
position: 'bottomLeft',
|
||||||
drag: false,
|
drag: false,
|
||||||
close: false,
|
close: false,
|
||||||
message,
|
message,
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mnml_core"
|
name = "mnml_core"
|
||||||
version = "1.12.0"
|
version = "1.12.1"
|
||||||
authors = ["ntr <ntr@smokestack.io>", "mashy <mashy@mnml.gg>"]
|
authors = ["ntr <ntr@smokestack.io>", "mashy <mashy@mnml.gg>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-ops",
|
"name": "mnml-ops",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "mnml"
|
name = "mnml"
|
||||||
version = "1.12.0"
|
version = "1.12.1"
|
||||||
authors = ["ntr <ntr@smokestack.io>"]
|
authors = ["ntr <ntr@smokestack.io>"]
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
|
|||||||
@ -141,24 +141,6 @@ struct Connection {
|
|||||||
events: CbSender<Event>,
|
events: CbSender<Event>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Connection {
|
|
||||||
// this is where last minute processing happens
|
|
||||||
// use it to modify outgoing messages, update subs, serialize in some way...
|
|
||||||
fn send(&self, msg: RpcMessage) -> Result<(), Error> {
|
|
||||||
let msg = match msg {
|
|
||||||
RpcMessage::InstanceState(v) => RpcMessage::InstanceState(v.redact(self.id)),
|
|
||||||
RpcMessage::AccountInstances(v) =>
|
|
||||||
RpcMessage::AccountInstances(v.into_iter().map(|i| i.redact(self.id)).collect()),
|
|
||||||
RpcMessage::GameState(v) => RpcMessage::GameState(v.redact(self.id)),
|
|
||||||
_ => msg,
|
|
||||||
};
|
|
||||||
|
|
||||||
self.ws.send(msg).unwrap();
|
|
||||||
|
|
||||||
Ok(())
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// we unwrap everything in here cause really
|
// we unwrap everything in here cause really
|
||||||
// we don't care if this panics
|
// we don't care if this panics
|
||||||
// it's run in a thread so it's supposed to bail
|
// it's run in a thread so it's supposed to bail
|
||||||
@ -178,7 +160,7 @@ impl Handler for Connection {
|
|||||||
},
|
},
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
warn!("{:?}", e);
|
warn!("{:?}", e);
|
||||||
self.send(RpcMessage::Error(e.to_string())).unwrap();
|
self.ws.send(RpcMessage::Error(e.to_string())).unwrap();
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@ -50,6 +50,16 @@ impl User for Anonymous {
|
|||||||
_ => (),
|
_ => (),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// last minute redactions and processing
|
||||||
|
// this happens after the state setting as we need to keep
|
||||||
|
// all the skills to prevent forfeiting
|
||||||
|
let msg = match msg {
|
||||||
|
RpcMessage::InstanceState(v) => RpcMessage::InstanceState(v.redact(self.id)),
|
||||||
|
RpcMessage::GameState(v) => RpcMessage::GameState(v.redact(self.id)),
|
||||||
|
_ => msg,
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
self.ws.send(msg)?;
|
self.ws.send(msg)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@ -79,6 +79,15 @@ impl User for Authenticated {
|
|||||||
_ => (),
|
_ => (),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// last minute processing
|
||||||
|
let msg = match msg {
|
||||||
|
RpcMessage::InstanceState(v) => RpcMessage::InstanceState(v.redact(self.id)),
|
||||||
|
RpcMessage::AccountInstances(v) =>
|
||||||
|
RpcMessage::AccountInstances(v.into_iter().map(|i| i.redact(self.id)).collect()),
|
||||||
|
RpcMessage::GameState(v) => RpcMessage::GameState(v.redact(self.id)),
|
||||||
|
_ => msg,
|
||||||
|
};
|
||||||
|
|
||||||
self.ws.send(msg)?;
|
self.ws.send(msg)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "mnml-studios",
|
"name": "mnml-studios",
|
||||||
"version": "1.12.0",
|
"version": "1.12.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user