Add Void difficulty and publish changelogs
Some checks failed
Deploy MineGeo to Dokploy / deploy (push) Failing after 3m40s

This commit is contained in:
2026-10-20 14:05:01 +05:00
parent 3ba398a838
commit de0e891b62
37 changed files with 995 additions and 65 deletions

View File

@@ -16,17 +16,24 @@ export const tournamentSettings = z
name: safeName,
datasetId: z.string().uuid(),
difficulty: z.union([
z.enum(["easy", "normal", "hard"]),
z.enum(["easy", "normal", "hard", "void"]),
z.string().uuid(),
]),
playerLimit: z.number().int().min(2).max(32),
roundCount: z.number().int().min(1).max(10),
roundTimeSeconds: z.number().int().min(15).max(3000).multipleOf(15),
roundTimeSeconds: z.number().int().min(10).max(3000),
timerMode: z.enum(["shared", "perMini"]).default("shared"),
startsAt: z.string().datetime({ offset: true }),
announceDiscord: z.boolean(),
})
.strict()
.refine(
(value) =>
value.difficulty === "void"
? value.timerMode === "perMini" && value.roundTimeSeconds === 10
: value.roundTimeSeconds >= 15 && value.roundTimeSeconds % 15 === 0,
"Void requires a separate 10-second timer; other tournament timers use 15-second steps",
)
.refine(
(value) => value.timerMode !== "perMini" || value.roundTimeSeconds <= 600,
"Mini-round timers allow at most 600 seconds",