feat: initialize bond registry singleton and update spawner

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
root
2026-03-07 19:21:54 +00:00
parent f8ad3a6f0c
commit db808bca86
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -7,6 +7,7 @@ import { movementSystem } from '../systems/movementSystem.js';
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 { spawnNPC } from './spawner.js';
export class GameLoop {
@@ -18,6 +19,7 @@ export class GameLoop {
constructor() {
this.world = new World();
this.world.setSingleton('bondRegistry', createBondRegistry());
this.map = new GameMap();
this.setupMap();
this.spawnInitialNPCs(8);
+3
View File
@@ -37,6 +37,9 @@ export function spawnNPC(world: World, map: GameMap, positionHint?: Position): E
globalCooldown: 0,
pairCooldowns: new Map(),
lastOutcome: null,
proposalCooldown: 0,
pendingProposal: null,
isProposalInteraction: false,
});
world.addComponent<Stats>(entity, 'stats', generateStats());
world.addComponent<StatModifiers>(entity, 'statModifiers', { modifiers: [] });