Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 28 additions & 28 deletions osu.Game.Rulesets.Rush.Tests/osu.Game.Rulesets.Rush.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<StartupObject>osu.Game.Rulesets.Rush.Tests.VisualTestRunner</StartupObject>
<Configurations>Debug;Release;Development</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<ItemGroup Label="Service">
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<PropertyGroup>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.5.0" />
<PackageReference Include="NUnit" Version="4.0.1" />
<PackageReference Include="NUnit3TestAdapter" Version="4.5.0" />
</ItemGroup>
<PropertyGroup Label="Project">
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Development' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\osu.Game.Rulesets.Rush\osu.Game.Rulesets.Rush.csproj" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<StartupObject>osu.Game.Rulesets.Rush.Tests.VisualTestRunner</StartupObject>
<Configurations>Debug;Release;Development</Configurations>
<Platforms>AnyCPU</Platforms>
</PropertyGroup>
<ItemGroup Label="Service">
<Service Include="{82a7f48d-3b50-4b1e-b82e-3ada8210c358}" />
</ItemGroup>
<PropertyGroup>
<GenerateProgramFile>false</GenerateProgramFile>
</PropertyGroup>
<ItemGroup Label="Package References">
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="17.14.1" />
<PackageReference Include="NUnit" Version="4.3.2" />
<PackageReference Include="NUnit3TestAdapter" Version="5.0.0" />
</ItemGroup>
<PropertyGroup Label="Project">
<OutputType>WinExe</OutputType>
<TargetFramework>net8.0</TargetFramework>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Development' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>
<ItemGroup Label="Project References">
<ProjectReference Include="..\osu.Game.Rulesets.Rush\osu.Game.Rulesets.Rush.csproj" />
</ItemGroup>
</Project>
21 changes: 15 additions & 6 deletions osu.Game.Rulesets.Rush/Beatmaps/RushBeatmap.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Copyright (c) Shane Woolcock. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.

using System;
using System.Collections.Generic;
using System.Linq;
using osu.Framework.Graphics;
Expand All @@ -22,43 +23,51 @@ public override IEnumerable<BeatmapStatistic> GetStatistics()
int minibosses = HitObjects.Count(s => s is MiniBoss);
int hearts = HitObjects.Count(s => s is Heart);

float total = Math.Max(minions + starsheets + sawblades + dualhits + minibosses + hearts, 1);

return new[]
{
new BeatmapStatistic
{
Name = @"Minion Count",
Name = @"Minions",
Content = minions.ToString(),
CreateIcon = () => createIcon(FontAwesome.Regular.Angry),
BarDisplayLength = minions / total
},
new BeatmapStatistic
{
Name = @"Star Sheet Count",
Name = @"Star Sheets",
Content = starsheets.ToString(),
CreateIcon = () => createIcon(FontAwesome.Regular.Star),
BarDisplayLength = starsheets / total
},
new BeatmapStatistic
{
Name = @"Dual Hit Count",
Name = @"Dual Hits",
Content = dualhits.ToString(),
CreateIcon = () => createIcon(FontAwesome.Solid.Cog),
BarDisplayLength = dualhits / total
},
new BeatmapStatistic
{
Name = @"Sawblade Count",
Name = @"Sawblades",
Content = sawblades.ToString(),
CreateIcon = () => createIcon(FontAwesome.Solid.Sun),
BarDisplayLength = sawblades / total
},
new BeatmapStatistic
{
Name = @"Miniboss Count",
Name = @"Minibosses",
Content = minibosses.ToString(),
CreateIcon = () => createIcon(FontAwesome.Solid.Mitten),
BarDisplayLength = minibosses / total
},
new BeatmapStatistic
{
Name = @"Heart Count",
Name = @"Hearts",
Content = hearts.ToString(),
CreateIcon = () => createIcon(FontAwesome.Solid.Heart),
BarDisplayLength = hearts / total
}
};
}
Expand Down
76 changes: 38 additions & 38 deletions osu.Game.Rulesets.Rush/osu.Game.Rulesets.Rush.csproj
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<Configurations>Debug;Release;Development</Configurations>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>
<RootNamespace>osu.Game.Rulesets.Rush</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Development' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>
<Choose>
<When Condition=" '$(Configuration)' == 'Release' ">
<PropertyGroup>
<AssemblyName>osu.Game.Rulesets.Rush</AssemblyName>
<AssemblyTitle>rush for osu!</AssemblyTitle>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyName>osu.Game.Rulesets.Rush-dev</AssemblyName>
<AssemblyTitle>rush for osu! (development build)</AssemblyTitle>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<!-- The automated version of this (<EmbeddedResource Include="xyz\**" />) would prepend the RootNamespace to name,
that will not work well with DllResourceStore as it can only determine the root namespace via AssemblyName,
and we change that based on the build configuration for separation purposes.
Therefore prepend the AssemblyName to embedded resources names instead. -->
<EmbeddedResource Include="Resources\**">
<LogicalName>$(AssemblyName).$([System.String]::Copy(%(Identity)).Replace($([System.IO.Path]::DirectorySeparatorChar.ToString()), '.'))</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2025.424.0" />
</ItemGroup>
</Project>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup Label="Project">
<Configurations>Debug;Release;Development</Configurations>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Library</OutputType>
<PlatformTarget>AnyCPU</PlatformTarget>
<RootNamespace>osu.Game.Rulesets.Rush</RootNamespace>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Development' ">
<Optimize Condition=" '$(Optimize)' == '' ">true</Optimize>
</PropertyGroup>
<Choose>
<When Condition=" '$(Configuration)' == 'Release' ">
<PropertyGroup>
<AssemblyName>osu.Game.Rulesets.Rush</AssemblyName>
<AssemblyTitle>rush for osu!</AssemblyTitle>
</PropertyGroup>
</When>
<Otherwise>
<PropertyGroup>
<AssemblyName>osu.Game.Rulesets.Rush-dev</AssemblyName>
<AssemblyTitle>rush for osu! (development build)</AssemblyTitle>
</PropertyGroup>
</Otherwise>
</Choose>
<ItemGroup>
<!-- The automated version of this (<EmbeddedResource Include="xyz\**" />) would prepend the RootNamespace to name,
that will not work well with DllResourceStore as it can only determine the root namespace via AssemblyName,
and we change that based on the build configuration for separation purposes.
Therefore prepend the AssemblyName to embedded resources names instead. -->
<EmbeddedResource Include="Resources\**">
<LogicalName>$(AssemblyName).$([System.String]::Copy(%(Identity)).Replace($([System.IO.Path]::DirectorySeparatorChar.ToString()), '.'))</LogicalName>
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2025.607.0" />
</ItemGroup>
</Project>