2019-01-24 08:43:03 +00: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 08:50:27 +00:00
|
|
|
|
|
2019-05-03 01:05:45 +00:00
|
|
|
|
using System;
|
2021-09-10 02:09:13 +00:00
|
|
|
|
using osu.Framework.Graphics.Sprites;
|
2022-08-10 19:51:11 +00:00
|
|
|
|
using osu.Framework.Localisation;
|
2018-12-12 07:06:56 +00:00
|
|
|
|
|
2018-11-30 08:50:27 +00:00
|
|
|
|
namespace osu.Game.Rulesets.Mods
|
2018-11-30 08:16:00 +00:00
|
|
|
|
{
|
2019-05-03 01:05:45 +00:00
|
|
|
|
public interface IMod : IEquatable<IMod>
|
2018-11-30 08:16:00 +00:00
|
|
|
|
{
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The shortened name of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Acronym { get; }
|
2021-09-10 02:09:13 +00:00
|
|
|
|
|
2021-09-10 03:42:53 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The name of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
string Name { get; }
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The user readable description of this mod.
|
|
|
|
|
/// </summary>
|
2022-08-10 19:51:11 +00:00
|
|
|
|
LocalisableString Description { get; }
|
2021-09-10 03:42:53 +00:00
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// The type of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
ModType Type { get; }
|
|
|
|
|
|
2021-09-10 02:09:13 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// The icon of this mod.
|
|
|
|
|
/// </summary>
|
|
|
|
|
IconUsage? Icon { get; }
|
|
|
|
|
|
2022-03-17 00:40:15 +00:00
|
|
|
|
/// <summary>
|
2022-03-17 23:08:11 +00: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 00:40:15 +00:00
|
|
|
|
/// </summary>
|
2022-03-17 23:08:11 +00:00
|
|
|
|
bool UserPlayable { get; }
|
2022-03-17 00:40:15 +00:00
|
|
|
|
|
2022-05-05 11:37:38 +00: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; }
|
|
|
|
|
|
2021-09-10 02:09:13 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// Create a fresh <see cref="Mod"/> instance based on this mod.
|
|
|
|
|
/// </summary>
|
2022-12-16 09:16:26 +00:00
|
|
|
|
Mod CreateInstance() => (Mod)Activator.CreateInstance(GetType())!;
|
2018-11-30 08:16:00 +00:00
|
|
|
|
}
|
|
|
|
|
}
|