From ac27ab7e3e91febbbfef4907d6cd2d066fe6fd81 Mon Sep 17 00:00:00 2001 From: Benedicte Quimbert Date: Mon, 3 Jan 2022 11:22:01 +0100 Subject: [PATCH] Revert "WIP enable/disable tutorial according to the map 'tutorial' property" This reverts commit 47a6710b60e3856bf57c0700fe33bec95c6fc6dd. --- front/src/Phaser/Game/GameMapProperties.ts | 1 - front/src/Phaser/Game/GameScene.ts | 8 -------- 2 files changed, 9 deletions(-) diff --git a/front/src/Phaser/Game/GameMapProperties.ts b/front/src/Phaser/Game/GameMapProperties.ts index 2da56ef8..65ce6ab8 100644 --- a/front/src/Phaser/Game/GameMapProperties.ts +++ b/front/src/Phaser/Game/GameMapProperties.ts @@ -31,7 +31,6 @@ export enum GameMapProperties { SILENT = "silent", START = "start", START_LAYER = "startLayer", - TUTORIAL = "tutorial", URL = "url", WRITABLE_BY = "writableBy", ZONE = "zone", diff --git a/front/src/Phaser/Game/GameScene.ts b/front/src/Phaser/Game/GameScene.ts index e32fa98a..69683e25 100644 --- a/front/src/Phaser/Game/GameScene.ts +++ b/front/src/Phaser/Game/GameScene.ts @@ -603,10 +603,6 @@ export class GameScene extends DirtyScene { for (const script of scripts) { scriptPromises.push(iframeListener.registerScript(script)); } - if (this.isTutorialEnabled()) { - //TODO: split tutorial and bundle scripts - scriptPromises.push(iframeListener.registerScript(new URL("bundle.js", this.MapUrlFile).toString())); - } this.userInputManager.spaceEvent(() => { this.outlinedItem?.activate(); @@ -1572,10 +1568,6 @@ ${escapedMessage} ); } - private isTutorialEnabled(): boolean { - return this.getProperty(this.mapFile, GameMapProperties.TUTORIAL) as boolean; - } - private getProperty(layer: ITiledMapLayer | ITiledMap, name: string): string | boolean | number | undefined { const properties: ITiledMapProperty[] | undefined = layer.properties; if (!properties) {