setTutorial false
This commit is contained in:
parent
38177f84e9
commit
88194975ac
@ -212,7 +212,10 @@ function registerEvents(store) {
|
|||||||
if (v.phase === 'Finished') {
|
if (v.phase === 'Finished') {
|
||||||
ws.sendAccountInstances();
|
ws.sendAccountInstances();
|
||||||
}
|
}
|
||||||
if (v.time_control === 'Practice' && v.rounds.length === 1 && tutorial) {
|
if (localStorage.getItem('tutorial-complete')){
|
||||||
|
store.dispatch(actions.setTutorial(null));
|
||||||
|
|
||||||
|
} else if (v.time_control === 'Practice' && v.rounds.length === 1 && tutorial) {
|
||||||
tutorialVbox(player, store, tutorial);
|
tutorialVbox(player, store, tutorial);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -2,7 +2,6 @@ const preact = require('preact');
|
|||||||
const actions = require('./actions');
|
const actions = require('./actions');
|
||||||
|
|
||||||
function tutorialConstructDisplay(player, instance, tutorial, navInstance, i) {
|
function tutorialConstructDisplay(player, instance, tutorial, navInstance, i) {
|
||||||
if (localStorage.getItem('tutorial-complete')) return false;
|
|
||||||
if (instance.time_control === 'Practice' && instance.rounds.length === 1 && tutorial && tutorial < 6) {
|
if (instance.time_control === 'Practice' && instance.rounds.length === 1 && tutorial && tutorial < 6) {
|
||||||
if (tutorial <= 2 || (tutorial > 2 && i > 0)) {
|
if (tutorial <= 2 || (tutorial > 2 && i > 0)) {
|
||||||
const mobileVisible = navInstance === i + 1;
|
const mobileVisible = navInstance === i + 1;
|
||||||
@ -14,14 +13,12 @@ function tutorialConstructDisplay(player, instance, tutorial, navInstance, i) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tutorialShouldDisableEquip(tutorial, iter, instance, construct) {
|
function tutorialShouldDisableEquip(tutorial, iter, instance, construct) {
|
||||||
if (localStorage.getItem('tutorial-complete')) return false;
|
|
||||||
return tutorial && tutorial === 6 && iter === 0 && construct.skills.length !== 0
|
return tutorial && tutorial === 6 && iter === 0 && construct.skills.length !== 0
|
||||||
&& instance.time_control === 'Practice' && instance.rounds.length === 1;
|
&& instance.time_control === 'Practice' && instance.rounds.length === 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function tutorialVbox(player, store, tutorial) {
|
function tutorialVbox(player, store, tutorial) {
|
||||||
if (localStorage.getItem('tutorial-complete')) return false;
|
|
||||||
let stage = tutorial;
|
let stage = tutorial;
|
||||||
const { vbox } = player;
|
const { vbox } = player;
|
||||||
if (stage === 1) {
|
if (stage === 1) {
|
||||||
@ -102,7 +99,6 @@ function tutorialVbox(player, store, tutorial) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function tutorialStage(tutorial, ws, clearTutorial, instance) {
|
function tutorialStage(tutorial, ws, clearTutorial, instance) {
|
||||||
if (localStorage.getItem('tutorial-complete')) return false;
|
|
||||||
if (!(instance.time_control === 'Practice' && instance.rounds.length === 1)) return false;
|
if (!(instance.time_control === 'Practice' && instance.rounds.length === 1)) return false;
|
||||||
|
|
||||||
const exit = () => {
|
const exit = () => {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user