This repository has been archived by the owner on Jun 10, 2021. It is now read-only.
forked from Artemis-chan/osu-DIVA
-
Notifications
You must be signed in to change notification settings - Fork 0
key mod #27
Merged
Merged
key mod #27
Changes from 2 commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
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 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 bool Ranked => true; | ||
|
||
public void ApplyToBeatmapConverter(IBeatmapConverter beatmapConverter) | ||
{ | ||
var bc = (DivaBeatmapConverter)beatmapConverter; | ||
|
||
bc.TargetButtons = KeyCount; | ||
} | ||
|
||
public override Type[] IncompatibleMods => new[] | ||
{ | ||
typeof(DivaModKey1), | ||
typeof(DivaModKey2), | ||
typeof(DivaModKey3), | ||
typeof(DivaModKey4) | ||
}.Except(new[] { GetType() }).ToArray(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
namespace osu.Game.Rulesets.Diva.Mods | ||
{ | ||
public class DivaModKey1 : DivaKeyMod | ||
{ | ||
public override int KeyCount => 1; | ||
public override string Name => "One Button"; | ||
public override string Acronym => "1B"; | ||
public override string Description => @"Play with one button."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
namespace osu.Game.Rulesets.Diva.Mods | ||
{ | ||
public class DivaModKey2 : DivaKeyMod | ||
{ | ||
public override int KeyCount => 2; | ||
public override string Name => "Two Button"; | ||
public override string Acronym => "2B"; | ||
public override string Description => @"Play with two buttons."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
namespace osu.Game.Rulesets.Diva.Mods | ||
{ | ||
public class DivaModKey3 : DivaKeyMod | ||
{ | ||
public override int KeyCount => 3; | ||
public override string Name => "3 Button"; | ||
public override string Acronym => "3B"; | ||
public override string Description => @"Play with three buttons."; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Copyright (c) ppy Pty Ltd <[email protected]>. Licensed under the MIT Licence. | ||
// See the LICENCE file in the repository root for full licence text. | ||
|
||
namespace osu.Game.Rulesets.Diva.Mods | ||
{ | ||
public class DivaModKey4 : DivaKeyMod | ||
{ | ||
public override int KeyCount => 4; | ||
public override string Name => "Four Button"; | ||
public override string Acronym => "4B"; | ||
public override string Description => @"Play with four buttons."; | ||
} | ||
} |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should be "Three Button" for consistency
Actually make Button plural on all ModKey as well?