Skip to content

Commit

Permalink
Merge pull request #252 from taulazer/dependabot/nuget/ppy.osu.Game-2…
Browse files Browse the repository at this point in the history
…022.127.0

Bump ppy.osu.Game from 2022.108.0 to 2022.127.0
  • Loading branch information
LumpBloom7 authored Jan 27, 2022
2 parents 5d346f2 + 3ec1d71 commit ae1ab0d
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 30 deletions.
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau.Tests/TestSceneGameplayCursor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public TestSceneGameplayCursor()
Origin = Anchor.Centre,
});

Add(cursor = new TauCursor(CreateBeatmap(new TauRuleset().RulesetInfo).BeatmapInfo.BaseDifficulty));
Add(cursor = new TauCursor(CreateBeatmap(new TauRuleset().RulesetInfo).BeatmapInfo.Difficulty));

AddStep("Reset cursor", () => { InputManager.MoveMouseTo(cursor, new Vector2(0, -50)); });
AddStep("Hide paddle", () => { cursor.Hide(); });
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Tau.Tests/TestScenePaddleDistribution.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ public void TestManyDistributionEvents()
public void TestAroundCentre()
{
var beatmap = new TestBeatmap(new TauRuleset().RulesetInfo);
var angleRange = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.CircleSize, 75, 25, 10);
var angleRange = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.Difficulty.CircleSize, 75, 25, 10);
createTest(Enumerable.Range(0, (int)angleRange).Select(i => new HitEvent(i / 50f, HitResult.Perfect, new Beat(), new Beat(), new Vector2((i - (angleRange / 2)), 0))).ToList());
}

Expand Down Expand Up @@ -64,7 +64,7 @@ public static List<HitEvent> CreateDistributedHitEvents()
{
var hitEvents = new List<HitEvent>();
var beatmap = new TestBeatmap(new TauRuleset().RulesetInfo);
var angleRange = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.CircleSize, 75, 25, 10);
var angleRange = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.Difficulty.CircleSize, 75, 25, 10);

for (int i = 0; i < 100; i++)
{
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau.Tests/TestSceneResumeOverlay.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public TestSceneResumeOverlay()
Children = new Drawable[]
{
cursor = new CursorContainer(),
resume = new TauResumeOverlay(CreateBeatmap(new TauRuleset().RulesetInfo).BeatmapInfo.BaseDifficulty)
resume = new TauResumeOverlay(CreateBeatmap(new TauRuleset().RulesetInfo).BeatmapInfo.Difficulty)
{
GameplayCursor = cursor
}
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau.Tests/TestSceneTauPlayfield.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ public TestSceneTauPlayfield()
Beatmap.Value.Track.Start();
});

