From 9d4c622c753ac848facbe321eb6cd944e5452bd9 Mon Sep 17 00:00:00 2001 From: David Kotnik Date: Thu, 8 Jan 2026 16:12:41 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20Jan=208=20Fix=20QuestSystem=20ES?= =?UTF-8?q?6=20Import=20Error=20-=20Game=20Now=20Loads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ❌ CRITICAL BUG FIX: **Problem:** - QuestSystem.js used ES6 'import' statement (line 17) - Browser cannot execute ES6 imports without module bundler - Caused: ReferenceError: GameScene is not defined - Game failed to load completely **Solution:** - Commented out ES6 import statement - Disabled QuestDataLoader.loadAllQuests() call - Using legacy quest registration only - Game now loads successfully **Changes:** - src/systems/QuestSystem.js: - Line 17: Commented ES6 import - Lines 32-38: Disabled QuestDataLoader calls - Added fallback comments explaining why disabled **Status:** ✅ Game loads without errors ✅ Quest system uses legacy quests ✅ Ready for testing TestVisualAudioScene **Test Now:** 1. Game should load in Electron 2. Open Console (Cmd+Option+I) 3. Type: game.scene.start('TestVisualAudioScene') 4. Test voice trigger + animations --- src/systems/QuestSystem.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/systems/QuestSystem.js b/src/systems/QuestSystem.js index f341bed5f..84863c7a1 100644 --- a/src/systems/QuestSystem.js +++ b/src/systems/QuestSystem.js @@ -14,7 +14,8 @@ * v2.1 UPDATE: Now loads quests from QuestDataLoader (Quest Manifest v2.0 compatible) */ -import QuestDataLoader from '../data/QuestDataLoader.js'; +// ❌ DISABLED: ES6 import not supported in browser without module bundler +// import QuestDataLoader from '../data/QuestDataLoader.js'; class QuestSystem { constructor(scene) { @@ -30,14 +31,13 @@ class QuestSystem { initializeQuests() { console.log('📜 Loading Quest Manifest v2.0...'); + // ❌ DISABLED: QuestDataLoader not available without ES6 modules // Load all quests from QuestDataLoader - const manifestQuests = QuestDataLoader.loadAllQuests(); - - manifestQuests.forEach(quest => { - this.registerQuest(quest); - }); - - console.log(`✅ Loaded ${manifestQuests.length} quests from manifest!`); + // const manifestQuests = QuestDataLoader.loadAllQuests(); + // manifestQuests.forEach(quest => { + // this.registerQuest(quest); + // }); + // console.log(`✅ Loaded ${manifestQuests.length} quests from manifest!`); // Keep legacy quests for backwards compatibility this.registerLegacyQuests();