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