Skip to content

Commit 36e835c

Browse files
committed
Don't enable player authentication if a tutorial is running when creating a new project
Don't show in changelog
1 parent 8d0b3ef commit 36e835c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

newIDE/app/src/ProjectCreation/NewProjectSetupDialog.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import optionalRequire from '../Utils/OptionalRequire';
2929
import PreferencesContext from '../MainFrame/Preferences/PreferencesContext';
3030
import Checkbox from '../UI/Checkbox';
3131
import { MarkdownText } from '../UI/MarkdownText';
32+
import InAppTutorialContext from '../InAppTutorial/InAppTutorialContext';
3233

3334
const electron = optionalRequire('electron');
3435
const remote = optionalRequire('@electron/remote');
@@ -91,6 +92,9 @@ const NewProjectSetupDialog = ({
9192
const { values, setNewProjectsDefaultStorageProviderName } = React.useContext(
9293
PreferencesContext
9394
);
95+
const { currentlyRunningInAppTutorial } = React.useContext(
96+
InAppTutorialContext
97+
);
9498
const { openSubscriptionDialog } = React.useContext(
9599
SubscriptionSuggestionContext
96100
);
@@ -108,7 +112,8 @@ const NewProjectSetupDialog = ({
108112
false
109113
);
110114
const [allowPlayersToLogIn, setAllowPlayersToLogIn] = React.useState<boolean>(
111-
true
115+
// Enable player login by default for new games, unless a tutorial is running.
116+
!!currentlyRunningInAppTutorial ? false : true
112117
);
113118
const newProjectsDefaultFolder = app
114119
? findEmptyPathInWorkspaceFolder(app, values.newProjectsDefaultFolder || '')

0 commit comments

Comments
 (0)