Skip to content

Commit

Permalink
Fix ruleset errors after 810.2 lazer update
Browse files Browse the repository at this point in the history
  • Loading branch information
EVAST9919 committed Aug 10, 2022
1 parent 20893df commit 6b92ae5
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<ItemGroup Label="Package References">
<PackageReference Include="Appveyor.TestLogger" Version="2.0.0" />
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.2.0" />
<PackageReference Include="NUnit" Version="3.13.2" />
<PackageReference Include="NUnit" Version="3.13.3" />
<PackageReference Include="NUnit3TestAdapter" Version="3.15.1" />
<PackageReference Update="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
</ItemGroup>
Expand Down
23 changes: 19 additions & 4 deletions osu.Game.Rulesets.Touhosu/TouhosuRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
using osu.Game.Overlays.Settings;
using osu.Game.Rulesets.Replays.Types;
using osu.Game.Rulesets.Touhosu.Replays;
using osu.Framework.Allocation;
using osu.Framework.Platform;

namespace osu.Game.Rulesets.Touhosu
{
Expand Down Expand Up @@ -99,16 +101,29 @@ public override IEnumerable<Mod> GetModsFor(ModType type)

public override string PlayingVerb => "Avoiding bullets";

public override Drawable CreateIcon() => new Sprite
{
Texture = new TextureStore(new TextureLoaderStore(CreateResourceStore()), false).Get("Textures/logo"),
};
public override Drawable CreateIcon() => new TouhosuIcon(this);

protected override IEnumerable<HitResult> GetValidHitResults() => new[]
{
HitResult.Perfect
};

public override DifficultyCalculator CreateDifficultyCalculator(IWorkingBeatmap beatmap) => new TouhosuDifficultyCalculator(RulesetInfo, beatmap);

private class TouhosuIcon : Sprite
{
private readonly TouhosuRuleset ruleset;

public TouhosuIcon(TouhosuRuleset ruleset)
{
this.ruleset = ruleset;
}

[BackgroundDependencyLoader]
private void load(GameHost host)
{
Texture = new TextureStore(host.Renderer, new TextureLoaderStore(ruleset.CreateResourceStore()), false).Get("Textures/logo");
}
}
}
}
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Touhosu/osu.Game.Rulesets.Touhosu.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@
<EmbeddedResource Include="Resources\**\*" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2022.424.1"/>
<PackageReference Include="ppy.osu.Game" Version="2022.810.2"/>
</ItemGroup>
</Project>

0 comments on commit 6b92ae5

Please sign in to comment.