Files
healer-man/src/game/dungeonReleaseStage.ts
T
2026-09-20 13:40:23 -04:00

21 lines
904 B
TypeScript

export const DUNGEON_RELEASE_STAGES = ["full-release", "beta", "alpha"] as const;
export type DungeonReleaseStage = (typeof DUNGEON_RELEASE_STAGES)[number];
export const DUNGEON_RELEASE_STAGE_LABELS: Readonly<Record<DungeonReleaseStage, string>> = {
"full-release": "Full Release",
beta: "Beta",
alpha: "Alpha",
};
export function dungeonReleaseStage(id: string): DungeonReleaseStage {
return id === "stormwind-stockade" || id === "bite-sized-stormwind-stockade" ? "beta" : "alpha";
}
export function compareDungeonReleaseOrder(
left: { readonly title: string; readonly releaseStage: DungeonReleaseStage },
right: { readonly title: string; readonly releaseStage: DungeonReleaseStage },
): number {
return DUNGEON_RELEASE_STAGES.indexOf(left.releaseStage) - DUNGEON_RELEASE_STAGES.indexOf(right.releaseStage)
|| left.title.localeCompare(right.title, "en", { sensitivity: "base" });
}