Add profile photo uploads and custom difficulty support

This commit is contained in:
2026-10-13 20:50:54 +05:00
parent 8c3de302e7
commit de812453ec
37 changed files with 1139 additions and 74 deletions

View File

@@ -1,11 +1,14 @@
import { z } from "zod";
import { displayNameSchema } from "./account";
import type { Bounds, Difficulty } from "./protocol";
import type { Bounds, DifficultyPreset } from "./protocol";
export const createRoomSchema = z
.object({
datasetId: z.string().uuid(),
difficulty: z.enum(["easy", "normal", "hard"]),
difficulty: z.union([
z.enum(["easy", "normal", "hard"]),
z.string().uuid(),
]),
playerLimit: z.number().int().min(2).max(16),
})
.strict();
@@ -53,7 +56,8 @@ export type RoomView = {
id: string;
datasetId: string;
name: string;
difficulty: Difficulty;
difficulty: string;
difficultySettings: DifficultyPreset;
playerLimit: number;
playerCount: number;
status: "lobby" | "loading" | "playing" | "results" | "finished" | "closed";