diff --git a/client/src/scenes/GameScene.ts b/client/src/scenes/GameScene.ts index 78a8928..b29176b 100644 --- a/client/src/scenes/GameScene.ts +++ b/client/src/scenes/GameScene.ts @@ -243,9 +243,6 @@ export class GameScene extends Phaser.Scene { const followed = this.entitySprites.get(followedId); if (followed) { this.npcInfoPanel.updateInfo(followed.lastState); - if (followed.lastState.needs) { - this.npcInfoPanel.updateNeeds(followed.lastState.needs); - } } } } @@ -354,14 +351,18 @@ export class GameScene extends Phaser.Scene { } private getNpcIds(): number[] { - return [...this.entitySprites.keys()].sort((a, b) => a - b); + return [...this.entitySprites.entries()] + .filter(([, es]) => !es.lastState.playerControlled) + .map(([id]) => id) + .sort((a, b) => a - b); } private updateModeText(): void { if (this.mode === 'follow') { const npcIds = this.getNpcIds(); const targetId = npcIds[this.followTargetIndex]; - const label = targetId != null ? `NPC #${targetId}` : 'none'; + const es = targetId != null ? this.entitySprites.get(targetId) : undefined; + const label = es?.lastState.name ?? (targetId != null ? `NPC #${targetId}` : 'none'); this.modeText.setText(`Mode: FOLLOW: ${label} [TAB to toggle]`); } else { this.modeText.setText(`Mode: ${this.mode.toUpperCase()} [TAB to toggle]`);