Merge pull request #1724 from thecodingmachine/master
Backport fix 2022-01-13
This commit is contained in:
commit
57d2dec756
14 changed files with 353 additions and 9 deletions
|
@ -28,6 +28,7 @@ export enum GameMapProperties {
|
|||
PLAY_AUDIO_LOOP = "playAudioLoop",
|
||||
READABLE_BY = "readableBy",
|
||||
SCRIPT = "script",
|
||||
SCRIPT_DISABLE_MODULE_SUPPORT = "scriptDisableModuleSupport",
|
||||
SILENT = "silent",
|
||||
START = "start",
|
||||
START_LAYER = "startLayer",
|
||||
|
|
|
@ -597,9 +597,12 @@ export class GameScene extends DirtyScene {
|
|||
this.createPromiseResolve();
|
||||
// Now, let's load the script, if any
|
||||
const scripts = this.getScriptUrls(this.mapFile);
|
||||
const disableModuleMode = this.getProperty(this.mapFile, GameMapProperties.SCRIPT_DISABLE_MODULE_SUPPORT) as
|
||||
| boolean
|
||||
| undefined;
|
||||
const scriptPromises = [];
|
||||
for (const script of scripts) {
|
||||
scriptPromises.push(iframeListener.registerScript(script));
|
||||
scriptPromises.push(iframeListener.registerScript(script, !disableModuleMode));
|
||||
}
|
||||
|
||||
this.userInputManager.spaceEvent(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue