Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
ReadieFur committed Mar 22, 2023
2 parents 238a68b + d74a596 commit b028731
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
1 change: 1 addition & 0 deletions .todo
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
ToDo:
☐ Fix accuracy being behind by 1 note
☐ Other players status in multiplayer
☐ Campaign mode data
Dev notes:
Expand Down
2 changes: 1 addition & 1 deletion beatmods.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
DataPuller

## Mod Version
2.1.0
2.1.1

## Game Version
1.21.0
Expand Down
5 changes: 3 additions & 2 deletions src/Core/MapEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ private void NoteWasMissedEvent(NoteController noteController)

private void LevelFinishedEvent() => MapData.Instance.LevelFinished = true;

//For replay mode.
//For legacy replay mode.
private void RelativeScoreOrImmediateRankDidChangeEvent()
{
TextMeshProUGUI textMeshProUGUI = scoreUIController!.GetField<TextMeshProUGUI, ScoreUIController>("_scoreText");
Expand All @@ -399,6 +399,7 @@ private void RelativeScoreOrImmediateRankDidChangeEvent()
SetRankAndAccuracy();
}

//For all other modes.
private void ScoreDidChangeEvent(int score, int scoreWithMultipliers)
{
LiveData.Instance.Score = score;
Expand All @@ -408,6 +409,7 @@ private void ScoreDidChangeEvent(int score, int scoreWithMultipliers)

private void SetRankAndAccuracy()
{
//Figure out why the accuracy is behind by 1 note every time.
LiveData.Instance.Accuracy = relativeScoreAndImmediateRankCounter.relativeScore * 100;
LiveData.Instance.Rank = relativeScoreAndImmediateRankCounter.immediateRank.ToString();
LiveData.Instance.Send(ELiveDataEventTriggers.ScoreChange);
Expand All @@ -418,7 +420,6 @@ private void NoteWasCutEvent(NoteController noteController, in NoteCutInfo noteC
if (!noteCutInfo.allIsOK) return;
LiveData.Instance.ColorType = noteController.noteData.colorType;
LiveData.Instance.NotesSpawned++;
LiveData.Instance.Combo++;
//Score is updated by the Harmony patch.
//Data is sent in SetRankAndAccuracy().
}
Expand Down
4 changes: 1 addition & 3 deletions src/Data/LiveData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,7 @@ public class LiveData : AData
internal override void Send()
#pragma warning restore CS0809 // Obsolete member overrides non-obsolete member
{
EventTrigger = ELiveDataEventTriggers.Unknown;
base.Send();
lastSendTime = DateTime.MinValue;
Send(ELiveDataEventTriggers.Unknown);
}

public void Send(ELiveDataEventTriggers triggerType = ELiveDataEventTriggers.Unknown)
Expand Down
4 changes: 2 additions & 2 deletions src/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,5 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("2.1.0")]
[assembly: AssemblyFileVersion("2.1.0")]
[assembly: AssemblyVersion("2.1.1")]
[assembly: AssemblyFileVersion("2.1.1")]
2 changes: 1 addition & 1 deletion src/Server/ADataServer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public ADataServer()
private void OnData(string data)
{
#if DEBUG
Plugin.Logger.Debug(data);
Plugin.Logger.Trace(data);
#endif
QueuedSend(data);
}
Expand Down
2 changes: 1 addition & 1 deletion src/manifest.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"id": "DataPuller",
"name": "DataPuller",
"author": "ReadieFur",
"version": "2.1.0",
"version": "2.1.1",
"description": "Gathers data about the current map you are playing to then be sent out over a websocket for other software to use, e.g. A web overlay like BSDP-Overlay. This mod works with multi PC setups!",
"gameVersion": "1.21.0",
"dependsOn": {
Expand Down

0 comments on commit b028731

Please sign in to comment.