feat: wire backstory generation into NPC spawn flow
Trigger fire-and-forget backstory generation whenever an NPC spawns, both during initial spawn and via player spawn-npc requests. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -70,7 +70,8 @@ export class SocketServer {
|
||||
|
||||
const target = map.findNearestWalkable(data.x, data.y, 3)
|
||||
?? map.getRandomWalkable();
|
||||
spawnNPC(world, map, target);
|
||||
const npcEntity = spawnNPC(world, map, target);
|
||||
this.gameLoop.generateNpcBackstory(npcEntity);
|
||||
});
|
||||
|
||||
// Handle superlatives subscription
|
||||
|
||||
Reference in New Issue
Block a user