diff --git a/osu.Game.Rulesets.Rush/Beatmaps/RushGeneratedBeatmapConverter.cs b/osu.Game.Rulesets.Rush/Beatmaps/RushGeneratedBeatmapConverter.cs index b9548026..81fa440a 100644 --- a/osu.Game.Rulesets.Rush/Beatmaps/RushGeneratedBeatmapConverter.cs +++ b/osu.Game.Rulesets.Rush/Beatmaps/RushGeneratedBeatmapConverter.cs @@ -117,23 +117,23 @@ void updatePrevious(LanedHitLane? newLane) var kiaiMultiplier = original.Kiai ? kiai_multiplier : 1; // try to get a lane from the force flags - if (flags.HasFlagFast(HitObjectFlags.ForceSameLane) || flags.HasFlagFast(HitObjectFlags.SuggestSameLane) && random.NextDouble() < suggest_probability) + if (flags.HasFlag(HitObjectFlags.ForceSameLane) || flags.HasFlag(HitObjectFlags.SuggestSameLane) && random.NextDouble() < suggest_probability) lane = previousLane; - else if (flags.HasFlagFast(HitObjectFlags.ForceNotSameLane) || flags.HasFlagFast(HitObjectFlags.SuggestNotSameLane) && random.NextDouble() < suggest_probability) + else if (flags.HasFlag(HitObjectFlags.ForceNotSameLane) || flags.HasFlag(HitObjectFlags.SuggestNotSameLane) && random.NextDouble() < suggest_probability) lane = previousLane?.Opposite(); // get the lane from the object lane ??= laneForHitObject(original); // if we should end a sheet, try to - if (currentStarSheets.Count > 0 && (flags.HasFlagFast(HitObjectFlags.ForceEndStarSheet) || flags.HasFlagFast(HitObjectFlags.SuggestEndStarSheet) && random.NextDouble() < starsheet_end_probability)) + if (currentStarSheets.Count > 0 && (flags.HasFlag(HitObjectFlags.ForceEndStarSheet) || flags.HasFlag(HitObjectFlags.SuggestEndStarSheet) && random.NextDouble() < starsheet_end_probability)) { // TODO: for now we'll end both sheets where they are and ignore snapping logic currentStarSheets.Clear(); } // if we should start a starsheet... - if (flags.HasFlagFast(HitObjectFlags.ForceStartStarSheet) || flags.HasFlagFast(HitObjectFlags.SuggestStartStarSheet) && random.NextDouble() < starsheet_start_probability) + if (flags.HasFlag(HitObjectFlags.ForceStartStarSheet) || flags.HasFlag(HitObjectFlags.SuggestStartStarSheet) && random.NextDouble() < starsheet_start_probability) { // TODO: for now, end all existing sheets currentStarSheets.Clear(); @@ -202,7 +202,7 @@ void updatePrevious(LanedHitLane? newLane) currentStarSheets.Remove(LanedHitLane.Ground); // if it's low probability, potentially skip this object - if (flags.HasFlagFast(HitObjectFlags.LowProbability) && random.NextDouble() < skip_probability) + if (flags.HasFlag(HitObjectFlags.LowProbability) && random.NextDouble() < skip_probability) { updatePrevious(lane ?? previousLane); yield break; @@ -210,7 +210,7 @@ void updatePrevious(LanedHitLane? newLane) // if not too close to a sawblade, allow adding a double hit if (original.StartTime - lastSawbladeTime >= sawblade_same_lane_safety_time - && flags.HasFlagFast(HitObjectFlags.AllowDoubleHit) + && flags.HasFlag(HitObjectFlags.AllowDoubleHit) && original.StartTime >= nextDualHitTime && random.NextDouble() < dualhit_probability) { @@ -281,7 +281,7 @@ void updatePrevious(LanedHitLane? newLane) // we didn't add a sawblade, or // we added a sawblade and are allowed to replace the hit entirely, or // we added a sawblade that was in the opposite lane - if (finalLane != blockedLane && !tooCloseToLastSawblade && (!sawbladeAdded || !flags.HasFlagFast(HitObjectFlags.AllowSawbladeReplace))) + if (finalLane != blockedLane && !tooCloseToLastSawblade && (!sawbladeAdded || !flags.HasFlag(HitObjectFlags.AllowSawbladeReplace))) yield return createNormalHit(original, finalLane); updatePrevious(finalLane); diff --git a/osu.Game.Rulesets.Rush/Replays/RushReplayFrame.cs b/osu.Game.Rulesets.Rush/Replays/RushReplayFrame.cs index 3ffc28ce..c2b35c21 100644 --- a/osu.Game.Rulesets.Rush/Replays/RushReplayFrame.cs +++ b/osu.Game.Rulesets.Rush/Replays/RushReplayFrame.cs @@ -70,7 +70,7 @@ public LegacyReplayFrame ToLegacy(IBeatmap beatmap) return new LegacyReplayFrame(Time, flags, 0f, getFeverActivationButtonState(FeverActivationMode)); } - private static FeverActivationMode getFeverActivationMode(ReplayButtonState buttonState) => buttonState.HasFlagFast(ReplayButtonState.Smoke) switch + private static FeverActivationMode getFeverActivationMode(ReplayButtonState buttonState) => buttonState.HasFlag(ReplayButtonState.Smoke) switch { true => FeverActivationMode.Automatic, false => FeverActivationMode.Manual diff --git a/osu.Game.Rulesets.Rush/RushSkinComponent.cs b/osu.Game.Rulesets.Rush/RushSkinComponent.cs index 5ca2aadc..0948efd7 100644 --- a/osu.Game.Rulesets.Rush/RushSkinComponent.cs +++ b/osu.Game.Rulesets.Rush/RushSkinComponent.cs @@ -11,8 +11,5 @@ public RushSkinComponent(RushSkinComponents component) : base(component) { } - - protected override string RulesetPrefix => RushRuleset.SHORT_NAME; - protected override string ComponentName => Component.ToString().ToLower(); } } diff --git a/osu.Game.Rulesets.Rush/UI/DefaultHitExplosion.cs b/osu.Game.Rulesets.Rush/UI/DefaultHitExplosion.cs index 7637502f..698251ea 100644 --- a/osu.Game.Rulesets.Rush/UI/DefaultHitExplosion.cs +++ b/osu.Game.Rulesets.Rush/UI/DefaultHitExplosion.cs @@ -153,7 +153,7 @@ public void Animate() { var scale = 0.8f + random.NextDouble() * 0.2f; var duration = average_duration * (0.8f + random.NextDouble() * 0.4f); - var radians = MathUtils.DegreesToRadians(triangle.Rotation + 90); + var radians = float.DegreesToRadians(triangle.Rotation + 90); var distance = DrawWidth * (0.8f + random.NextDouble() * 0.2f); var target = new Vector2(MathF.Cos(radians), MathF.Sin(radians)) * (float)distance; triangle.Scale = new Vector2((float)scale); diff --git a/osu.Game.Rulesets.Rush/UI/Ground/DefaultGround.cs b/osu.Game.Rulesets.Rush/UI/Ground/DefaultGround.cs index b3867a14..1f36a6a7 100644 --- a/osu.Game.Rulesets.Rush/UI/Ground/DefaultGround.cs +++ b/osu.Game.Rulesets.Rush/UI/Ground/DefaultGround.cs @@ -109,7 +109,7 @@ protected override void UpdateAfterChildren() protected override bool OnInvalidate(Invalidation invalidation, InvalidationSource source) { - if (invalidation.HasFlagFast(Invalidation.DrawSize)) + if (invalidation.HasFlag(Invalidation.DrawSize)) { slats.Clear(false); diff --git a/osu.Game.Rulesets.Rush/osu.Game.Rulesets.Rush.csproj b/osu.Game.Rulesets.Rush/osu.Game.Rulesets.Rush.csproj index b7564e7a..2d79afa8 100644 --- a/osu.Game.Rulesets.Rush/osu.Game.Rulesets.Rush.csproj +++ b/osu.Game.Rulesets.Rush/osu.Game.Rulesets.Rush.csproj @@ -33,6 +33,6 @@ - +