Refresh the homepage and improve export and draft guidance

This commit is contained in:
2026-10-04 17:48:39 +05:00
parent 04cc4f39f6
commit 244d27a309
33 changed files with 2110 additions and 215 deletions

View File

@@ -56,6 +56,23 @@ export const datasetSchema = z
.max(4096),
})
.superRefine((d, ctx) => {
const paths = new Set(d.assets.map((asset) => asset.path));
const requiredPaths =
d.source === "plugin"
? ["terrain.json.gz"]
: [
"map.png",
...d.viewpoints.flatMap((point) =>
faces.map((face) => `${point.id}/${face}.png`),
),
];
for (const path of requiredPaths) {
if (!paths.has(path))
ctx.addIssue({
code: "custom",
message: `Missing required export asset: ${path}`,
});
}
if (new Set(d.viewpoints.map((p) => p.id)).size !== d.viewpoints.length)
ctx.addIssue({ code: "custom", message: "Viewpoint IDs must be unique" });
if (new Set(d.assets.map((a) => a.path)).size !== d.assets.length)