diff --git a/Hitokori/Difficulty/HitokoriDifficultyCalculator.cs b/Hitokori/Difficulty/HitokoriDifficultyCalculator.cs index 94143b3..84e9501 100644 --- a/Hitokori/Difficulty/HitokoriDifficultyCalculator.cs +++ b/Hitokori/Difficulty/HitokoriDifficultyCalculator.cs @@ -30,11 +30,15 @@ protected override DifficultyAttributes CreateDifficultyAttributes ( IBeatmap be protected override IEnumerable CreateDifficultyHitObjects ( IBeatmap beatmap, double clockRate ) { HitObject last = beatmap.HitObjects.First(); + List objects = new(); + int index = 0; foreach ( HitObject hitObject in beatmap.HitObjects.Skip( 1 ) ) { TimingControlPoint timingControlPoint = beatmap.ControlPointInfo.TimingPointAt( hitObject.StartTime ); - yield return new HitokoriDifficultyHitObject( hitObject, last, timingControlPoint.BPM, clockRate ); + objects.Add( new HitokoriDifficultyHitObject( hitObject, last, timingControlPoint.BPM, clockRate, objects, index++ ) ); last = hitObject; } + + return objects; } protected override Skill[] CreateSkills ( IBeatmap beatmap, Mod[] mods, double clockRate ) { diff --git a/Hitokori/Difficulty/HitokoriDifficultyHitObject.cs b/Hitokori/Difficulty/HitokoriDifficultyHitObject.cs index 32e9ca9..5d98f63 100644 --- a/Hitokori/Difficulty/HitokoriDifficultyHitObject.cs +++ b/Hitokori/Difficulty/HitokoriDifficultyHitObject.cs @@ -2,6 +2,7 @@ using osu.Game.Rulesets.Hitokori.Objects; using osu.Game.Rulesets.Hitokori.Objects.Base; using osu.Game.Rulesets.Objects; +using System.Collections.Generic; namespace osu.Game.Rulesets.Hitokori.Difficulty { public class HitokoriDifficultyHitObject : DifficultyHitObject { @@ -22,7 +23,9 @@ public class HitokoriDifficultyHitObject : DifficultyHitObject { /// public double? HoldAngle { get; private set; } - public HitokoriDifficultyHitObject ( HitObject hitObject, HitObject lastObject, double bpm, double clockRate ) : base( hitObject, lastObject, clockRate ) { + public HitokoriDifficultyHitObject ( HitObject hitObject, HitObject lastObject, double bpm, double clockRate, + List objects, int index ) : base( hitObject, lastObject, clockRate, objects, index ) { + HitokoriTileObject hitokoriObject = (HitokoriTileObject)hitObject; HitokoriTileObject lastHitokoriObject = (HitokoriTileObject)lastObject; diff --git a/Hitokori/Difficulty/Skills/Reading.cs b/Hitokori/Difficulty/Skills/Reading.cs index a1d6761..be8ad6e 100644 --- a/Hitokori/Difficulty/Skills/Reading.cs +++ b/Hitokori/Difficulty/Skills/Reading.cs @@ -30,6 +30,8 @@ private double CalculateAngleStrain ( double angle ) { return Math.Abs( ( Math.Abs( angle ) - Math.PI ) / ( Math.PI * 3 / 2 ) ); } - protected override double CalculateInitialStrain ( double time ) => 0; + + protected override double CalculateInitialStrain ( double time, DifficultyHitObject current ) + => 0; } } diff --git a/Hitokori/Difficulty/Skills/Speed.cs b/Hitokori/Difficulty/Skills/Speed.cs index 27521a8..61e4373 100644 --- a/Hitokori/Difficulty/Skills/Speed.cs +++ b/Hitokori/Difficulty/Skills/Speed.cs @@ -26,6 +26,7 @@ protected override double StrainValueAt ( DifficultyHitObject current ) { return Math.Pow( bpm / BASE_BPM, 0.6 ); } - protected override double CalculateInitialStrain ( double time ) => 0; + protected override double CalculateInitialStrain ( double time, DifficultyHitObject current ) + => 0; } } diff --git a/Hitokori/Mods/HitokoriModAuto.cs b/Hitokori/Mods/HitokoriModAuto.cs index 6bee746..3bcb192 100644 --- a/Hitokori/Mods/HitokoriModAuto.cs +++ b/Hitokori/Mods/HitokoriModAuto.cs @@ -79,14 +79,11 @@ public class HitokoriModAuto : ModAutoplay { "Merg" }; - public override Score CreateReplayScore ( IBeatmap beatmap, IReadOnlyList mods) - { - var score = new Score - { - ScoreInfo = new ScoreInfo {User = new APIUser {Username = BotNames.Random()}}, - Replay = new HitokoriAutoGenerator(beatmap as HitokoriBeatmap).Generate() - }; - return score; + public override ModReplayData CreateReplayData ( IBeatmap beatmap, IReadOnlyList mods ) { + var replay = new HitokoriAutoGenerator( beatmap as HitokoriBeatmap ).Generate(); + return new ModReplayData( replay, new ModCreatedUser { + Username = BotNames.Random() + } ); } } } diff --git a/Hitokori/osu.Game.Rulesets.Hitokori.csproj b/Hitokori/osu.Game.Rulesets.Hitokori.csproj index f7b4020..586c732 100644 --- a/Hitokori/osu.Game.Rulesets.Hitokori.csproj +++ b/Hitokori/osu.Game.Rulesets.Hitokori.csproj @@ -6,7 +6,7 @@ - +