2019-01-24 16:43:03 +08:00
|
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
2018-11-30 16:50:27 +08:00
|
|
|
|
|
2019-05-03 09:05:45 +08:00
|
|
|
|
using System;
|
2021-09-10 10:09:13 +08:00
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2022-08-11 03:51:11 +08:00
|
|
|
|
using osu.Framework.Localisation;
|
2018-12-12 15:06:56 +08:00
|
|
|
|
|
2018-11-30 16:50:27 +08:00
|
|
|
|
namespace osu.Game.Rulesets.Mods
|
2018-11-30 16:16:00 +08:00
|
|
|
|
{
|
2019-05-03 09:05:45 +08:00
|
|
|
|
public interface IMod : IEquatable<IMod>
|
2018-11-30 16:16:00 +08:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The shortened name of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Acronym { get; }
|
2021-09-10 10:09:13 +08:00
|
|
|
|
|
2021-09-10 11:42:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
2023-09-27 17:54:47 +08:00
|
|
|
|
/// <summary>
|
2023-09-28 21:10:30 +08:00
|
|
|
|
/// Short important information to display on the mod icon. For example, a rate adjust mod's rate
|
2023-09-27 17:54:47 +08:00
|
|
|
|
/// or similarly important setting.
|
2023-09-28 21:10:30 +08:00
|
|
|
|
/// Use <see cref="string.Empty"/> if the icon should not display any additional info.
|
2023-09-27 17:54:47 +08:00
|
|
|
|
/// </summary>
|
|
|
|
|
string ExtendedIconInformation { get; }
|
|
|
|
|
|
2021-09-10 11:42:53 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The user readable description of this mod.
|
|
|
|
|
/// </summary>
|
2022-08-11 03:51:11 +08:00
|
|
|
|
LocalisableString Description { get; }
|
2021-09-10 11:42:53 +08:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The type of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ModType Type { get; }
|
|
|
|
|
|
2021-09-10 10:09:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The icon of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IconUsage? Icon { get; }
|
|
|
|
|
|
2022-03-17 08:40:15 +08:00
|
|
|
|
/// <summary>
|
2022-03-18 07:08:11 +08:00
|
|
|
|
/// Whether this mod is playable by an end user.
|
|
|
|
|
/// Should be <c>false</c> for cases where the user is not interacting with the game (so it can be excluded from multiplayer selection, for example).
|
2022-03-17 08:40:15 +08:00
|
|
|
|
/// </summary>
|
2022-03-18 07:08:11 +08:00
|
|
|
|
bool UserPlayable { get; }
|
2022-03-17 08:40:15 +08:00
|
|
|
|
|
2022-05-05 19:37:38 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this mod is valid for multiplayer matches.
|
|
|
|
|
/// Should be <c>false</c> for mods that make gameplay duration dependent on user input (e.g. <see cref="ModAdaptiveSpeed"/>).
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool ValidForMultiplayer { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether this mod is valid as a free mod in multiplayer matches.
|
|
|
|
|
/// Should be <c>false</c> for mods that affect the gameplay duration (e.g. <see cref="ModRateAdjust"/> and <see cref="ModTimeRamp"/>).
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool ValidForMultiplayerAsFreeMod { get; }
|
|
|
|
|
|
2023-11-03 02:25:57 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Indicates that this mod is always permitted in scenarios wherein a user is submitting a score regardless of other circumstances.
|
|
|
|
|
/// Intended for mods that are informational in nature and do not really affect gameplay by themselves,
|
|
|
|
|
/// but are more of a gauge of increased/decreased difficulty due to the user's configuration (e.g. <see cref="ModTouchDevice"/>).
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool AlwaysValidForSubmission { get; }
|
|
|
|
|
|
2024-01-31 21:48:27 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Whether scores with this mod active can give performance points.
|
|
|
|
|
/// </summary>
|
|
|
|
|
bool Ranked { get; }
|
|
|
|
|
|
2021-09-10 10:09:13 +08:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Create a fresh <see cref="Mod"/> instance based on this mod.
|
|
|
|
|
/// </summary>
|
2022-12-16 17:16:26 +08:00
|
|
|
|
Mod CreateInstance() => (Mod)Activator.CreateInstance(GetType())!;
|
2018-11-30 16:16:00 +08:00
|
|
|
|
}
|
|
|
|
|
}
|