Skip to content

Commit ee6597b

Browse files
authored
Merge pull request #24 from Syriiin/better-batching
Implement better batching
2 parents ba655a1 + aaf7059 commit ee6597b

File tree

17 files changed

+123
-38
lines changed

17 files changed

+123
-38
lines changed

Difficalcy.Catch.Tests/Difficalcy.Catch.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1212
<PackageReference Include="xunit" Version="2.8.0" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Difficalcy.Catch/Difficalcy.Catch.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Catch" Version="2024.412.1" />
9-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2024.412.1" /> <!-- required for convert support -->
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Catch" Version="2024.523.0" />
9+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2024.523.0" /> <!-- required for convert support -->
1010
</ItemGroup>
1111

1212
<ItemGroup>

Difficalcy.Catch/Services/CatchCalculatorService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ protected override async Task EnsureBeatmap(string beatmapId)
4343
await beatmapProvider.EnsureBeatmap(beatmapId);
4444
}
4545

46-
protected override (object, string) CalculateDifficultyAttributes(CatchScore score)
46+
protected override (object, string) CalculateDifficultyAttributes(string beatmapId, int bitMods)
4747
{
48-
var workingBeatmap = GetWorkingBeatmap(score.BeatmapId);
49-
var mods = CatchRuleset.ConvertFromLegacyMods((LegacyMods)score.Mods).ToArray();
48+
var workingBeatmap = GetWorkingBeatmap(beatmapId);
49+
var mods = CatchRuleset.ConvertFromLegacyMods((LegacyMods)bitMods).ToArray();
5050

5151
var difficultyCalculator = CatchRuleset.CreateDifficultyCalculator(workingBeatmap);
5252
var difficultyAttributes = difficultyCalculator.Calculate(mods) as CatchDifficultyAttributes;

Difficalcy.Mania.Tests/Difficalcy.Mania.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1212
<PackageReference Include="xunit" Version="2.8.0" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Difficalcy.Mania/Difficalcy.Mania.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Mania" Version="2024.412.1" />
9-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2024.412.1" /> <!-- required for convert support -->
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Mania" Version="2024.523.0" />
9+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2024.523.0" /> <!-- required for convert support -->
1010
</ItemGroup>
1111

1212
<ItemGroup>

Difficalcy.Mania/Services/ManiaCalculatorService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,10 @@ protected override async Task EnsureBeatmap(string beatmapId)
4343
await _beatmapProvider.EnsureBeatmap(beatmapId);
4444
}
4545

46-
protected override (object, string) CalculateDifficultyAttributes(ManiaScore score)
46+
protected override (object, string) CalculateDifficultyAttributes(string beatmapId, int bitMods)
4747
{
48-
var workingBeatmap = GetWorkingBeatmap(score.BeatmapId);
49-
var mods = ManiaRuleset.ConvertFromLegacyMods((LegacyMods)score.Mods).ToArray();
48+
var workingBeatmap = GetWorkingBeatmap(beatmapId);
49+
var mods = ManiaRuleset.ConvertFromLegacyMods((LegacyMods)bitMods).ToArray();
5050

5151
var difficultyCalculator = ManiaRuleset.CreateDifficultyCalculator(workingBeatmap);
5252
var difficultyAttributes = difficultyCalculator.Calculate(mods) as ManiaDifficultyAttributes;

Difficalcy.Osu.Tests/Difficalcy.Osu.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1212
<PackageReference Include="xunit" Version="2.8.0" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

Difficalcy.Osu/Difficalcy.Osu.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
</PropertyGroup>
66

77
<ItemGroup>
8-
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2024.412.1" />
8+
<PackageReference Include="ppy.osu.Game.Rulesets.Osu" Version="2024.523.0" />
99
</ItemGroup>
1010

1111
<ItemGroup>

Difficalcy.Osu/Services/OsuCalculatorService.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@ protected override async Task EnsureBeatmap(string beatmapId)
4141
await beatmapProvider.EnsureBeatmap(beatmapId);
4242
}
4343

44-
protected override (object, string) CalculateDifficultyAttributes(OsuScore score)
44+
protected override (object, string) CalculateDifficultyAttributes(string beatmapId, int bitMods)
4545
{
46-
var workingBeatmap = GetWorkingBeatmap(score.BeatmapId);
47-
var mods = OsuRuleset.ConvertFromLegacyMods((LegacyMods)score.Mods).ToArray();
46+
var workingBeatmap = GetWorkingBeatmap(beatmapId);
47+
var mods = OsuRuleset.ConvertFromLegacyMods((LegacyMods)bitMods).ToArray();
4848

4949
var difficultyCalculator = OsuRuleset.CreateDifficultyCalculator(workingBeatmap);
5050
var difficultyAttributes = difficultyCalculator.Calculate(mods) as OsuDifficultyAttributes;

Difficalcy.Taiko.Tests/Difficalcy.Taiko.Tests.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.9.0" />
11+
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.10.0" />
1212
<PackageReference Include="xunit" Version="2.8.0" />
1313
<PackageReference Include="xunit.runner.visualstudio" Version="2.8.0">
1414
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>

0 commit comments

Comments
 (0)