1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-13 15:27:30 +08:00

Make CreateJudgement public again and add remarks

This commit is contained in:
Andrei Zavatski 2024-02-16 20:24:02 +03:00
parent dd32c0a226
commit 060b01eee8
39 changed files with 44 additions and 40 deletions

View File

@ -10,7 +10,7 @@ namespace osu.Game.Rulesets.EmptyFreeform.Objects
{
public class EmptyFreeformHitObject : HitObject, IHasPosition
{
protected override Judgement CreateJudgement() => new Judgement();
public override Judgement CreateJudgement() => new Judgement();
public Vector2 Position { get; set; }

View File

@ -10,7 +10,7 @@ namespace osu.Game.Rulesets.Pippidon.Objects
{
public class PippidonHitObject : HitObject, IHasPosition
{
protected override Judgement CreateJudgement() => new Judgement();
public override Judgement CreateJudgement() => new Judgement();
public Vector2 Position { get; set; }

View File

@ -8,6 +8,6 @@ namespace osu.Game.Rulesets.EmptyScrolling.Objects
{
public class EmptyScrollingHitObject : HitObject
{
protected override Judgement CreateJudgement() => new Judgement();
public override Judgement CreateJudgement() => new Judgement();
}
}

View File

@ -13,6 +13,6 @@ namespace osu.Game.Rulesets.Pippidon.Objects
/// </summary>
public int Lane;
protected override Judgement CreateJudgement() => new Judgement();
public override Judgement CreateJudgement() => new Judgement();
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Catch.Objects
/// </summary>
public int BananaIndex;
protected override Judgement CreateJudgement() => new CatchBananaJudgement();
public override Judgement CreateJudgement() => new CatchBananaJudgement();
private static readonly IList<HitSampleInfo> default_banana_samples = new List<HitSampleInfo> { new BananaHitSampleInfo() }.AsReadOnly();

View File

@ -13,7 +13,7 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public override bool LastInCombo => true;
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
protected override void CreateNestedHitObjects(CancellationToken cancellationToken)
{

View File

@ -8,6 +8,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public class Droplet : PalpableCatchHitObject
{
protected override Judgement CreateJudgement() => new CatchDropletJudgement();
public override Judgement CreateJudgement() => new CatchDropletJudgement();
}
}

View File

@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public class Fruit : PalpableCatchHitObject
{
protected override Judgement CreateJudgement() => new CatchJudgement();
public override Judgement CreateJudgement() => new CatchJudgement();
public static FruitVisualRepresentation GetVisualRepresentation(int indexInBeatmap) => (FruitVisualRepresentation)(indexInBeatmap % 4);
}

View File

@ -23,7 +23,7 @@ namespace osu.Game.Rulesets.Catch.Objects
/// </summary>
private const float base_scoring_distance = 100;
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
public int RepeatCount { get; set; }

View File

@ -8,6 +8,6 @@ namespace osu.Game.Rulesets.Catch.Objects
{
public class TinyDroplet : Droplet
{
protected override Judgement CreateJudgement() => new CatchTinyDropletJudgement();
public override Judgement CreateJudgement() => new CatchTinyDropletJudgement();
}
}

View File

@ -19,6 +19,6 @@ namespace osu.Game.Rulesets.Mania.Objects
set => major.Value = value;
}
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
}
}

View File

@ -112,7 +112,7 @@ namespace osu.Game.Rulesets.Mania.Objects
});
}
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;

View File

@ -15,7 +15,7 @@ namespace osu.Game.Rulesets.Mania.Objects
/// </summary>
public class HoldNoteBody : ManiaHitObject
{
protected override Judgement CreateJudgement() => new HoldNoteBodyJudgement();
public override Judgement CreateJudgement() => new HoldNoteBodyJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
}
}

View File

@ -11,6 +11,6 @@ namespace osu.Game.Rulesets.Mania.Objects
/// </summary>
public class Note : ManiaHitObject
{
protected override Judgement CreateJudgement() => new ManiaJudgement();
public override Judgement CreateJudgement() => new ManiaJudgement();
}
}

