tutorial state fixes
This commit is contained in:
parent
6cb99576c0
commit
f51c28a713
@ -50,7 +50,7 @@ function InstanceCtrlBtns(args) {
|
||||
} = args;
|
||||
|
||||
const finished = instance && instance.phase === 'Finished';
|
||||
const tutorialDisable = tutorial && tutorial < 8;
|
||||
const tutorialDisable = instance.time_control === 'Practice' && tutorial;
|
||||
return (
|
||||
<div class="instance-ctrl-btns">
|
||||
<button disabled={!account.subscribed} onClick={() => setChatShow(!chatShow)}>Chat</button>
|
||||
|
||||
@ -180,8 +180,7 @@ function registerEvents(store) {
|
||||
setPvp(false);
|
||||
const player = v.players.find(p => p.id === account.id);
|
||||
store.dispatch(actions.setPlayer(player));
|
||||
|
||||
if (tutorial) tutorialVbox(player, store, tutorial);
|
||||
if (tutorial && v.time_control === 'Practice') tutorialVbox(player, store, tutorial);
|
||||
|
||||
if (v.phase === 'Finished') {
|
||||
ws.sendAccountInstances();
|
||||
@ -211,10 +210,6 @@ function registerEvents(store) {
|
||||
return true;
|
||||
}
|
||||
|
||||
function startTutorial() {
|
||||
store.dispatch(actions.setTutorial(1));
|
||||
}
|
||||
|
||||
function promptRegister() {
|
||||
store.dispatch(actions.setTutorial(99));
|
||||
store.dispatch(actions.setInstance(null));
|
||||
@ -249,7 +244,6 @@ function registerEvents(store) {
|
||||
setSubscription,
|
||||
setWs,
|
||||
|
||||
startTutorial,
|
||||
promptRegister,
|
||||
|
||||
urlHashChange,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user