mirror of https://github.com/hykilpikonna/AquaDX
[+] Show tip when saving is done
parent
c34affc215
commit
e39f013808
|
@ -1,4 +1,5 @@
|
|||
using HarmonyLib;
|
||||
using Main;
|
||||
using Process;
|
||||
|
||||
namespace AquaMai.Helpers;
|
||||
|
@ -6,6 +7,7 @@ namespace AquaMai.Helpers;
|
|||
public class SharedInstances
|
||||
{
|
||||
public static ProcessDataContainer ProcessDataContainer { get; private set; }
|
||||
public static GameMainObject GameMainObject { get; private set; }
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(ProcessDataContainer), MethodType.Constructor)]
|
||||
|
@ -13,4 +15,11 @@ public class SharedInstances
|
|||
{
|
||||
ProcessDataContainer = __instance;
|
||||
}
|
||||
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(GameMainObject), "Awake")]
|
||||
public static void OnCreateGameMainObject(GameMainObject __instance)
|
||||
{
|
||||
GameMainObject = __instance;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -175,19 +175,11 @@ namespace AquaMai
|
|||
if (_hasErrors)
|
||||
{
|
||||
MelonLogger.Warning("========================================================================!!!");
|
||||
MelonLogger.Warning("加载过程中检测到错误!");
|
||||
MelonLogger.Warning("- 请检查你是否安装了错误的 AquaMai 版本,比如在 SDGA 上使用了 SDEZ 的版本");
|
||||
MelonLogger.Warning("- 你是否正在使用魔改的 Assembly-CSharp.dll,这会导致函数不一致而无法找到需要修改的函数");
|
||||
MelonLogger.Warning("- 请检查是否有冲突的 Mod,或者开启了不兼容的选项");
|
||||
MelonLogger.Warning("===========================================================================");
|
||||
MelonLogger.Warning("Errors detected while loading!");
|
||||
MelonLogger.Warning("- Check if you have installed the wrong version of AquaMai, such as using SDEZ version on SDGA");
|
||||
MelonLogger.Warning("- Are you using a modified Assembly-CSharp.dll, which will cause inconsistent functions and cannot find the functions that need to be modified");
|
||||
MelonLogger.Warning("- Check for conflicting mods, or enabled incompatible options");
|
||||
MelonLogger.Warning(Locale.LoadError);
|
||||
MelonLogger.Warning("===========================================================================");
|
||||
}
|
||||
|
||||
MelonLogger.Msg("Loaded!");
|
||||
MelonLogger.Msg(Locale.Loaded);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -7,12 +7,10 @@
|
|||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
using MelonLoader;
|
||||
|
||||
namespace AquaMai.Resources {
|
||||
using System;
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
|
@ -24,15 +22,15 @@ namespace AquaMai.Resources {
|
|||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Locale {
|
||||
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Locale() {
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
|
@ -46,7 +44,7 @@ namespace AquaMai.Resources {
|
|||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
|
@ -60,7 +58,28 @@ namespace AquaMai.Resources {
|
|||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Loaded!.
|
||||
/// </summary>
|
||||
internal static string Loaded {
|
||||
get {
|
||||
return ResourceManager.GetString("Loaded", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Errors detected while loading!
|
||||
///- Check if you have installed the wrong version of AquaMai, such as using SDEZ version on SDGA
|
||||
///- Are you using a modified Assembly-CSharp.dll, which will cause inconsistent functions and cannot find the functions that need to be modified
|
||||
///- Check for conflicting mods, or enabled incompatible options.
|
||||
/// </summary>
|
||||
internal static string LoadError {
|
||||
get {
|
||||
return ResourceManager.GetString("LoadError", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to End.
|
||||
/// </summary>
|
||||
|
@ -69,7 +88,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("MarkRepeatEnd", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Start.
|
||||
/// </summary>
|
||||
|
@ -78,7 +97,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("MarkRepeatStart", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Pause.
|
||||
/// </summary>
|
||||
|
@ -87,7 +106,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("Pause", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Loop Not Set.
|
||||
/// </summary>
|
||||
|
@ -96,7 +115,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("RepeatNotSet", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Reset.
|
||||
/// </summary>
|
||||
|
@ -105,7 +124,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("RepeatReset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Loop Set.
|
||||
/// </summary>
|
||||
|
@ -114,7 +133,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("RepeatStartEndSet", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Loop Start Set.
|
||||
/// </summary>
|
||||
|
@ -123,7 +142,16 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("RepeatStartSet", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Saving... Do not exit the game.
|
||||
/// </summary>
|
||||
internal static string SavingDontExit {
|
||||
get {
|
||||
return ResourceManager.GetString("SavingDontExit", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Seek <<.
|
||||
/// </summary>
|
||||
|
@ -132,7 +160,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("SeekBackward", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Seek >>.
|
||||
/// </summary>
|
||||
|
@ -141,7 +169,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("SeekForward", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Speed.
|
||||
/// </summary>
|
||||
|
@ -150,7 +178,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("Speed", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Speed -.
|
||||
/// </summary>
|
||||
|
@ -159,7 +187,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("SpeedDown", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Speed Reset.
|
||||
/// </summary>
|
||||
|
@ -168,7 +196,7 @@ namespace AquaMai.Resources {
|
|||
return ResourceManager.GetString("SpeedReset", resourceCulture);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Looks up a localized string similar to Speed +.
|
||||
/// </summary>
|
||||
|
|
|
@ -57,4 +57,16 @@
|
|||
<data name="SpeedReset" xml:space="preserve">
|
||||
<value>Speed Reset</value>
|
||||
</data>
|
||||
<data name="LoadError" xml:space="preserve">
|
||||
<value>Errors detected while loading!
|
||||
- Check if you have installed the wrong version of AquaMai, such as using SDEZ version on SDGA
|
||||
- Are you using a modified Assembly-CSharp.dll, which will cause inconsistent functions and cannot find the functions that need to be modified
|
||||
- Check for conflicting mods, or enabled incompatible options</value>
|
||||
</data>
|
||||
<data name="SavingDontExit" xml:space="preserve">
|
||||
<value>Saving... Do not exit the game</value>
|
||||
</data>
|
||||
<data name="Loaded" xml:space="preserve">
|
||||
<value>Loaded!</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -50,4 +50,16 @@
|
|||
<data name="SpeedUp" xml:space="preserve">
|
||||
<value>速度 +</value>
|
||||
</data>
|
||||
<data name="LoadError" xml:space="preserve">
|
||||
<value>加载过程中检测到错误!
|
||||
- 请检查你是否安装了错误的 AquaMai 版本,比如在 SDGA 上使用了 SDEZ 的版本
|
||||
- 你是否正在使用魔改的 Assembly-CSharp.dll,这会导致函数不一致而无法找到需要修改的函数
|
||||
- 请检查是否有冲突的 Mod,或者开启了不兼容的选项</value>
|
||||
</data>
|
||||
<data name="SavingDontExit" xml:space="preserve">
|
||||
<value>正在保存… 请不要关闭游戏</value>
|
||||
</data>
|
||||
<data name="Loaded" xml:space="preserve">
|
||||
<value>加载完成!</value>
|
||||
</data>
|
||||
</root>
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using AquaMai.Helpers;
|
||||
using AquaMai.Resources;
|
||||
using DB;
|
||||
using HarmonyLib;
|
||||
using MAI2.Util;
|
||||
|
@ -15,181 +17,238 @@ using Net.Packet.Helper;
|
|||
using Net.Packet.Mai2;
|
||||
using Process;
|
||||
using Process.UserDataNet.State.UserDataULState;
|
||||
using UnityEngine;
|
||||
|
||||
namespace AquaMai.UX
|
||||
namespace AquaMai.UX;
|
||||
|
||||
public class ImmediateSave
|
||||
{
|
||||
public class ImmediateSave
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(StateULUserAime), "RequestUploadUserPlayLogData")]
|
||||
public static bool PreRequestUploadUserPlayLogData(StateULUserAime __instance)
|
||||
{
|
||||
[HarmonyPrefix]
|
||||
[HarmonyPatch(typeof(StateULUserAime), "RequestUploadUserPlayLogData")]
|
||||
public static bool PreRequestUploadUserPlayLogData(StateULUserAime __instance)
|
||||
Traverse.Create(__instance).Method("RequestUploadUserPortraitData").GetValue();
|
||||
return false;
|
||||
}
|
||||
|
||||
private static SavingUi ui;
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(ResultProcess), "OnStart")]
|
||||
public static void ResultProcessOnStart()
|
||||
{
|
||||
var doneCount = 0;
|
||||
|
||||
void CheckSaveDone()
|
||||
{
|
||||
Traverse.Create(__instance).Method("RequestUploadUserPortraitData").GetValue();
|
||||
return false;
|
||||
doneCount++;
|
||||
if (doneCount == 4)
|
||||
{
|
||||
if (ui != null)
|
||||
{
|
||||
UnityEngine.Object.Destroy(ui);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[HarmonyPostfix]
|
||||
[HarmonyPatch(typeof(ResultProcess), "OnStart")]
|
||||
public static void ResultProcessOnStart()
|
||||
for (int i = 0; i < 2; i++)
|
||||
{
|
||||
for (int i = 0; i < 2; i++)
|
||||
var userData = Singleton<UserDataManager>.Instance.GetUserData(i);
|
||||
if (!userData.IsEntry || userData.IsGuest())
|
||||
{
|
||||
var userData = Singleton<UserDataManager>.Instance.GetUserData(i);
|
||||
if(!userData.IsEntry) continue;
|
||||
if(userData.IsGuest()) continue;
|
||||
doneCount += 2;
|
||||
continue;
|
||||
}
|
||||
|
||||
SaveDataFix(userData);
|
||||
if (ui == null)
|
||||
{
|
||||
ui = SharedInstances.GameMainObject.gameObject.AddComponent<SavingUi>();
|
||||
}
|
||||
|
||||
SaveDataFix(userData);
|
||||
# if SDGA145
|
||||
PacketHelper.StartPacket(new PacketUploadUserPlaylog(i, userData, (int)GameManager.MusicTrackNumber - 1,
|
||||
PacketHelper.StartPacket(new PacketUploadUserPlaylog(i, userData, (int)GameManager.MusicTrackNumber - 1,
|
||||
# else
|
||||
var accessToken = Singleton<OperationManager>.Instance.GetAccessToken(i);
|
||||
PacketHelper.StartPacket(new PacketUploadUserPlaylog(i, userData, (int)GameManager.MusicTrackNumber - 1, accessToken,
|
||||
# endif
|
||||
delegate { MelonLogger.Msg("Playlog saved"); },
|
||||
delegate(PacketStatus err)
|
||||
{
|
||||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, i);
|
||||
MelonLogger.Error("Playlog save error");
|
||||
MelonLogger.Error(err);
|
||||
}));
|
||||
# if SDGA145
|
||||
PacketHelper.StartPacket(new PacketUpsertUserAll(i, userData, delegate(int code)
|
||||
# else
|
||||
PacketHelper.StartPacket(new PacketUpsertUserAll(i, userData, accessToken, delegate(int code)
|
||||
var accessToken = Singleton<OperationManager>.Instance.GetAccessToken(i);
|
||||
PacketHelper.StartPacket(new PacketUploadUserPlaylog(i, userData, (int)GameManager.MusicTrackNumber - 1, accessToken,
|
||||
# endif
|
||||
delegate
|
||||
{
|
||||
if (code == 1)
|
||||
{
|
||||
MelonLogger.Msg("UserAll saved");
|
||||
}
|
||||
else
|
||||
{
|
||||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, i);
|
||||
MelonLogger.Error("UserAll upsert error");
|
||||
MelonLogger.Error(code);
|
||||
}
|
||||
}, delegate(PacketStatus err)
|
||||
MelonLogger.Msg("Playlog saved");
|
||||
CheckSaveDone();
|
||||
},
|
||||
delegate(PacketStatus err)
|
||||
{
|
||||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, i);
|
||||
MelonLogger.Error("Playlog save error");
|
||||
MelonLogger.Error(err);
|
||||
MessageHelper.ShowMessage("Playlog save error");
|
||||
CheckSaveDone();
|
||||
}));
|
||||
# if SDGA145
|
||||
PacketHelper.StartPacket(new PacketUpsertUserAll(i, userData, delegate(int code)
|
||||
# else
|
||||
PacketHelper.StartPacket(new PacketUpsertUserAll(i, userData, accessToken, delegate(int code)
|
||||
# endif
|
||||
{
|
||||
if (code == 1)
|
||||
{
|
||||
MelonLogger.Msg("UserAll saved");
|
||||
CheckSaveDone();
|
||||
}
|
||||
else
|
||||
{
|
||||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, i);
|
||||
MelonLogger.Error("UserAll upsert error");
|
||||
MelonLogger.Error(err);
|
||||
}));
|
||||
MelonLogger.Error(code);
|
||||
MessageHelper.ShowMessage("UserAll upsert error");
|
||||
CheckSaveDone();
|
||||
}
|
||||
}, delegate(PacketStatus err)
|
||||
{
|
||||
SoundManager.PlaySE(Mai2.Mai2Cue.Cue.SE_ENTRY_AIME_ERROR, i);
|
||||
MelonLogger.Error("UserAll upsert error");
|
||||
MelonLogger.Error(err);
|
||||
MessageHelper.ShowMessage("UserAll upsert error");
|
||||
CheckSaveDone();
|
||||
}));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void SaveDataFix(UserData userData)
|
||||
{
|
||||
UserDetail detail = userData.Detail;
|
||||
_ = userData.ScoreList;
|
||||
detail.EventWatchedDate = TimeManager.GetDateString(TimeManager.PlayBaseTime);
|
||||
userData.CalcTotalValue();
|
||||
float num = 0f;
|
||||
try
|
||||
{
|
||||
if (userData.RatingList.RatingList.Any())
|
||||
{
|
||||
num = userData.RatingList.RatingList.Last().SingleRate;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
private static void SaveDataFix(UserData userData)
|
||||
catch
|
||||
{
|
||||
UserDetail detail = userData.Detail;
|
||||
_ = userData.ScoreList;
|
||||
detail.EventWatchedDate = TimeManager.GetDateString(TimeManager.PlayBaseTime);
|
||||
userData.CalcTotalValue();
|
||||
float num = 0f;
|
||||
try
|
||||
}
|
||||
|
||||
num = (float)Math.Ceiling((double)((num + 1f) / GameManager.TheoryRateBorderNum) * 10.0);
|
||||
float num2 = 0f;
|
||||
try
|
||||
{
|
||||
if (userData.RatingList.NextRatingList.Any())
|
||||
{
|
||||
if (userData.RatingList.RatingList.Any())
|
||||
{
|
||||
num = userData.RatingList.RatingList.Last().SingleRate;
|
||||
}
|
||||
num2 = userData.RatingList.NewRatingList.Last().SingleRate;
|
||||
}
|
||||
catch
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
num2 = (float)Math.Ceiling((double)((num2 + 1f) / GameManager.TheoryRateBorderNum) * 10.0);
|
||||
string logDateString = TimeManager.GetLogDateString(TimeManager.PlayBaseTime);
|
||||
string timeJp = (string.IsNullOrEmpty(userData.Detail.DailyBonusDate) ? TimeManager.GetLogDateString(0L) : userData.Detail.DailyBonusDate);
|
||||
if (userData.IsEntry && userData.Detail.IsNetMember >= 2 && !GameManager.IsEventMode && TimeManager.GetUnixTime(logDateString) > TimeManager.GetUnixTime(timeJp) && Singleton<UserDataManager>.Instance.IsSingleUser() && !GameManager.IsFreedomMode && !GameManager.IsCourseMode && !DoneEntry.IsWeekdayBonus(userData))
|
||||
{
|
||||
userData.Detail.DailyBonusDate = logDateString;
|
||||
}
|
||||
|
||||
List<UserRate> list = new List<UserRate>();
|
||||
List<UserRate> list2 = new List<UserRate>();
|
||||
List<UserScore>[] scoreList = userData.ScoreList;
|
||||
List<UserRate> ratingList = userData.RatingList.RatingList;
|
||||
List<UserRate> newRatingList = userData.RatingList.NewRatingList;
|
||||
int achive = RatingTableID.Rate_22.GetAchive();
|
||||
for (int j = 0; j < scoreList.Length; j++)
|
||||
{
|
||||
if (scoreList[j] == null)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
num = (float)Math.Ceiling((double)((num + 1f) / GameManager.TheoryRateBorderNum) * 10.0);
|
||||
float num2 = 0f;
|
||||
try
|
||||
foreach (UserScore item2 in scoreList[j])
|
||||
{
|
||||
if (userData.RatingList.NextRatingList.Any())
|
||||
{
|
||||
num2 = userData.RatingList.NewRatingList.Last().SingleRate;
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
|
||||
num2 = (float)Math.Ceiling((double)((num2 + 1f) / GameManager.TheoryRateBorderNum) * 10.0);
|
||||
string logDateString = TimeManager.GetLogDateString(TimeManager.PlayBaseTime);
|
||||
string timeJp = (string.IsNullOrEmpty(userData.Detail.DailyBonusDate) ? TimeManager.GetLogDateString(0L) : userData.Detail.DailyBonusDate);
|
||||
if (userData.IsEntry && userData.Detail.IsNetMember >= 2 && !GameManager.IsEventMode && TimeManager.GetUnixTime(logDateString) > TimeManager.GetUnixTime(timeJp) && Singleton<UserDataManager>.Instance.IsSingleUser() && !GameManager.IsFreedomMode && !GameManager.IsCourseMode && !DoneEntry.IsWeekdayBonus(userData))
|
||||
{
|
||||
userData.Detail.DailyBonusDate = logDateString;
|
||||
}
|
||||
|
||||
List<UserRate> list = new List<UserRate>();
|
||||
List<UserRate> list2 = new List<UserRate>();
|
||||
List<UserScore>[] scoreList = userData.ScoreList;
|
||||
List<UserRate> ratingList = userData.RatingList.RatingList;
|
||||
List<UserRate> newRatingList = userData.RatingList.NewRatingList;
|
||||
int achive = RatingTableID.Rate_22.GetAchive();
|
||||
for (int j = 0; j < scoreList.Length; j++)
|
||||
{
|
||||
if (scoreList[j] == null)
|
||||
if (achive <= item2.achivement)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
foreach (UserScore item2 in scoreList[j])
|
||||
MusicData music = Singleton<DataManager>.Instance.GetMusic(item2.id);
|
||||
if (music == null)
|
||||
{
|
||||
if (achive <= item2.achivement)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
||||
MusicData music = Singleton<DataManager>.Instance.GetMusic(item2.id);
|
||||
if (music == null)
|
||||
UserRate item = new UserRate(item2.id, j, item2.achivement, (uint)music.version);
|
||||
if (item.OldFlag)
|
||||
{
|
||||
if (num <= (float)item.Level && !ratingList.Contains(item))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
UserRate item = new UserRate(item2.id, j, item2.achivement, (uint)music.version);
|
||||
if (item.OldFlag)
|
||||
{
|
||||
if (num <= (float)item.Level && !ratingList.Contains(item))
|
||||
{
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
else if (num2 <= (float)item.Level && !newRatingList.Contains(item))
|
||||
{
|
||||
list2.Add(item);
|
||||
list.Add(item);
|
||||
}
|
||||
}
|
||||
else if (num2 <= (float)item.Level && !newRatingList.Contains(item))
|
||||
{
|
||||
list2.Add(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
list.Sort();
|
||||
list.Reverse();
|
||||
if (list.Count > 10)
|
||||
{
|
||||
list.RemoveRange(10, list.Count - 10);
|
||||
}
|
||||
list.Sort();
|
||||
list.Reverse();
|
||||
if (list.Count > 10)
|
||||
{
|
||||
list.RemoveRange(10, list.Count - 10);
|
||||
}
|
||||
|
||||
userData.RatingList.NextRatingList = list;
|
||||
list2.Sort();
|
||||
list2.Reverse();
|
||||
if (list2.Count > 10)
|
||||
{
|
||||
list2.RemoveRange(10, list2.Count - 10);
|
||||
}
|
||||
userData.RatingList.NextRatingList = list;
|
||||
list2.Sort();
|
||||
list2.Reverse();
|
||||
if (list2.Count > 10)
|
||||
{
|
||||
list2.RemoveRange(10, list2.Count - 10);
|
||||
}
|
||||
|
||||
userData.RatingList.NextNewRatingList = list2;
|
||||
userData.RatingList.NextNewRatingList = list2;
|
||||
|
||||
userData.Detail.LastPlayCredit = 0;
|
||||
userData.Detail.LastPlayMode = 0;
|
||||
if (GameManager.IsFreedomMode)
|
||||
{
|
||||
userData.Detail.LastPlayMode = 1;
|
||||
}
|
||||
userData.Detail.LastPlayCredit = 0;
|
||||
userData.Detail.LastPlayMode = 0;
|
||||
if (GameManager.IsFreedomMode)
|
||||
{
|
||||
userData.Detail.LastPlayMode = 1;
|
||||
}
|
||||
|
||||
if (GameManager.IsCourseMode)
|
||||
{
|
||||
userData.Detail.LastPlayMode = 2;
|
||||
}
|
||||
if (GameManager.IsCourseMode)
|
||||
{
|
||||
userData.Detail.LastPlayMode = 2;
|
||||
}
|
||||
|
||||
userData.Detail.LastGameId = "SDEZ";
|
||||
userData.Detail.LastRomVersion = Singleton<SystemConfig>.Instance.config.romVersionInfo.versionNo.versionString;
|
||||
userData.Detail.LastDataVersion = Singleton<SystemConfig>.Instance.config.dataVersionInfo.versionNo.versionString;
|
||||
# if SDGA145
|
||||
userData.Detail.LastGameId = "SDGA";
|
||||
# else
|
||||
userData.Detail.LastGameId = "SDEZ";
|
||||
# endif
|
||||
userData.Detail.LastRomVersion = Singleton<SystemConfig>.Instance.config.romVersionInfo.versionNo.versionString;
|
||||
userData.Detail.LastDataVersion = Singleton<SystemConfig>.Instance.config.dataVersionInfo.versionNo.versionString;
|
||||
}
|
||||
|
||||
private class SavingUi : MonoBehaviour
|
||||
{
|
||||
public void OnGUI()
|
||||
{
|
||||
var y = Screen.height * .075f;
|
||||
var width = GuiSizes.FontSize * 20f;
|
||||
var x = GuiSizes.PlayerCenter + GuiSizes.PlayerWidth / 2f - width;
|
||||
var rect = new Rect(x, y, width, GuiSizes.LabelHeight * 2.5f);
|
||||
|
||||
var labelStyle = GUI.skin.GetStyle("label");
|
||||
labelStyle.fontSize = (int)(GuiSizes.FontSize * 1.2);
|
||||
labelStyle.alignment = TextAnchor.MiddleCenter;
|
||||
|
||||
GUI.Box(rect, "");
|
||||
GUI.Label(rect, Locale.SavingDontExit);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue