Skip to content

Commit

Permalink
Lamp detection from judgements
Browse files Browse the repository at this point in the history
  • Loading branch information
Gyoo committed Aug 22, 2024
1 parent 0b82e64 commit 472c7e9
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions src/components/main/main.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,24 @@ export class MainComponent {
this.playstyle.setValue(prev, {emitEvent: false});
}
}
});
this.group.statusChanges.subscribe(status => {
if(status === "VALID" && (!!this.group.controls.judgements.controls.marvelous.value || this.group.controls.judgements.controls.marvelous.value === 0)){
let lamp = "MARVELOUS FULL COMBO";
if(this.group.controls.judgements.controls.perfect.value > 0){
lamp = "PERFECT FULL COMBO";
}
if(this.group.controls.judgements.controls.great.value > 0){
lamp = "GREAT FULL COMBO";
}
if(this.group.controls.judgements.controls.good.value > 0){
lamp = "FULL COMBO";
}
if(this.group.controls.judgements.controls.miss.value > 0){
lamp = "CLEAR";
}
this.group.controls.lamp.setValue(lamp);
}
})
}

Expand Down

0 comments on commit 472c7e9

Please sign in to comment.