From 3e0c5a02c5c2dff53c0eb6d71431d03708bf0861 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Tue, 14 Apr 2026 23:43:50 +0200 Subject: [PATCH] Add runSequence interaction link handling and updates --- src/app/App.tsx | 51 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) diff --git a/src/app/App.tsx b/src/app/App.tsx index ba35888d..7e2cde9a 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -7828,6 +7828,14 @@ export function App({ store, initialStatusMessage }: AppProps) { dialogueId: link.action.dialogueId }); break; + case "runSequence": + nextLink = createRunSequenceInteractionLink({ + id: link.id, + sourceEntityId: link.sourceEntityId, + trigger, + sequenceId: link.action.sequenceId + }); + break; case "control": nextLink = createControlInteractionLink({ id: link.id, @@ -7885,6 +7893,29 @@ export function App({ store, initialStatusMessage }: AppProps) { return; } + if (actionType === "runSequence") { + const defaultSequence = projectImpulseSequenceList[0] ?? null; + + if (defaultSequence === null) { + setStatusMessage( + "Author a project sequence with at least one impulse step before switching this link to run sequence." + ); + return; + } + + commitInteractionLinkChange( + link, + createRunSequenceInteractionLink({ + id: link.id, + sourceEntityId: sourceEntity.id, + trigger: getCanonicalInteractionLinkTrigger(sourceEntity, link.trigger), + sequenceId: defaultSequence.id + }), + "Switched link action to run sequence." + ); + return; + } + if (actionType === "teleportPlayer") { const defaultTarget = teleportTargetOptions[0]?.entity; @@ -8063,6 +8094,26 @@ export function App({ store, initialStatusMessage }: AppProps) { ); }; + const updateSequenceInteractionLinkTarget = ( + link: InteractionLink, + sequenceId: string + ) => { + if (link.action.type !== "runSequence") { + return; + } + + commitInteractionLinkChange( + link, + createRunSequenceInteractionLink({ + id: link.id, + sourceEntityId: link.sourceEntityId, + trigger: link.trigger, + sequenceId + }), + "Updated sequence link target." + ); + }; + const updateTeleportInteractionLinkTarget = ( link: InteractionLink, targetEntityId: string