View File

@ -18,7 +18,7 @@ namespace osu.Game.Rulesets.Mania.Objects
/// </summary>
public const double RELEASE_WINDOW_LENIENCE = 1.5;
protected override Judgement CreateJudgement() => new ManiaJudgement();
public override Judgement CreateJudgement() => new ManiaJudgement();
public override double MaximumJudgementOffset => base.MaximumJudgementOffset * RELEASE_WINDOW_LENIENCE;
}

View File

@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.Osu.Mods
{
}
protected override Judgement CreateJudgement() => new OsuJudgement();
public override Judgement CreateJudgement() => new OsuJudgement();
}
private partial class StrictTrackingDrawableSliderTail : DrawableSliderTail

View File

@ -8,6 +8,6 @@ namespace osu.Game.Rulesets.Osu.Objects
{
public class HitCircle : OsuHitObject
{
protected override Judgement CreateJudgement() => new OsuJudgement();
public override Judgement CreateJudgement() => new OsuJudgement();
}
}

View File

@ -275,7 +275,7 @@ namespace osu.Game.Rulesets.Osu.Objects
TailSamples = this.GetNodeSamples(repeatCount + 1);
}
protected override Judgement CreateJudgement() => ClassicSliderBehaviour
public override Judgement CreateJudgement() => ClassicSliderBehaviour
// Final combo is provided by the slider itself - see logic in `DrawableSlider.CheckForResult()`
? new OsuJudgement()
// Final combo is provided by the tail circle - see `SliderTailCircle`

View File

@ -46,7 +46,7 @@ namespace osu.Game.Rulesets.Osu.Objects
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
protected override Judgement CreateJudgement() => new SliderEndJudgement();
public override Judgement CreateJudgement() => new SliderEndJudgement();
public class SliderEndJudgement : OsuJudgement
{

View File

@ -14,6 +14,6 @@ namespace osu.Game.Rulesets.Osu.Objects
/// </summary>
public bool ClassicSliderBehaviour;
protected override Judgement CreateJudgement() => ClassicSliderBehaviour ? new SliderTickJudgement() : base.CreateJudgement();
public override Judgement CreateJudgement() => ClassicSliderBehaviour ? new SliderTickJudgement() : base.CreateJudgement();
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Osu.Objects
{
}
protected override Judgement CreateJudgement() => ClassicSliderBehaviour ? new LegacyTailJudgement() : new TailJudgement();
public override Judgement CreateJudgement() => ClassicSliderBehaviour ? new LegacyTailJudgement() : new TailJudgement();
public class LegacyTailJudgement : OsuJudgement
{

View File

@ -32,6 +32,6 @@ namespace osu.Game.Rulesets.Osu.Objects
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
protected override Judgement CreateJudgement() => new SliderTickJudgement();
public override Judgement CreateJudgement() => new SliderTickJudgement();
}
}

View File

@ -95,7 +95,7 @@ namespace osu.Game.Rulesets.Osu.Objects
}
}
protected override Judgement CreateJudgement() => new OsuJudgement();
public override Judgement CreateJudgement() => new OsuJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;

View File

@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Osu.Objects
{
public class SpinnerBonusTick : SpinnerTick
{
protected override Judgement CreateJudgement() => new OsuSpinnerBonusTickJudgement();
public override Judgement CreateJudgement() => new OsuSpinnerBonusTickJudgement();
public class OsuSpinnerBonusTickJudgement : OsuSpinnerTickJudgement
{

View File

@ -14,7 +14,7 @@ namespace osu.Game.Rulesets.Osu.Objects
/// </summary>
public double SpinnerDuration { get; set; }
protected override Judgement CreateJudgement() => new OsuSpinnerTickJudgement();
public override Judgement CreateJudgement() => new OsuSpinnerTickJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;

View File

@ -19,6 +19,6 @@ namespace osu.Game.Rulesets.Taiko.Objects
set => major.Value = value;
}
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
}
}

