-
-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #16 from zeph-yr/master
Get BlockHitScore, Score, MaxScore
- Loading branch information
Showing
5 changed files
with
136 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
using DataPuller.Client; | ||
using HarmonyLib; | ||
|
||
namespace DataPuller | ||
{ | ||
[HarmonyPatch(typeof(BeatmapObjectExecutionRatingsRecorder), "HandleScoringForNoteDidFinish")] | ||
internal class HandleScoringForNoteDidFinishPatch | ||
{ | ||
static void Postfix(ScoringElement scoringElement) | ||
{ | ||
//Plugin.Logger.Debug("in Postfix"); | ||
|
||
if (scoringElement != null) | ||
{ | ||
/*NoteData noteData = scoringElement.noteData; | ||
if (noteData.colorType == ColorType.None) | ||
{ | ||
LiveData.FullCombo = false; | ||
}*/ | ||
|
||
GoodCutScoringElement goodCutScoringElement; | ||
if ((goodCutScoringElement = (scoringElement as GoodCutScoringElement)) != null) | ||
{ | ||
LiveData.Combo++; | ||
LiveData.BlockHitScore = new int[] {goodCutScoringElement.cutScoreBuffer.beforeCutScore, goodCutScoringElement.cutScoreBuffer.afterCutScore, goodCutScoringElement.cutScoreBuffer.centerDistanceCutScore}; | ||
LiveData.Score += goodCutScoringElement.cutScore * goodCutScoringElement.multiplier; | ||
LiveData.MaxScore += goodCutScoringElement.maxPossibleCutScore * goodCutScoringElement.multiplier; | ||
|
||
Plugin.Logger.Info("Postfix: " + LiveData.Combo + " " + LiveData.BlockHitScore[0] + "," + LiveData.BlockHitScore[1] + "," + LiveData.BlockHitScore[2] + " " + LiveData.Score + " " + LiveData.MaxScore); | ||
} | ||
|
||
/*if (scoringElement is BadCutScoringElement) | ||
{ | ||
LiveData.Misses++; | ||
LiveData.FullCombo = false; | ||
} | ||
if (scoringElement is MissScoringElement) | ||
{ | ||
LiveData.Misses++; | ||
LiveData.FullCombo = false; | ||
}*/ | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters