mirror of
https://github.com/hydralauncher/hydra.git
synced 2025-03-09 15:40:26 +00:00
feat: added helper functions to the game status to keep it simple to read.
This commit is contained in:
parent
666b1afcb6
commit
f1d2a88442
8 changed files with 46 additions and 30 deletions
|
@ -7,4 +7,20 @@ export enum GameStatus {
|
|||
Cancelled = "cancelled",
|
||||
Finished = "finished",
|
||||
Decompressing = "decompressing",
|
||||
}
|
||||
|
||||
export namespace GameStatus {
|
||||
export const isDownloading = (status: GameStatus | "") =>
|
||||
status === GameStatus.Downloading ||
|
||||
status === GameStatus.DownloadingMetadata ||
|
||||
status === GameStatus.CheckingFiles;
|
||||
|
||||
export const isVerifying = (status: GameStatus | "") =>
|
||||
GameStatus.DownloadingMetadata == status ||
|
||||
GameStatus.CheckingFiles == status ||
|
||||
GameStatus.Decompressing == status;
|
||||
|
||||
export const isReady = (status: GameStatus | "") =>
|
||||
status === GameStatus.Finished ||
|
||||
status === GameStatus.Seeding;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue