diff --git a/src/app/App.tsx b/src/app/App.tsx index b5ebd9fd..ac592241 100644 --- a/src/app/App.tsx +++ b/src/app/App.tsx @@ -292,7 +292,10 @@ import { } from "../entities/entity-labels"; import { listNpcActorUsages } from "../entities/npc-actor-registry"; import { + formatControlEffectValue, + formatControlTargetRef, areInteractionLinksEqual, + createControlInteractionLink, createPlayAnimationInteractionLink, createPlaySoundInteractionLink, createStopAnimationInteractionLink, @@ -1197,6 +1200,8 @@ function getInteractionActionLabel(link: InteractionLink): string { return "Play Sound"; case "stopSound": return "Stop Sound"; + case "control": + return "Control Effect"; } } @@ -6626,6 +6631,14 @@ export function App({ store, initialStatusMessage }: AppProps) { targetSoundEmitterId: link.action.targetSoundEmitterId }); break; + case "control": + nextLink = createControlInteractionLink({ + id: link.id, + sourceEntityId: link.sourceEntityId, + trigger, + effect: link.action.effect + }); + break; } commitInteractionLinkChange( @@ -6645,6 +6658,13 @@ export function App({ store, initialStatusMessage }: AppProps) { return; } + if (actionType === "control") { + setStatusMessage( + "Control links are not authored from this inspector yet." + ); + return; + } + if (actionType === "teleportPlayer") { const defaultTarget = teleportTargetOptions[0]?.entity; @@ -7119,6 +7139,7 @@ export function App({ store, initialStatusMessage }: AppProps) { + @@ -7297,7 +7318,7 @@ export function App({ store, initialStatusMessage }: AppProps) { - ) : ( + ) : link.action.type === "stopAnimation" ? (