Skip to content

Commit

Permalink
[+] HanabiFix + HideHanabi
Browse files Browse the repository at this point in the history
  • Loading branch information
clansty committed Oct 4, 2024
1 parent f7c1714 commit 7e54679
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 0 deletions.
2 changes: 2 additions & 0 deletions AquaMai/AquaMai.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,7 @@ DEBUG</DefineConstants>
<Compile Include="Fix\ForceFreePlay.cs" />
<Compile Include="Fix\ForcePaidPlay.cs" />
<Compile Include="Fix\FrameRateLock.cs" />
<Compile Include="Fix\HanabiFix.cs" />
<Compile Include="Fix\I18nSingleAssemblyHook.cs" />
<Compile Include="Fix\RemoveEncryption.cs" />
<Compile Include="Fix\SkipVersionCheck.cs" />
Expand Down Expand Up @@ -342,6 +343,7 @@ DEBUG</DefineConstants>
<Compile Include="UX\CustomVersionString.cs" />
<Compile Include="UX\DemoMaster.cs" />
<Compile Include="UX\ExtendTimer.cs" />
<Compile Include="UX\HideHanabi.cs" />
<Compile Include="UX\HideMask.cs" />
<Compile Include="UX\HideSelfMadeCharts.cs" />
<Compile Include="UX\ImmediateSave.cs" />
Expand Down
4 changes: 4 additions & 0 deletions AquaMai/AquaMai.toml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ CustomNoteSkin=false
# Hide "TRACK X" text and DX/Standard chart display box
# For recording chart confirmation
TrackStartProcessTweak=false
# Cannot be used together with HanabiFix
HideHanabi=false

[Fix]
# Allow login with higher data version
Expand All @@ -79,6 +81,8 @@ FontFix=true
# Make the Critical judgment of BreakSlide flash like BreakTap
# Align the judgment display of arc-shaped Slide with the judgment line accurately (it was slightly off before)
SlideJudgeTweak=true
# Cannot be used together with HideHanabi
HanabiFix=false

[Utils]
# Log user ID on login
Expand Down
6 changes: 6 additions & 0 deletions AquaMai/AquaMai.zh.toml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ CustomNoteSkin=false
# 隐藏“TRACK X”字样和 DX/标准谱面的显示框
# 录制谱面确认用
TrackStartProcessTweak=false
# 完全隐藏烟花
# 不能和 HanabiFix 一起使用
HideHanabi=false

# ===================================
# 修复一些潜在的问题
Expand Down Expand Up @@ -95,6 +98,9 @@ FontFix=true
# 让 BreakSlide 的 Critical 判定也可以像 BreakTap 一样闪烁
# 让圆弧形的 Slide 的判定显示与判定线精确对齐 (原本会有一点歪)
SlideJudgeTweak=true
# 修复 1p 模式下的烟花大小
# 不能和 HideHanabi 一起使用
HanabiFix=true

[Utils]
# 登录时将 UserID 输出到日志
Expand Down
2 changes: 2 additions & 0 deletions AquaMai/Config.cs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ public class UXConfig
public bool CustomFont { get; set; }
public bool CustomNoteSkin { get; set; }
public bool TrackStartProcessTweak { get; set; }
public bool HideHanabi { get; set; }
public string CustomVersionString { get; set; } = "";
public string CustomPlaceName { get; set; } = "";
public string ExecOnIdle { get; set; } = "";
Expand All @@ -58,6 +59,7 @@ public class FixConfig
public bool FrameRateLock { get; set; }
public bool FontFix { get; set; }
public bool SlideJudgeTweak { get; set; }
public bool HanabiFix { get; set; }
}

public class UtilsConfig
Expand Down
20 changes: 20 additions & 0 deletions AquaMai/Fix/HanabiFix.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Fx;
using HarmonyLib;
using Monitor;
using UnityEngine;

namespace AquaMai.Fix;

public class HanabiFix
{
[HarmonyPatch(typeof(TapCEffect), "SetUpParticle")]
[HarmonyPostfix]
public static void FixMaxSize(TapCEffect __instance, FX_Mai2_Note_Color ____particleControler)
{
var entities = ____particleControler.GetComponentsInChildren<ParticleSystemRenderer>(true);
foreach (var entity in entities)
{
entity.maxParticleSize = 1f;
}
}
}
20 changes: 20 additions & 0 deletions AquaMai/UX/HideHanabi.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using Fx;
using HarmonyLib;
using Monitor;
using UnityEngine;

namespace AquaMai.UX;

public class HideHanabi
{
[HarmonyPatch(typeof(TapCEffect), "SetUpParticle")]
[HarmonyPostfix]
public static void FixZeroSize(TapCEffect __instance, FX_Mai2_Note_Color ____particleControler)
{
var entities = ____particleControler.GetComponentsInChildren<ParticleSystemRenderer>(true);
foreach (var entity in entities)
{
entity.maxParticleSize = 0f;
}
}
}

0 comments on commit 7e54679

Please sign in to comment.