From 6d5208e8b5b1d9b7bbfc027fae62d826e423661e Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Wed, 15 Apr 2026 10:04:23 +0200 Subject: [PATCH] Add position option to NPC creation and update tests --- tests/domain/runtime-interaction-system.test.ts | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/tests/domain/runtime-interaction-system.test.ts b/tests/domain/runtime-interaction-system.test.ts index ac7b9e24..9d284d50 100644 --- a/tests/domain/runtime-interaction-system.test.ts +++ b/tests/domain/runtime-interaction-system.test.ts @@ -183,13 +183,16 @@ function createRuntimeNpcFixture(options: { title: string; text: string; speakerName?: string | null; + position?: { x: number; y: number; z: number }; }): RuntimeSceneDefinition["entities"]["npcs"][number] { + const position = options.position ?? { x: 0, y: 0, z: 0 }; + return { entityId: options.entityId, actorId: `${options.entityId}-actor`, name: undefined, visible: true, - position: { x: 0, y: 0, z: 0 }, + position, yawDegrees: 0, modelAssetId: null, dialogues: [ @@ -631,7 +634,8 @@ describe("RuntimeInteractionSystem", () => { dialogueId: "dialogue-console", title: "Console", speakerName: "System", - text: "Access granted." + text: "Access granted.", + position: { x: 10, y: 0, z: 0 } }) ]; runtimeScene.sequences.sequences["sequence-console-dialogue"] = @@ -682,7 +686,8 @@ describe("RuntimeInteractionSystem", () => { dialogueId: "dialogue-sequence", title: "Sequence Dialogue", speakerName: "Console", - text: "Sequence started." + text: "Sequence started.", + position: { x: 10, y: 0, z: 0 } }) ]; runtimeScene.sequences.sequences["sequence-console-dialogue"] = @@ -733,7 +738,8 @@ describe("RuntimeInteractionSystem", () => { dialogueId: "dialogue-console", title: "Console", speakerName: "System", - text: "Console online." + text: "Console online.", + position: { x: 10, y: 0, z: 0 } }) ]; runtimeScene.sequences.sequences["sequence-console-dialogue"] =