Skip to content

Commit

Permalink
[+] IgnoreAimeServerError
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Oct 15, 2024
1 parent 6081327 commit e04e559
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AquaMai/AquaMai.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ FontFix=true
SlideJudgeTweak=true
# Cannot be used together with HideHanabi
HanabiFix=false
# Prevent gray network caused by mistakenly thinking it's an AimeDB server issue
IgnoreAimeServerError=true

[Utils]
# Log user ID on login
Expand Down
2 changes: 2 additions & 0 deletions AquaMai/AquaMai.zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,8 @@ SlideJudgeTweak=true
# 修复 1p 模式下的烟花大小
# 不能和 HideHanabi 一起使用
HanabiFix=true
# 防止因错误认为 AimeDB 服务器问题引起的灰网
IgnoreAimeServerError=true

[Utils]
# 登录时将 UserID 输出到日志
Expand Down
1 change: 1 addition & 0 deletions AquaMai/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ public class FixConfig
public bool FontFix { get; set; }
public bool SlideJudgeTweak { get; set; }
public bool HanabiFix { get; set; }
public bool IgnoreAimeServerError { get; set; }
}

public class UtilsConfig
Expand Down
15 changes: 15 additions & 0 deletions AquaMai/Fix/IgnoreAimeServerError.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
using HarmonyLib;
using Manager;

namespace AquaMai.Fix;

public class IgnoreAimeServerError
{
[HarmonyPatch(typeof(OperationManager), "IsAliveAimeServer", MethodType.Getter)]
[HarmonyPrefix]
public static bool Prefix(ref bool __result)
{
__result = true;
return false;
}
}

0 comments on commit e04e559

Please sign in to comment.