Edit research branches in local saves

This commit is contained in:
N0VAN0M4LY committed 2026-11-29 16:16:42 +08:00
1 parent 3e2acc5a17
commit 3e08e9314e
14 files changed
+291 -15

No files matched your search

+13
View File
@@ -64,6 +64,19 @@ export const OfficialPreviewSchema = z.object({
vehicles: z.array(z.string()),
omitted: z.array(z.string()),
});
export const ResearchBranchSchema = z.object({ country: z.string().min(1), type: z.string().min(1) });
export const ResearchOperationSchema = z.enum(['research', 'purchase', 'equipment']);
export const SaveResearchSchema = z.object({
branches: z.array(ResearchBranchSchema),
selected: ResearchBranchSchema.nullable(),
vehicles: z.array(z.object({
name: z.string(), rank: z.number(), owned: z.boolean(), points: z.number(), needed: z.number(),
})),
});
export type ResearchBranch = z.output<typeof ResearchBranchSchema>;
export type ResearchOperation = z.output<typeof ResearchOperationSchema>;
export type SaveResearch = z.output<typeof SaveResearchSchema>;
export type OfficialPreview = z.output<typeof OfficialPreviewSchema>;
export type OfficialImportOptions = z.output<typeof OfficialImportOptionsSchema>;