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-06-21 12:26:15 +09:00
|
|
|
|
|
2021-11-15 16:06:46 +09:00
|
|
|
|
using System.Collections.Generic;
|
2022-06-27 15:05:49 +09:00
|
|
|
|
using osu.Game.Beatmaps;
|
2018-06-21 12:26:15 +09:00
|
|
|
|
using osu.Game.Rulesets.Difficulty;
|
|
|
|
|
|
|
|
|
|
namespace osu.Game.Rulesets.Catch.Difficulty
|
|
|
|
|
{
|
|
|
|
|
public class CatchDifficultyAttributes : DifficultyAttributes
|
|
|
|
|
{
|
2021-11-15 18:11:07 +09:00
|
|
|
|
public override IEnumerable<(int attributeId, object value)> ToDatabaseAttributes()
|
2021-11-15 16:06:46 +09:00
|
|
|
|
{
|
2021-11-15 18:11:07 +09:00
|
|
|
|
foreach (var v in base.ToDatabaseAttributes())
|
2021-11-15 16:06:46 +09:00
|
|
|
|
yield return v;
|
|
|
|
|
|
2021-11-17 20:31:18 +09:00
|
|
|
|
// Todo: osu!catch should not output star rating in the 'aim' attribute.
|
|
|
|
|
yield return (ATTRIB_ID_AIM, StarRating);
|
2021-11-15 16:06:46 +09:00
|
|
|
|
}
|
|
|
|
|
|
2022-06-27 15:05:49 +09:00
|
|
|
|
public override void FromDatabaseAttributes(IReadOnlyDictionary<int, double> values, IBeatmapOnlineInfo onlineInfo)
|
2021-11-15 16:06:46 +09:00
|
|
|
|
{
|
2022-06-27 15:05:49 +09:00
|
|
|
|
base.FromDatabaseAttributes(values, onlineInfo);
|
2021-11-15 16:06:46 +09:00
|
|
|
|
|
2021-11-17 20:31:18 +09:00
|
|
|
|
StarRating = values[ATTRIB_ID_AIM];
|
2021-11-15 16:06:46 +09:00
|
|
|
|
}
|
2018-06-21 12:26:15 +09:00
|
|
|
|
}
|
|
|
|
|
}
|