From 096597e7e564bf7cd774c20810b25ff37c917c93 Mon Sep 17 00:00:00 2001 From: root Date: Sun, 8 Mar 2026 22:44:59 +0000 Subject: [PATCH] feat(loop): register ItemRegistry and load resource tiles Co-Authored-By: Claude Opus 4.6 --- server/src/game/GameLoop.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/server/src/game/GameLoop.ts b/server/src/game/GameLoop.ts index b15ad8b..77e3034 100644 --- a/server/src/game/GameLoop.ts +++ b/server/src/game/GameLoop.ts @@ -9,6 +9,7 @@ import { socialSystem } from '../systems/socialSystem.js'; import { statModifierSystem } from '../systems/statModifierSystem.js'; import { relationshipSystem } from '../systems/relationshipSystem.js'; import { createBondRegistry } from '../systems/bondRegistry.js'; +import { ItemRegistry } from '../industry/itemRegistry.js'; import { spawnNPC } from './spawner.js'; import { createLlmService, type LlmService } from '../llm/llmService.js'; import { generateBackstory } from '../llm/backstoryGenerator.js'; @@ -33,6 +34,7 @@ export class GameLoop { constructor() { this.world = new World(); this.world.setSingleton('bondRegistry', createBondRegistry()); + this.world.setSingleton('itemRegistry', ItemRegistry.createDefault()); this.map = new GameMap(); this.llmService = createLlmService(); this.narrationService = createNarrationService(this.llmService); @@ -51,6 +53,9 @@ export class GameLoop { this.map.trunkDecorations = generated.trunkDecorations; this.map.loadObstacles(generated.obstacles); + // Load resource tiles + this.map.resourceTiles = generated.resourceTiles; + // Points of interest from generator for (const pos of generated.foodPositions) { this.map.addPointOfInterest({ type: 'food', position: pos });