mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 14:12:56 +08:00
Add a base interface for applicable mods
This commit is contained in:
parent
d18b6aada9
commit
fea4e1ff68
10
osu.Game/Rulesets/Mods/IApplicableMod.cs
Normal file
10
osu.Game/Rulesets/Mods/IApplicableMod.cs
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
|
namespace osu.Game.Rulesets.Mods
|
||||||
|
{
|
||||||
|
// The base interface for a mod which can be applied in some way.
|
||||||
|
public interface IApplicableMod
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface for mods that make adjustments to the track.
|
/// An interface for mods that make adjustments to the track.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToClock
|
public interface IApplicableToClock : IApplicableMod
|
||||||
{
|
{
|
||||||
void ApplyToClock(IAdjustableClock clock);
|
void ApplyToClock(IAdjustableClock clock);
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface for mods that make general adjustments to difficulty.
|
/// An interface for mods that make general adjustments to difficulty.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToDifficulty
|
public interface IApplicableToDifficulty : IApplicableMod
|
||||||
{
|
{
|
||||||
void ApplyToDifficulty(BeatmapDifficulty difficulty);
|
void ApplyToDifficulty(BeatmapDifficulty difficulty);
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface for <see cref="Mod"/>s that can be applied to <see cref="DrawableHitObject"/>s.
|
/// An interface for <see cref="Mod"/>s that can be applied to <see cref="DrawableHitObject"/>s.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToDrawableHitObjects
|
public interface IApplicableToDrawableHitObjects : IApplicableMod
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Applies this <see cref="IApplicableToDrawableHitObjects"/> to a list of <see cref="DrawableHitObject"/>s.
|
/// Applies this <see cref="IApplicableToDrawableHitObjects"/> to a list of <see cref="DrawableHitObject"/>s.
|
||||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface for <see cref="Mod"/>s that can be applied to <see cref="HitObject"/>s.
|
/// An interface for <see cref="Mod"/>s that can be applied to <see cref="HitObject"/>s.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToHitObject<in TObject>
|
public interface IApplicableToHitObject<in TObject> : IApplicableMod
|
||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -9,7 +9,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface for <see cref="Mod"/>s that can be applied to <see cref="RulesetContainer"/>s.
|
/// An interface for <see cref="Mod"/>s that can be applied to <see cref="RulesetContainer"/>s.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToRulesetContainer<TObject>
|
public interface IApplicableToRulesetContainer<TObject> : IApplicableMod
|
||||||
where TObject : HitObject
|
where TObject : HitObject
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -8,7 +8,7 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// An interface for mods that make general adjustments to score processor.
|
/// An interface for mods that make general adjustments to score processor.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public interface IApplicableToScoreProcessor
|
public interface IApplicableToScoreProcessor : IApplicableMod
|
||||||
{
|
{
|
||||||
void ApplyToScoreProcessor(ScoreProcessor scoreProcessor);
|
void ApplyToScoreProcessor(ScoreProcessor scoreProcessor);
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,11 @@ namespace osu.Game.Rulesets.Mods
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public abstract double ScoreMultiplier { get; }
|
public abstract double ScoreMultiplier { get; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Returns true if this mod is implemented (and playable).
|
||||||
|
/// </summary>
|
||||||
|
public virtual bool HasImplementation => this is IApplicableMod;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Returns if this mod is ranked.
|
/// Returns if this mod is ranked.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
@ -310,6 +310,7 @@
|
|||||||
<Compile Include="Overlays\Profile\Sections\Ranks\DrawableTotalScore.cs" />
|
<Compile Include="Overlays\Profile\Sections\Ranks\DrawableTotalScore.cs" />
|
||||||
<Compile Include="Overlays\Profile\Sections\Ranks\ScoreModsContainer.cs" />
|
<Compile Include="Overlays\Profile\Sections\Ranks\ScoreModsContainer.cs" />
|
||||||
<Compile Include="Overlays\Settings\Sections\Maintenance\DeleteAllBeatmapsDialog.cs" />
|
<Compile Include="Overlays\Settings\Sections\Maintenance\DeleteAllBeatmapsDialog.cs" />
|
||||||
|
<Compile Include="Rulesets\Mods\IApplicableMod.cs" />
|
||||||
<Compile Include="Rulesets\Mods\IApplicableToDrawableHitObject.cs" />
|
<Compile Include="Rulesets\Mods\IApplicableToDrawableHitObject.cs" />
|
||||||
<Compile Include="Screens\Select\ImportFromStablePopup.cs" />
|
<Compile Include="Screens\Select\ImportFromStablePopup.cs" />
|
||||||
<Compile Include="Overlays\Settings\SettingsButton.cs" />
|
<Compile Include="Overlays\Settings\SettingsButton.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user