Skip to content

Commit

Permalink
Mod value fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cmyui committed Jul 24, 2024
1 parent 6377b8e commit f9ed244
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions src/gameModes.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import { Mods } from "./utils/mods"

export enum GameMode {
Standard = 0,
Taiko = 1,
Expand Down Expand Up @@ -30,9 +32,9 @@ export const isRealGameMode = (gameMode: GameMode, relaxMode: RelaxMode) => {
}

export const getRelaxModeFromMods = (mods: number) => {
if (mods & 8192) {
if (mods & Mods.AUTOPILOT) {
return RelaxMode.Autopilot
} else if (mods & 64) {
} else if (mods & Mods.RELAX) {
return RelaxMode.Relax
} else {
return RelaxMode.Vanilla
Expand Down
2 changes: 1 addition & 1 deletion src/utils/mods.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
enum Mods {
export enum Mods {
NOMOD = 0,
NOFAIL = 1 << 0,
EASY = 1 << 1,
Expand Down

0 comments on commit f9ed244

Please sign in to comment.