Remove unused import and function in scene-document-validation.ts
This commit is contained in:
@@ -80,10 +80,7 @@ import {
|
|||||||
isProjectScheduleWeekday,
|
isProjectScheduleWeekday,
|
||||||
type ProjectScheduler
|
type ProjectScheduler
|
||||||
} from "../scheduler/project-scheduler";
|
} from "../scheduler/project-scheduler";
|
||||||
import type {
|
import type { ProjectDialogue } from "../dialogues/project-dialogues";
|
||||||
ProjectDialogue,
|
|
||||||
ProjectDialogueLibrary
|
|
||||||
} from "../dialogues/project-dialogues";
|
|
||||||
|
|
||||||
export type SceneDiagnosticSeverity = "error" | "warning";
|
export type SceneDiagnosticSeverity = "error" | "warning";
|
||||||
export type SceneDiagnosticScope = "document" | "build";
|
export type SceneDiagnosticScope = "document" | "build";
|
||||||
@@ -4676,31 +4673,6 @@ function validateProjectDialogue(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function validateProjectDialogueLibrary(
|
|
||||||
dialogues: ProjectDialogueLibrary,
|
|
||||||
diagnostics: SceneDiagnostic[]
|
|
||||||
) {
|
|
||||||
const seenIds = new Map<string, string>();
|
|
||||||
|
|
||||||
for (const [dialogueKey, dialogue] of Object.entries(dialogues.dialogues)) {
|
|
||||||
const path = `dialogues.dialogues.${dialogueKey}`;
|
|
||||||
|
|
||||||
if (dialogue.id !== dialogueKey) {
|
|
||||||
diagnostics.push(
|
|
||||||
createDiagnostic(
|
|
||||||
"error",
|
|
||||||
"dialogue-id-mismatch",
|
|
||||||
"Dialogue ids must match their registry key.",
|
|
||||||
`${path}.id`
|
|
||||||
)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
registerAuthoredId(dialogue.id, path, seenIds, diagnostics);
|
|
||||||
validateProjectDialogue(dialogue, path, seenIds, diagnostics);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function validateProjectResources(
|
function validateProjectResources(
|
||||||
document: Pick<ProjectDocument, "materials" | "assets" | "dialogues">,
|
document: Pick<ProjectDocument, "materials" | "assets" | "dialogues">,
|
||||||
diagnostics: SceneDiagnostic[]
|
diagnostics: SceneDiagnostic[]
|
||||||
|
|||||||
Reference in New Issue
Block a user