- Add persistent 💤 emoji over sleeping NPCs (tracks sprite position)
- Buffer history events (inventions, narration, stockpile) in SocketClient
to fix race condition where data arrived before GameScene handlers registered
- Fix NPCs getting stuck on 'gather' goal: tree trunks are both obstacles
and resource tiles, so pathfinding always failed. Now findNearestResource
returns adjacent walkable tiles for non-walkable resources, and
gatheringSystem checks adjacent tiles. Added wander fallback when
pathfinding to any gather target fails.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire SocketClient to receive memory-event and memory-history socket
events. GameScene stores per-NPC memory events and updates the info
panel in follow mode. NpcInfoPanel gains a third "History" tab showing
a reverse-chronological event log with emoji icons per event type.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Implements LLM-powered narration for NPC social interactions:
- Rate limits updated to 20 RPM / 1000 per day (OpenRouter free tier)
- NarrationEvent type with template fallback text generator
- NarrationService with rolling event buffer and LLM priority queuing
- Narration emitter wired between social and relationship systems
- Socket.io events for real-time narration delivery
- Tabbed left panel (Stats + Events) replacing old Superlatives panel
- Recent events section in NPC info panel
- Follow tracking via socket for LLM narration priority
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Restore subscribeSuperlatives/unsubscribeSuperlatives/onSuperlativesUpdate
on SocketClient (lost during Task 5 refactor)
- Fix EventsFeed.updateEvent to rebuild entire element when LLM narration
arrives (names may be in different positions)
- Remove dead setFollowedEntity method from GameLoop (replaced by
SocketServer.rebuildFollowedEntityIds)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds follow-npc client event so the server knows which NPCs are being
watched, enabling priority LLM narration for followed entity interactions.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire narration events through the socket layer so clients receive
real-time narration updates. Server emits narration-event on creation,
narration-update when LLM text arrives, and narration-history on connect.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>