From e1a25899f5fd08c86277044567439c3687bff80b Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 01:34:07 +0200 Subject: [PATCH] Add control effect validation in scene-document-validation.ts --- src/document/scene-document-validation.ts | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/src/document/scene-document-validation.ts b/src/document/scene-document-validation.ts index 6be06e33..7165cb73 100644 --- a/src/document/scene-document-validation.ts +++ b/src/document/scene-document-validation.ts @@ -7,6 +7,11 @@ import { } from "../assets/project-assets"; import type { ModelInstance } from "../assets/model-instances"; import { isModelInstanceCollisionMode } from "../assets/model-instances"; +import { + type ControlEffect, + type InteractionControlTargetRef, + type LightControlTargetRef +} from "../controls/control-surface"; import { WHITEBOX_SELECTION_MODES } from "../core/whitebox-selection-mode"; import { isNpcPresenceMode, @@ -3071,14 +3076,12 @@ function validateInteractionLink( break; } - default: - diagnostics.push( - createDiagnostic( - "error", - "unsupported-interaction-action", - `Unsupported interaction action ${(link.action as { type: string }).type}.`, - `${path}.action.type` - ) + case "control": + validateControlEffect( + link.action.effect, + `${path}.action.effect`, + document, + diagnostics ); break; }