Skip to content

Commit

Permalink
refactor diagonal twists to be part of the horizontal twist mod and t…
Browse files Browse the repository at this point in the history
…o not be frequency-adjustable
  • Loading branch information
hwabis committed Oct 27, 2024
1 parent 403ccab commit 0674113
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -495,7 +495,7 @@ private void banColumnsCausingBannedPatterns(List<Column> candidateColumns, Foot
}

// Ban diagonal twists (single pad)
if (random.NextDouble() > Settings.DiagonalTwistFrequency)
if (!Settings.AllowDiagonalTwists)
{
if (previousColumn == Column.P1C)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,11 @@ public class PumpTrainerHitObjectGeneratorSettings
public double HorizontalTwistFrequency = 0;

/// <summary>
/// 0 to 1 determining how frequently to generate a diagonal twist. Higher means more likely.
/// Determines whether to allow generating diagonal twists.
/// This requires horizontal twists to be on (greater than 0) to have any effect.
/// Example starting left foot: DL --> C --> UR
/// </summary>
public double DiagonalTwistFrequency = 0;
public bool AllowDiagonalTwists = false;

/// <summary>
/// 0 to 1 determining how frequently to generate a diagonal skip. Higher means more likely.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ public class PumpTrainerModBanSinglesTwists : Mod, IApplicableToBeatmapConverter
{
typeof(PumpTrainerModBanFarColumns),
typeof(PumpTrainerModHorizontalTwists),
typeof(PumpTrainerModDiagonalTwists),
typeof(PumpTrainerModCornersOnSixteenths),
typeof(PumpTrainerModDiagonalSkips),
typeof(PumpTrainerModHorizontalTriples),
Expand Down
46 changes: 0 additions & 46 deletions osu.Game.Rulesets.PumpTrainer/Mods/PumpTrainerModDiagonalTwists.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ public class PumpTrainerModHorizontalTwists : Mod, IApplicableToBeatmapConverter
Default = false,
};

[SettingSource("[P1Single+] Diagonal Twists")]
public Bindable<bool> AllowDiagonalTwists { get; } = new BindableBool(false)
{
Default = false,
};

public override string Name => "Horizontal Twists";
public override string Acronym => "H";
public override LocalisableString Description =>
Expand All @@ -41,6 +47,11 @@ public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
{
pumpBeatmapConverter.Settings.LargeTwistFrequency = HorizontalTwistFrequency.Value;
}

if (AllowDiagonalTwists.Value)
{
pumpBeatmapConverter.Settings.AllowDiagonalTwists = true;
}
}
}
}
1 change: 0 additions & 1 deletion osu.Game.Rulesets.PumpTrainer/PumpTrainerRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ public override IEnumerable<Mod> GetModsFor(ModType type)
return new Mod[]
{
new PumpTrainerModHorizontalTwists(),
new PumpTrainerModDiagonalTwists(),
new PumpTrainerModCornersOnSixteenths(),
new PumpTrainerModDiagonalSkips(),
new PumpTrainerModHorizontalTriples(),
Expand Down

0 comments on commit 0674113

Please sign in to comment.