Resolves #1134 -- show solution on gist levels

This commit is contained in:
Peter Cottle 2024-03-30 18:18:39 -04:00
parent ac94520a99
commit b86a9d704c

View file

@ -271,7 +271,7 @@ var Level = Sandbox.extend({
); );
log.showLevelSolution(this.getEnglishName()); log.showLevelSolution(this.getEnglishName());
}.bind(this); }.bind(this);
var commandStr = command.get('rawStr'); var commandStr = command.get('rawStr');
if (!this.testOptionOnString(commandStr, 'noReset')) { if (!this.testOptionOnString(commandStr, 'noReset')) {
toIssue = 'reset --forSolution; ' + toIssue; toIssue = 'reset --forSolution; ' + toIssue;
@ -282,7 +282,9 @@ var Level = Sandbox.extend({
return; return;
} }
if(!LevelStore.isLevelSolved(this.level.id)){ // if the level doesn't have an ID, its a GIST import and
// we don't need to worry about the solved map regardless
if(this.level.id && !LevelStore.isLevelSolved(this.level.id)){
// allow them for force the solution // allow them for force the solution
var confirmDefer = Q.defer(); var confirmDefer = Q.defer();
var dialog = intl.getDialog(require('../dialogs/confirmShowSolution'))[0]; var dialog = intl.getDialog(require('../dialogs/confirmShowSolution'))[0];