IKeyBindingMod -> IPlayfieldTypeMod

This commit is contained in:
smoogipoo
2018-01-22 15:07:14 +09:00
parent 65a2e09593
commit 583aa9922f
4 changed files with 9 additions and 7 deletions

View File

@ -1,13 +1,15 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Game.Rulesets.Mods;
namespace osu.Game.Rulesets.Mania.Mods namespace osu.Game.Rulesets.Mania.Mods
{ {
public interface IKeyBindingMod public interface IPlayfieldTypeMod : IApplicableMod
{ {
/// <summary> /// <summary>
/// The keybinding variant which this <see cref="IKeyBindingMod"/> requires. /// The <see cref="PlayfieldType"/> which this <see cref="IPlayfieldTypeMod"/> requires.
/// </summary> /// </summary>
PlayfieldType Variant { get; } PlayfieldType PlayfieldType { get; }
} }
} }

View File

@ -12,7 +12,7 @@ using osu.Game.Rulesets.UI;
namespace osu.Game.Rulesets.Mania.Mods namespace osu.Game.Rulesets.Mania.Mods
{ {
public class ManiaModKeyCoop : Mod, IKeyBindingMod, IApplicableToBeatmapConverter<ManiaHitObject>, IApplicableToRulesetContainer<ManiaHitObject> public class ManiaModKeyCoop : Mod, IPlayfieldTypeMod, IApplicableToBeatmapConverter<ManiaHitObject>, IApplicableToRulesetContainer<ManiaHitObject>
{ {
public override string Name => "KeyCoop"; public override string Name => "KeyCoop";
public override string ShortenedName => "2P"; public override string ShortenedName => "2P";
@ -45,6 +45,6 @@ namespace osu.Game.Rulesets.Mania.Mods
mrc.Beatmap.Stages = newDefinitions; mrc.Beatmap.Stages = newDefinitions;
} }
public PlayfieldType Variant => PlayfieldType.Dual; public PlayfieldType PlayfieldType => PlayfieldType.Dual;
} }
} }

View File

@ -79,7 +79,7 @@ namespace osu.Game.Rulesets.Mania.UI
public override PassThroughInputManager CreateInputManager() public override PassThroughInputManager CreateInputManager()
{ {
var variantType = Mods.OfType<IKeyBindingMod>().FirstOrDefault()?.Variant ?? PlayfieldType.Single; var variantType = Mods.OfType<IPlayfieldTypeMod>().FirstOrDefault()?.PlayfieldType ?? PlayfieldType.Single;
return new ManiaInputManager(Ruleset.RulesetInfo, (int)variantType + Beatmap.TotalColumns); return new ManiaInputManager(Ruleset.RulesetInfo, (int)variantType + Beatmap.TotalColumns);
} }

View File

@ -64,7 +64,7 @@
<Compile Include="Judgements\HoldNoteTickJudgement.cs" /> <Compile Include="Judgements\HoldNoteTickJudgement.cs" />
<Compile Include="Judgements\ManiaJudgement.cs" /> <Compile Include="Judgements\ManiaJudgement.cs" />
<Compile Include="ManiaDifficultyCalculator.cs" /> <Compile Include="ManiaDifficultyCalculator.cs" />
<Compile Include="Mods\IKeyBindingMod.cs" /> <Compile Include="Mods\IPlayfieldTypeMod.cs" />
<Compile Include="Mods\ManiaKeyMod.cs" /> <Compile Include="Mods\ManiaKeyMod.cs" />
<Compile Include="Mods\ManiaModAutoplay.cs" /> <Compile Include="Mods\ManiaModAutoplay.cs" />
<Compile Include="Mods\ManiaModDaycore.cs" /> <Compile Include="Mods\ManiaModDaycore.cs" />