diff --git a/client/src/components/targeting.arrows.jsx b/client/src/components/targeting.arrows.jsx
index 2d570121..fba1b064 100644
--- a/client/src/components/targeting.arrows.jsx
+++ b/client/src/components/targeting.arrows.jsx
@@ -44,15 +44,14 @@ class TargetSvg extends Component {
animating,
game,
gameEffectInfo,
- authenticated,
} = props;
const { width, height } = state;
if (!game) return false; // game will be null when battle ends
if (game.phase === 'Finished') return false; // Clear everything if its over (in case of abandon)
- // First time joining game phase
- if (!authenticated && game.stack.length === 0) {
+ // First round of a game
+ if (!game.resolutions.length && game.stack.length === 0) {
return (
Select a skill from each construct, click a target for that skill and then click READY .
diff --git a/client/src/components/vbox.stash.jsx b/client/src/components/vbox.stash.jsx
index 0e737627..3d2f85dd 100644
--- a/client/src/components/vbox.stash.jsx
+++ b/client/src/components/vbox.stash.jsx
@@ -9,7 +9,7 @@ const buttons = require('./buttons');
const { removeTier } = require('../utils');
const addState = connect(
- ({ itemUnequip, vboxHighlight, vboxSelected, tutorial }) => ({ itemUnequip, vboxHighlight, vboxSelected, tutorial }));
+ ({ itemUnequip, vboxHighlight, vboxSelected, tutorial, instance }) => ({ itemUnequip, vboxHighlight, vboxSelected, tutorial, instance }));
class stashElement extends preact.Component {
shouldComponentUpdate(newProps) {
@@ -41,6 +41,7 @@ class stashElement extends preact.Component {
vboxHighlight,
vboxSelected,
tutorial,
+ instance,
} = props;
const { storeSelect, stashSelect } = vboxSelected;
@@ -97,7 +98,7 @@ class stashElement extends preact.Component {
: `${border} ${notValidCombo ? 'fade' : ''}`;
const invObject = shapes[v] ? shapes[v]() : v;
- const tutorialDisable = tutorial === 1;
+ const tutorialDisable = tutorial === 1 && instance.time_control === 'Practice' && instance.rounds.length === 1;
return (
{
event.preventDefault();
+ this.setState({ name: '', password: '', confirm: '' });
submitRegister(name, password);
}
+ const pwLen = () =>
+ !password || password && password.length > 3;
+
const registerConfirm = () =>
password === confirm;
@@ -50,24 +54,30 @@ function Register(args) {
return (
- Username
+ Username
- Password - min 4 chars
+ Password - min 4 chars
+
- Confirm Password
+ Confirm Password
+
p.id === account.id);
store.dispatch(actions.setPlayer(player));
-
- if (tutorial) tutorialVbox(player, store, tutorial);
+
+ if (tutorial && v.rounds.length === 1 && v.time_control === 'Practice') tutorialVbox(player, store, tutorial);
if (v.phase === 'Finished') {
ws.sendAccountInstances();
@@ -211,12 +211,8 @@ function registerEvents(store) {
return true;
}
- function startTutorial() {
- store.dispatch(actions.setTutorial(1));
- }
-
function promptRegister() {
- store.dispatch(actions.setTutorial(99));
+ store.dispatch(actions.setTutorial(null));
store.dispatch(actions.setInstance(null));
}
@@ -249,7 +245,6 @@ function registerEvents(store) {
setSubscription,
setWs,
- startTutorial,
promptRegister,
urlHashChange,
diff --git a/client/src/socket.jsx b/client/src/socket.jsx
index f72541b2..380625c0 100644
--- a/client/src/socket.jsx
+++ b/client/src/socket.jsx
@@ -299,7 +299,7 @@ function createSocket(events) {
ChatWheel: wheel => events.setChatWheel(wheel),
// Joining: () => events.notify('Searching for instance...'),
- StartTutorial: () => events.startTutorial(),
+ // StartTutorial: () => events.startTutorial(),
PromptRegister: () => events.promptRegister(),
Processing: () => true,
diff --git a/core/Cargo.toml b/core/Cargo.toml
index 7c9f9cf5..ebc9fe6b 100644
--- a/core/Cargo.toml
+++ b/core/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mnml_core"
-version = "1.12.3"
+version = "1.12.4"
authors = ["ntr ", "mashy "]
[dependencies]
diff --git a/ops/package.json b/ops/package.json
index 9b864f9a..65521aeb 100644
--- a/ops/package.json
+++ b/ops/package.json
@@ -1,6 +1,6 @@
{
"name": "mnml-ops",
- "version": "1.12.3",
+ "version": "1.12.4",
"description": "",
"main": "index.js",
"scripts": {
diff --git a/server/Cargo.toml b/server/Cargo.toml
index 7abd8ee8..531b66a8 100644
--- a/server/Cargo.toml
+++ b/server/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "mnml"
-version = "1.12.3"
+version = "1.12.4"
authors = ["ntr "]
[dependencies]
diff --git a/server/src/rpc.rs b/server/src/rpc.rs
index 39710fe1..8cc76d7b 100644
--- a/server/src/rpc.rs
+++ b/server/src/rpc.rs
@@ -61,7 +61,6 @@ pub enum RpcMessage {
SubscriptionState(Option),
Pong(()),
- StartTutorial(()),
PromptRegister(()),
QueueRequested(()),
diff --git a/server/src/user_anonymous.rs b/server/src/user_anonymous.rs
index fe1d9045..ffd57d4b 100644
--- a/server/src/user_anonymous.rs
+++ b/server/src/user_anonymous.rs
@@ -69,8 +69,6 @@ impl User for Anonymous {
info!("anonymous connection");
self.ws.send(RpcMessage::AccountState(self.account.clone()))?;
- self.ws.send(RpcMessage::StartTutorial(()))?;
-
Ok(())
}
diff --git a/studios/package.json b/studios/package.json
index ae3d5feb..d1e3c8ac 100644
--- a/studios/package.json
+++ b/studios/package.json
@@ -1,6 +1,6 @@
{
"name": "mnml-studios",
- "version": "1.12.3",
+ "version": "1.12.4",
"description": "",
"main": "index.js",
"scripts": {