feat: initialize bond registry singleton and update spawner
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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: [] });
|
||||
|
||||
Reference in New Issue
Block a user