View File

@ -90,7 +90,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
}
}
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
@ -103,7 +103,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
public class StrongNestedHit : StrongNestedHitObject
{
// The strong hit of the drum roll doesn't actually provide any score.
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
public StrongNestedHit(TaikoHitObject parent)
: base(parent)

View File

@ -32,7 +32,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
Parent = parent;
}
protected override Judgement CreateJudgement() => new TaikoDrumRollTickJudgement();
public override Judgement CreateJudgement() => new TaikoDrumRollTickJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;

View File

@ -7,6 +7,6 @@ namespace osu.Game.Rulesets.Taiko.Objects
{
public class IgnoreHit : Hit
{
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
}
}

View File

@ -20,7 +20,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
Parent = parent;
}
protected override Judgement CreateJudgement() => new TaikoStrongJudgement();
public override Judgement CreateJudgement() => new TaikoStrongJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
}

View File

@ -38,7 +38,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
}
}
protected override Judgement CreateJudgement() => new TaikoSwellJudgement();
public override Judgement CreateJudgement() => new TaikoSwellJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
}

View File

@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
{
public class SwellTick : TaikoHitObject
{
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
}

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Taiko.Objects
/// </summary>
public const float DEFAULT_SIZE = 0.475f;
protected override Judgement CreateJudgement() => new TaikoJudgement();
public override Judgement CreateJudgement() => new TaikoJudgement();
protected override HitWindows CreateHitWindows() => new TaikoHitWindows();
}

View File

@ -358,7 +358,7 @@ namespace osu.Game.Tests.Gameplay
this.maxResult = maxResult;
}
protected override Judgement CreateJudgement() => new TestJudgement(maxResult);
public override Judgement CreateJudgement() => new TestJudgement(maxResult);
protected override HitWindows CreateHitWindows() => new HitWindows();
private class TestJudgement : Judgement

View File

@ -196,7 +196,7 @@ namespace osu.Game.Tests.Gameplay
this.maxResult = maxResult;
}
protected override Judgement CreateJudgement() => new TestJudgement(maxResult);
public override Judgement CreateJudgement() => new TestJudgement(maxResult);
}
}
}

View File

@ -441,7 +441,7 @@ namespace osu.Game.Tests.Rulesets.Scoring
private readonly HitResult maxResult;
private readonly HitResult? minResult;
protected override Judgement CreateJudgement() => new TestJudgement(maxResult, minResult);
public override Judgement CreateJudgement() => new TestJudgement(maxResult, minResult);
public TestHitObject(HitResult maxResult, HitResult? minResult = null)
{

View File

@ -655,7 +655,7 @@ namespace osu.Game.Database
{
private readonly Judgement judgement;
protected override Judgement CreateJudgement() => judgement;
public override Judgement CreateJudgement() => judgement;
public FakeHit(Judgement judgement)
{

View File

@ -173,8 +173,12 @@ namespace osu.Game.Rulesets.Objects
/// <summary>
/// Creates the <see cref="Judgement"/> that represents the scoring information for this <see cref="HitObject"/>.
/// </summary>
/// <remarks>
/// Use <see cref="Judgement"/> to avoid unnecessary allocations.
/// This method has been left public for compatibility reasons and eventually will be made protected.
/// </remarks>
[NotNull]
protected virtual Judgement CreateJudgement() => new Judgement();
public virtual Judgement CreateJudgement() => new Judgement();
/// <summary>
/// Creates the <see cref="HitWindows"/> for this <see cref="HitObject"/>.

View File

@ -16,7 +16,7 @@ namespace osu.Game.Rulesets.Objects.Legacy
public int ComboOffset { get; set; }
protected override Judgement CreateJudgement() => new IgnoreJudgement();
public override Judgement CreateJudgement() => new IgnoreJudgement();
protected override HitWindows CreateHitWindows() => HitWindows.Empty;
}