mirror of
https://gitea.tendokyu.moe/ppc/amnet.git
synced 2026-10-09 07:00:06 +03:00
remove enum, replace with string-only method
This commit is contained in:
+16
-31
@@ -1,37 +1,22 @@
|
||||
export enum GameId {
|
||||
/**
|
||||
* Initial D The Arcade
|
||||
*/
|
||||
IDAC = "SDGT",
|
||||
|
||||
/**
|
||||
* Chunithm (Paradise Lost)
|
||||
*/
|
||||
Chuni = "SDBT",
|
||||
|
||||
/**
|
||||
* Chunithm NEW onwards
|
||||
*/
|
||||
Chusan = "SDHD",
|
||||
|
||||
ONGEKI = "SDDT",
|
||||
maimaiDX = "SDEZ",
|
||||
DivaFT = "SBZV"
|
||||
}
|
||||
|
||||
export function getGameName(id: GameId) {
|
||||
switch (id) {
|
||||
case GameId.IDAC:
|
||||
/**
|
||||
* Get the game name from the game identifier (4-letter code)
|
||||
* @param id
|
||||
*/
|
||||
export function getGameName(id: string): string | null {
|
||||
switch (id?.toUpperCase()) {
|
||||
case "SDGT":
|
||||
return "Initial D The Arcade";
|
||||
case GameId.Chuni:
|
||||
case "SDHD":
|
||||
case "SDBT":
|
||||
return "CHUNITHM";
|
||||
case GameId.Chusan:
|
||||
return "CHUNITHM (Paradise Lost)";
|
||||
case GameId.ONGEKI:
|
||||
return "O.N.G.E.K.I";
|
||||
case GameId.maimaiDX:
|
||||
case "SDDT":
|
||||
return "O.N.G.E.K.I.";
|
||||
case "SDEZ":
|
||||
return "maimai DX";
|
||||
case GameId.DivaFT:
|
||||
case "SBZV":
|
||||
return "Project DIVA Future Tone";
|
||||
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user