Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increase slider division count #234

Merged
merged 2 commits into from
Nov 15, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion osu.Game.Rulesets.Tau/Beatmaps/TauBeatmapConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public class TauBeatmapConverter : BeatmapConverter<TauHitObject>

public bool CanConvertToSliders = true;
public bool CanConvertToHardBeats = true;
public int SliderDivisionLevel = 4;

public TauBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)
: base(beatmap, ruleset)
Expand All @@ -38,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) / 2)
if (pathData.Duration < IBeatmapDifficultyInfo.DifficultyRange(Beatmap.BeatmapInfo.BaseDifficulty.ApproachRate, 1800, 1200, 450) / SliderDivisionLevel)
goto default;

var nodes = new List<SliderNode>();
Expand Down
8 changes: 8 additions & 0 deletions osu.Game.Rulesets.Tau/Mods/TauModLite.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
using osu.Game.Rulesets.Tau.Beatmaps;
using osu.Game.Screens.Edit;

namespace osu.Game.Rulesets.Tau.Mods
{
Expand All @@ -22,12 +23,19 @@ public class TauModLite : Mod, IApplicableToBeatmapConverter
[SettingSource("No hard beats conversion", "Completely disables hard beats altogether.")]
public Bindable<bool> ToggleHardBeats { get; } = new Bindable<bool>(true);

[SettingSource("Slider division level", "The minimum slider length divisor.")]
public BindableBeatDivisor SlidersDivisionLevel { get; } = new BindableBeatDivisor
{
Default = 2
};

public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
{
var converter = (TauBeatmapConverter)beatmapConverter;

converter.CanConvertToSliders = !ToggleSliders.Value;
converter.CanConvertToHardBeats = !ToggleHardBeats.Value;
converter.SliderDivisionLevel = SlidersDivisionLevel.Value;
}
}
}