Skip to content

Commit

Permalink
🤓 separation of concerns 🤓
Browse files Browse the repository at this point in the history
  • Loading branch information
hwabis committed Oct 17, 2024
1 parent f141358 commit da53d54
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ public class PumpTrainerBeatmapConverter : BeatmapConverter<PumpTrainerHitObject
public PumpTrainerBeatmapConverterSettings Settings => generator.Settings;
private NextHitObjectGenerator generator = new();

/// <summary>
/// For osu! sliders with no repeats, this represents whether to convert the end of the slider to a hitobject.
/// (For repeating sliders, each slider end is always converted to hitobjects whether this is true or false.)
/// </summary>
public bool IgnoreNormalSliderEnds = false;

public PumpTrainerBeatmapConverter(IBeatmap beatmap, Ruleset ruleset)
: base(beatmap, ruleset)
{
Expand Down Expand Up @@ -63,7 +69,7 @@ protected override IEnumerable<PumpTrainerHitObject> ConvertHitObject(HitObject
yield return generator.GetNextHitObject(newHitObjectTime, beatmap);
}
}
else if (!Settings.IgnoreNormalSliderEnds)
else if (!IgnoreNormalSliderEnds)
{
// This is a slider with no repeats, and the mod for ignoring is slider ends is off

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,6 @@ namespace osu.Game.Rulesets.PumpTrainer.Beatmaps
{
public class PumpTrainerBeatmapConverterSettings
{
/// <summary>
/// For osu! sliders with no repeats, this represents whether to convert the end of the slider to a hitobject.
/// (For repeating sliders, each slider end is always converted to hitobjects whether this is true or false.)
/// </summary>
public bool IgnoreNormalSliderEnds = false;

public List<Column> AllowedColumns =
[Column.P1DL, Column.P1UL, Column.P1C, Column.P1UR, Column.P1DR, Column.P2DL, Column.P2UL, Column.P2C, Column.P2UR, Column.P2DR];

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
{
var pumpBeatmapConverter = (PumpTrainerBeatmapConverter)beatmapConverter;

pumpBeatmapConverter.Settings.IgnoreNormalSliderEnds = true;
pumpBeatmapConverter.IgnoreNormalSliderEnds = true;
}
}
}

0 comments on commit da53d54

Please sign in to comment.