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-04-13 09:19:50 +00:00
|
|
|
|
|
2022-06-17 07:37:17 +00:00
|
|
|
|
#nullable disable
|
|
|
|
|
|
2022-08-01 14:57:46 +00:00
|
|
|
|
using System.ComponentModel;
|
2021-07-21 11:15:07 +00:00
|
|
|
|
using osu.Framework.Localisation;
|
2022-08-02 07:30:14 +00:00
|
|
|
|
using osu.Game.Localisation;
|
2021-07-21 11:15:07 +00:00
|
|
|
|
using osu.Game.Resources.Localisation.Web;
|
|
|
|
|
|
2018-03-27 00:04:45 +00:00
|
|
|
|
namespace osu.Game.Beatmaps
|
|
|
|
|
{
|
2021-11-24 09:42:47 +00:00
|
|
|
|
public enum BeatmapOnlineStatus
|
2018-03-27 00:04:45 +00:00
|
|
|
|
{
|
2022-08-02 03:12:02 +00:00
|
|
|
|
/// <summary>
|
|
|
|
|
/// This is a special status given when local changes are made via the editor.
|
|
|
|
|
/// Once in this state, online status changes should be ignored unless the beatmap is reverted or submitted.
|
|
|
|
|
/// </summary>
|
2022-08-01 14:57:46 +00:00
|
|
|
|
[Description("Local")]
|
2022-08-02 07:30:14 +00:00
|
|
|
|
[LocalisableDescription(typeof(SongSelectStrings), nameof(SongSelectStrings.LocallyModified))]
|
2022-08-01 14:57:46 +00:00
|
|
|
|
LocallyModified = -4,
|
|
|
|
|
|
2018-03-27 20:59:58 +00:00
|
|
|
|
None = -3,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusGraveyard))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
Graveyard = -2,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusWip))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
WIP = -1,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusPending))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
Pending = 0,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusRanked))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
Ranked = 1,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusApproved))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
Approved = 2,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusQualified))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
Qualified = 3,
|
2021-07-30 22:38:54 +00:00
|
|
|
|
|
|
|
|
|
[LocalisableDescription(typeof(BeatmapsetsStrings), nameof(BeatmapsetsStrings.ShowStatusLoved))]
|
2018-03-27 00:04:45 +00:00
|
|
|
|
Loved = 4,
|
|
|
|
|
}
|
2021-04-30 19:40:16 +00:00
|
|
|
|
|
|
|
|
|
public static class BeatmapSetOnlineStatusExtensions
|
|
|
|
|
{
|
2021-11-24 09:42:47 +00:00
|
|
|
|
public static bool GrantsPerformancePoints(this BeatmapOnlineStatus status)
|
|
|
|
|
=> status == BeatmapOnlineStatus.Ranked || status == BeatmapOnlineStatus.Approved;
|
2021-04-30 19:40:16 +00:00
|
|
|
|
}
|
2018-03-27 00:04:45 +00:00
|
|
|
|
}
|