AddStep("Load playfield", () => SetContents(_ => new TauPlayfield(Beatmap.Value.BeatmapInfo.BaseDifficulty)
AddStep("Load playfield", () => SetContents(_ => new TauPlayfield(Beatmap.Value.BeatmapInfo.Difficulty)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau.Tests/VisualTestRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public static class VisualTestRunner
[STAThread]
public static int Main(string[] args)
{
using (DesktopGameHost host = Host.GetSuitableHost(@"osu", true))
using (DesktopGameHost host = Host.GetSuitableDesktopHost(@"osu", new HostOptions { BindIPC = true }))
{
host.Run(new OsuTestBrowser());

Expand Down
6 changes: 3 additions & 3 deletions osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original
if (!CanConvertToSliders)
goto default;

if (pathData.Duration < IBeatmapDifficultyInfo.DifficultyRange(Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate, 1800, 1200, 450) / SliderDivisionLevel)
if (pathData.Duration < IBeatmapDifficultyInfo.DifficultyRange(Beatmap.BeatmapInfo.Difficulty.ApproachRate, 1800, 1200, 450) / SliderDivisionLevel)
goto default;

var nodes = new List<SliderNode>();
Expand Down Expand Up @@ -83,7 +83,7 @@ protected override IEnumerable<TauHitObject> ConvertHitObject(HitObject original
goto default;

// Spinners should only be converted to sliders if duration is sufficiently long
if (durationData.Duration < IBeatmapDifficultyInfo.DifficultyRange(Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate, 1800, 1200, 450) / 2)
if (durationData.Duration < IBeatmapDifficultyInfo.DifficultyRange(Beatmap.BeatmapInfo.Difficulty.ApproachRate, 1800, 1200, 450) / 2)
goto default;

var sliderNodes = new List<SliderNode>();
Expand Down Expand Up @@ -143,7 +143,7 @@ private IEnumerable<SliderNode> createNodeFromTicks(HitObject original)
if (isRepeatSpam)
yield break;

var difficulty = Beatmap.BeatmapInfo.BaseDifficulty;
var difficulty = Beatmap.BeatmapInfo.Difficulty;

var controlPointInfo = Beatmap.ControlPointInfo;
TimingControlPoint timingPoint = controlPointInfo.TimingPointAt(original.StartTime);
Expand Down
40 changes: 23 additions & 17 deletions osu.Game.Rulesets.Tau/Mods/TauModFlashlight.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osu.Framework.Input;
using osu.Framework.Input.Events;
using osu.Framework.Utils;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Tau.Objects;
using osuTK;
Expand All @@ -14,17 +15,33 @@ public class TauModFlashlight : ModFlashlight<TauHitObject>
{
public override double ScoreMultiplier => 1.12;

private const float default_flashlight_size = 180;
public override float DefaultFlashlightSize => 180;

private TauFlashlight flashlight;
[SettingSource("Flashlight size", "Multiplier applied to the default flashlight size.")]
public override BindableNumber<float> SizeMultiplier { get; } = new BindableNumber<float>
{
MinValue = 0.5f,
MaxValue = 1.5f,
Default = 1f,
Value = 1f,
Precision = 0.1f
};

[SettingSource("Change size based on combo", "Decrease the flashlight size as combo increases.")]
public override BindableBool ComboBasedSize { get; } = new BindableBool
{
Default = true,
Value = true
};

public override Flashlight CreateFlashlight() => flashlight = new TauFlashlight();
protected override Flashlight CreateFlashlight() => new TauFlashlight(this);

private class TauFlashlight : Flashlight, IRequireHighFrequencyMousePosition
{
public TauFlashlight()

public TauFlashlight(TauModFlashlight modFlashlight) : base(modFlashlight)
{
FlashlightSize = new Vector2(0, getSizeFor(0));
FlashlightSize = new Vector2(0, GetSizeFor(0));
}

protected override bool OnMouseMove(MouseMoveEvent e)
Expand All @@ -40,20 +57,9 @@ protected override bool OnMouseMove(MouseMoveEvent e)
return base.OnMouseMove(e);
}

private float getSizeFor(int combo)
{
if (combo > 200)
return default_flashlight_size * 0.8f;

if (combo > 100)
return default_flashlight_size * 0.9f;

return default_flashlight_size;
}

protected override void OnComboChange(ValueChangedEvent<int> e)
{
this.TransformTo(nameof(FlashlightSize), new Vector2(0, getSizeFor(e.NewValue)), FLASHLIGHT_FADE_DURATION);
this.TransformTo(nameof(FlashlightSize), new Vector2(0, GetSizeFor(e.NewValue)), FLASHLIGHT_FADE_DURATION);
}

protected override string FragmentShader => "CircularFlashlight";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public PaddleDistributionGraph(IReadOnlyList<HitEvent> hitEvents, IBeatmap beatm
{
this.hitEvents = hitEvents.Where(e => !(e.HitObject.HitWindows is HitWindows.EmptyHitWindows) && e.HitObject is Beat && e.Result.IsHit()).ToList();

angleRange = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.BaseDifficulty.CircleSize, 75, 25, 10);
angleRange = (float)IBeatmapDifficultyInfo.DifficultyRange(beatmap.BeatmapInfo.Difficulty.CircleSize, 75, 25, 10);
}

[BackgroundDependencyLoader]
Expand Down
4 changes: 2 additions & 2 deletions osu.Game.Rulesets.Tau/UI/DrawableTauRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ public DrawableTauRuleset(TauRuleset ruleset, IBeatmap beatmap, IReadOnlyList<Mo
{
}

protected override ResumeOverlay CreateResumeOverlay() => new TauResumeOverlay(Beatmap.BeatmapInfo.BaseDifficulty);
protected override ResumeOverlay CreateResumeOverlay() => new TauResumeOverlay(Beatmap.BeatmapInfo.Difficulty);

protected override Playfield CreatePlayfield() => new TauPlayfield(Beatmap.BeatmapInfo.BaseDifficulty);
protected override Playfield CreatePlayfield() => new TauPlayfield(Beatmap.BeatmapInfo.Difficulty);

protected override ReplayInputHandler CreateReplayInputHandler(Replay replay) => new TauFramedReplayInputHandler(replay);

Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Tau/osu.Game.Rulesets.Tau.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<EmbeddedResource Include="Resources\**" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="ppy.osu.Game" Version="2022.108.0" />
<PackageReference Include="ppy.osu.Game" Version="2022.127.0" />
</ItemGroup>
<ItemGroup>
<Folder Include="Resources\Samples\Gameplay" />
Expand Down

0 comments on commit ae1ab0d

Please sign in to comment.