Resolves #764 -- disableLevelInstructions for global mode change

This commit is contained in:
Peter Cottle 2021-01-11 12:49:28 -07:00
parent ddb3dc93ca
commit 6df4d93880
5 changed files with 37 additions and 0 deletions

View file

@ -69,6 +69,13 @@ var Level = Sandbox.extend({
// if there is a multiview in the beginning, open that
// and let it resolve our deferred
if (GlobalStateStore.getShouldDisableLevelInstructions()) {
setTimeout(function() {
deferred.resolve();
}, 100);
return;
}
if (this.level.startDialog && !this.testOption('noIntroDialog')) {
new MultiView(Object.assign(
{},
@ -166,6 +173,14 @@ var Level = Sandbox.extend({
startOffCommand: function() {
var method = this.options.command.get('method');
if (GlobalStateStore.getShouldDisableLevelInstructions()) {
Main.getEventBaton().trigger(
'commandSubmitted',
'hint; show goal'
);
return;
}
if (!this.testOption('noStartCommand') && method !== 'importLevelNow') {
Main.getEventBaton().trigger(
'commandSubmitted',