Skip to content

Commit

Permalink
[+] Show tip when saving is done
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Sep 30, 2024
1 parent c34affc commit e39f013
Show file tree
Hide file tree
Showing 6 changed files with 270 additions and 158 deletions.
9 changes: 9 additions & 0 deletions AquaMai/Helpers/SharedInstances.cs
Original file line number Diff line number Diff line change
@@ -1,16 +1,25 @@
using HarmonyLib;
using Main;
using Process;

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)]
public static void OnCreateProcessDataContainer(ProcessDataContainer __instance)
{
ProcessDataContainer = __instance;
}

[HarmonyPrefix]
[HarmonyPatch(typeof(GameMainObject), "Awake")]
public static void OnCreateGameMainObject(GameMainObject __instance)
{
GameMainObject = __instance;
}
}
12 changes: 2 additions & 10 deletions AquaMai/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,11 @@ public override void OnInitializeMelon()
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);
}
}
}
72 changes: 50 additions & 22 deletions AquaMai/Resources/Locale.Designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions AquaMai/Resources/Locale.resx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
12 changes: 12 additions & 0 deletions AquaMai/Resources/Locale.zh.resx
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Loading

0 comments on commit e39f013

Please sign in to comment.