mirror of
https://github.com/MewoLab/AquaDX.git
synced 2026-02-11 23:17:28 +08:00
[+] Play Count in SelectionDetail
This commit is contained in:
9
AquaMai/Resources/Locale.Designer.cs
generated
9
AquaMai/Resources/Locale.Designer.cs
generated
@@ -160,6 +160,15 @@ namespace AquaMai.Resources {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Looks up a localized string similar to 游玩次数:{0}.
|
||||||
|
/// </summary>
|
||||||
|
internal static string PlayCount {
|
||||||
|
get {
|
||||||
|
return ResourceManager.GetString("PlayCount", resourceCulture);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Looks up a localized string similar to SSS+ => DXRating += {0}.
|
/// Looks up a localized string similar to SSS+ => DXRating += {0}.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -101,4 +101,7 @@
|
|||||||
<data name="CiBuildAlertContent" xml:space="preserve">
|
<data name="CiBuildAlertContent" xml:space="preserve">
|
||||||
<value>You are using AquaMai CI build version. This version is built from the latest mainline code and may contain undocumented configuration changes or potential issues.</value>
|
<value>You are using AquaMai CI build version. This version is built from the latest mainline code and may contain undocumented configuration changes or potential issues.</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PlayCount" xml:space="preserve">
|
||||||
|
<value>游玩次数:{0}</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@@ -94,4 +94,7 @@
|
|||||||
<data name="CiBuildAlertContent" xml:space="preserve">
|
<data name="CiBuildAlertContent" xml:space="preserve">
|
||||||
<value>您正在使用的是 AquaMai CI 构建版本。由于该版本基于最新的主线代码构建,可能包含未通知的配置文件变更或潜在问题。</value>
|
<value>您正在使用的是 AquaMai CI 构建版本。由于该版本基于最新的主线代码构建,可能包含未通知的配置文件变更或潜在问题。</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="PlayCount" xml:space="preserve">
|
||||||
|
<value>Play Count: {0}</value>
|
||||||
|
</data>
|
||||||
</root>
|
</root>
|
||||||
|
|||||||
@@ -69,6 +69,7 @@ public class SelectionDetail
|
|||||||
private abstract class Window : MonoBehaviour
|
private abstract class Window : MonoBehaviour
|
||||||
{
|
{
|
||||||
protected abstract int player { get; }
|
protected abstract int player { get; }
|
||||||
|
private UserData userData => Singleton<UserDataManager>.Instance.GetUserData(player);
|
||||||
|
|
||||||
public void OnGUI()
|
public void OnGUI()
|
||||||
{
|
{
|
||||||
@@ -88,6 +89,12 @@ public class SelectionDetail
|
|||||||
dataToShow.Add(string.Format(Locale.RatingUpWhenSSSp, rate));
|
dataToShow.Add(string.Format(Locale.RatingUpWhenSSSp, rate));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
var playCount = Shim.GetUserScoreList(userData)[difficulty[player]].FirstOrDefault(it => it.id == SelectData.MusicData.name.id)?.playcount ?? 0;
|
||||||
|
if (playCount > 0)
|
||||||
|
{
|
||||||
|
dataToShow.Add(string.Format(Locale.PlayCount, playCount));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
var width = GuiSizes.FontSize * 15f;
|
var width = GuiSizes.FontSize * 15f;
|
||||||
var x = GuiSizes.PlayerCenter - width / 2f + GuiSizes.PlayerWidth * player;
|
var x = GuiSizes.PlayerCenter - width / 2f + GuiSizes.PlayerWidth * player;
|
||||||
@@ -107,8 +114,7 @@ public class SelectionDetail
|
|||||||
private uint CalcB50(MusicData musicData, int difficulty)
|
private uint CalcB50(MusicData musicData, int difficulty)
|
||||||
{
|
{
|
||||||
var newRate = new UserRate(musicData.name.id, difficulty, 1010000, (uint)musicData.version);
|
var newRate = new UserRate(musicData.name.id, difficulty, 1010000, (uint)musicData.version);
|
||||||
var user = Singleton<UserDataManager>.Instance.GetUserData(player);
|
var userLowRate = (newRate.OldFlag ? userData.RatingList.RatingList : userData.RatingList.NewRatingList).Last();
|
||||||
var userLowRate = (newRate.OldFlag ? user.RatingList.RatingList : user.RatingList.NewRatingList).Last();
|
|
||||||
|
|
||||||
if (newRate.SingleRate > userLowRate.SingleRate)
|
if (newRate.SingleRate > userLowRate.SingleRate)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user