Remove unused StartDialogueAction and related functions
This commit is contained in:
@@ -48,11 +48,6 @@ export interface StopSoundAction {
|
|||||||
targetSoundEmitterId: string;
|
targetSoundEmitterId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface StartDialogueAction {
|
|
||||||
type: "startDialogue";
|
|
||||||
dialogueId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface RunSequenceAction {
|
export interface RunSequenceAction {
|
||||||
type: "runSequence";
|
type: "runSequence";
|
||||||
sequenceId: string;
|
sequenceId: string;
|
||||||
@@ -70,7 +65,6 @@ export type InteractionAction =
|
|||||||
| StopAnimationAction
|
| StopAnimationAction
|
||||||
| PlaySoundAction
|
| PlaySoundAction
|
||||||
| StopSoundAction
|
| StopSoundAction
|
||||||
| StartDialogueAction
|
|
||||||
| RunSequenceAction
|
| RunSequenceAction
|
||||||
| ControlInteractionAction;
|
| ControlInteractionAction;
|
||||||
|
|
||||||
@@ -126,13 +120,6 @@ export interface CreateStopSoundInteractionLinkOptions {
|
|||||||
targetSoundEmitterId: string;
|
targetSoundEmitterId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CreateStartDialogueInteractionLinkOptions {
|
|
||||||
id?: string;
|
|
||||||
sourceEntityId: string;
|
|
||||||
trigger?: InteractionTriggerKind;
|
|
||||||
dialogueId: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export interface CreateControlInteractionLinkOptions {
|
export interface CreateControlInteractionLinkOptions {
|
||||||
id?: string;
|
id?: string;
|
||||||
sourceEntityId: string;
|
sourceEntityId: string;
|
||||||
@@ -188,11 +175,6 @@ function cloneAction(action: InteractionAction): InteractionAction {
|
|||||||
type: "stopSound",
|
type: "stopSound",
|
||||||
targetSoundEmitterId: action.targetSoundEmitterId
|
targetSoundEmitterId: action.targetSoundEmitterId
|
||||||
};
|
};
|
||||||
case "startDialogue":
|
|
||||||
return {
|
|
||||||
type: "startDialogue",
|
|
||||||
dialogueId: action.dialogueId
|
|
||||||
};
|
|
||||||
case "runSequence":
|
case "runSequence":
|
||||||
return {
|
return {
|
||||||
type: "runSequence",
|
type: "runSequence",
|
||||||
@@ -342,23 +324,6 @@ export function createStopSoundInteractionLink(
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
export function createStartDialogueInteractionLink(
|
|
||||||
options: CreateStartDialogueInteractionLinkOptions
|
|
||||||
): InteractionLink {
|
|
||||||
assertNonEmptyString(options.sourceEntityId, "Interaction source entity id");
|
|
||||||
assertNonEmptyString(options.dialogueId, "Dialogue id");
|
|
||||||
|
|
||||||
return {
|
|
||||||
id: options.id ?? createOpaqueId("interaction-link"),
|
|
||||||
sourceEntityId: options.sourceEntityId,
|
|
||||||
trigger: options.trigger ?? "enter",
|
|
||||||
action: {
|
|
||||||
type: "startDialogue",
|
|
||||||
dialogueId: options.dialogueId
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
export function createControlInteractionLink(
|
export function createControlInteractionLink(
|
||||||
options: CreateControlInteractionLinkOptions
|
options: CreateControlInteractionLinkOptions
|
||||||
): InteractionLink {
|
): InteractionLink {
|
||||||
@@ -418,7 +383,6 @@ export function getInteractionActionControlEffect(
|
|||||||
return createStopSoundControlEffect({
|
return createStopSoundControlEffect({
|
||||||
target: createSoundEmitterControlTargetRef(action.targetSoundEmitterId)
|
target: createSoundEmitterControlTargetRef(action.targetSoundEmitterId)
|
||||||
});
|
});
|
||||||
case "startDialogue":
|
|
||||||
case "runSequence":
|
case "runSequence":
|
||||||
return null;
|
return null;
|
||||||
case "control":
|
case "control":
|
||||||
@@ -443,8 +407,6 @@ export function getInteractionActionLabel(action: InteractionAction): string {
|
|||||||
return "Play Sound";
|
return "Play Sound";
|
||||||
case "stopSound":
|
case "stopSound":
|
||||||
return "Stop Sound";
|
return "Stop Sound";
|
||||||
case "startDialogue":
|
|
||||||
return "Start Dialogue";
|
|
||||||
case "runSequence":
|
case "runSequence":
|
||||||
return "Run Sequence";
|
return "Run Sequence";
|
||||||
case "control":
|
case "control":
|
||||||
@@ -512,11 +474,6 @@ export function areInteractionLinksEqual(
|
|||||||
left.action.targetSoundEmitterId ===
|
left.action.targetSoundEmitterId ===
|
||||||
(right.action as StopSoundAction).targetSoundEmitterId
|
(right.action as StopSoundAction).targetSoundEmitterId
|
||||||
);
|
);
|
||||||
case "startDialogue":
|
|
||||||
return (
|
|
||||||
left.action.dialogueId ===
|
|
||||||
(right.action as StartDialogueAction).dialogueId
|
|
||||||
);
|
|
||||||
case "runSequence":
|
case "runSequence":
|
||||||
return (
|
return (
|
||||||
left.action.sequenceId === (right.action as RunSequenceAction).sequenceId
|
left.action.sequenceId === (right.action as RunSequenceAction).sequenceId
|
||||||
|
|||||||
Reference in New Issue
Block a user