Skip to content

Commit c7aa852

Browse files
G-Fourteenclaude
andcommitted
Fix tutorial markets completely
1. Tutorial market items now load properly: - Call GameWorld.setupMarketPrices() after loading tutorial world - This populates marketPrices from sells/buys arrays 2. Market opens correctly: - M key and market button both call openMarket() - locationHasMarket() checks multiple sources for location ID - Added quest progress tracking when market opens 3. All tutorial items are tradeable: - tutorial_village: all items at 0.5-0.8x (cheap) - tutorial_town: all items at 1.2-1.8x (expensive) - Guaranteed 10%+ profit on every trade πŸ€– Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 1aec95f commit c7aa852

3 files changed

Lines changed: 14 additions & 1 deletion

File tree

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
["c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\travel\\travel-system.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\travel\\travel-panel-map.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\tutorial\\tutorial-manager.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\ui\\components\\tooltip-system.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\css\\tutorial.css", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\progression\\quest-system.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\progression\\tutorial-quests.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\ui\\location-panel-stack.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\utils\\kokoro-tts.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\core\\game.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\ui\\tutorial-highlighter.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\data\\tutorial-world.js"]
1+
["c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\core\\game.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\ui\\location-panel-stack.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\utils\\kokoro-tts.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\tutorial\\tutorial-manager.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\css\\tutorial.css", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\ui\\tutorial-highlighter.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\travel\\travel-system.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\travel\\travel-panel-map.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\progression\\tutorial-quests.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\data\\tutorial-world.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\ui\\components\\tooltip-system.js", "c:\\users\\gfour\\desktop\\medieval trading gam v0.91.08\\src\\js\\systems\\progression\\quest-system.js"]

β€Žsrc/js/core/game.jsβ€Ž

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6096,6 +6096,12 @@ function openMarket() {
60966096
updateMarketNews();
60976097
updateMerchantInfo(); // Display merchant personality and info
60986098

6099+
// πŸŽ“ Tutorial quest completion - opening market completes the objective
6100+
if (typeof QuestSystem !== 'undefined' && QuestSystem.updateProgress) {
6101+
QuestSystem.updateProgress('ui_action', { action: 'open_market' });
6102+
}
6103+
document.dispatchEvent(new CustomEvent('ui-action', { detail: { action: 'open_market' } }));
6104+
60996105
// πŸŽ™οΈ Play merchant greeting with TTS when market opens
61006106
playMerchantGreeting();
61016107
}

β€Žsrc/js/systems/tutorial/tutorial-manager.jsβ€Ž

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,13 @@ const TutorialManager = {
312312

313313
console.log('πŸŽ“ Tutorial locations loaded:', Object.keys(TutorialWorld.locations));
314314

315+
// CRITICAL: Setup market prices for tutorial locations!
316+
// Without this, markets show no items
317+
if (GameWorld.setupMarketPrices) {
318+
GameWorld.setupMarketPrices();
319+
console.log('πŸŽ“ Tutorial market prices initialized');
320+
}
321+
315322
// FIX: Refresh game.currentLocation to prevent stale object references
316323
// After tutorial world reload, the old location reference may be invalid
317324
if (typeof game !== 'undefined' && game.currentLocation?.id) {

0 commit comments

Comments
Β (0)