Add profile photo uploads and custom difficulty support
This commit is contained in:
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user