Skip to content
This repository has been archived by the owner on Jun 10, 2021. It is now read-only.

no doubles mod #30

Merged
merged 1 commit into from
Apr 11, 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.Diva/Beatmaps/DivaBeatmapConverter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ public class DivaBeatmapConverter : BeatmapConverter<DivaHitObject>
//create patterns of same button

public int TargetButtons;
public bool AllowDoubles = true;

private DivaAction prevAction = DivaAction.Triangle;
private Vector2 prevObjectPos = Vector2.Zero;
Expand Down Expand Up @@ -61,7 +62,7 @@ protected override IEnumerable<DivaHitObject> ConvertHitObject(HitObject origina

//currently press presses are placed in place of sliders as placeholder, but arcade slider are better suited for these
//another option would be long sliders: arcade sliders, short sliders: doubles
if(original is IHasPathWithRepeats)
if(AllowDoubles && original is IHasPathWithRepeats)
{
yield return new DoublePressButton
{
Expand Down
1 change: 1 addition & 0 deletions osu.Game.Rulesets.Diva/DivaRuleset.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ public override IEnumerable<Mod> GetModsFor(ModType type)
new DivaModKey3(),
new DivaModKey4()
),
new DivaModNoDoubles(),
};

default:
Expand Down
2 changes: 1 addition & 1 deletion osu.Game.Rulesets.Diva/Mods/DivaKeyMod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public abstract class DivaKeyMod : Mod, IApplicableToBeatmapConverter
public override string Acronym => Name;
public abstract int KeyCount { get; }
public override ModType Type => ModType.Conversion;
public override double ScoreMultiplier => 1; // TODO: Implement the Diva key mod score multiplier
public override double ScoreMultiplier => 1;
public override bool Ranked => true;

public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
Expand Down
24 changes: 24 additions & 0 deletions osu.Game.Rulesets.Diva/Mods/DivaModNoDoubles.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System;
using System.Linq;
using osu.Game.Beatmaps;
using osu.Game.Rulesets.Diva.Beatmaps;
using osu.Game.Rulesets.Mods;

namespace osu.Game.Rulesets.Diva.Mods
{
public class DivaModNoDoubles : Mod, IApplicableToBeatmapConverter
{
public override string Name => "No Doubles";
public override string Acronym => "ND";
public override ModType Type => ModType.Conversion;
public override double ScoreMultiplier => 0.667;
public override bool Ranked => true;

public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter)
{
var bc = (DivaBeatmapConverter)beatmapConverter;

bc.AllowDoubles = false;
}
}
}