[RF] Move some patches to visual

This commit is contained in:
Clansty
2024-10-28 06:09:42 +08:00
parent 6945032077
commit 7933d49bb2
16 changed files with 127 additions and 126 deletions

View File

@@ -37,6 +37,11 @@ public class Config
zh: "节省一些不知道有用没用的时间,跳过一些不必要的界面")]
public TimeSaving.Config TimeSaving { get; set; } = new();
[ConfigComment(
en: "Visual effects of notes and judgment display and some other textures",
zh: "音符和判定表示以及一些其他贴图的视觉效果调整")]
public Visual.Config Visual { get; set; } = new();
[ConfigComment(
zh: "窗口相关设置")]
public WindowState.Config WindowState { get; set; } = new();

View File

@@ -55,28 +55,6 @@ public class Config
""")]
public bool FontFix { get; set; }
[ConfigComment(
en: """
Make the judgment display of Wifi Slide different in up and down (originally all Wifi judgment displays are towards the center), just like in majdata
The reason for this bug is that SEGA forgot to assign EndButtonId to Wifi
""",
zh: """
这个 Patch 让 Wifi Slide 的判定显示有上下的区别 (原本所有 Wifi 的判定显示都是朝向圆心的), 就像 majdata 里那样
这个 bug 产生的原因是 SBGA 忘记给 Wifi 的 EndButtonId 赋值了
""")]
public bool FanJudgeFlip { get; set; }
[ConfigComment(
en: """
This Patch makes the Critical judgment of BreakSlide also flicker like BreakTap
Recommended to use with custom skins (otherwise the visual effect may not be good)
""",
zh: """
这个 Patch 让 BreakSlide 的 Critical 判定也可以像 BreakTap 一样闪烁
推荐与自定义皮肤一起使用 (否则视觉效果可能并不好)
""")]
public bool BreakSlideJudgeBlink { get; set; }
[ConfigComment(
en: """
Make the AutoPlay random judgment mode really randomize all judgments (down to sub-judgments)

View File

@@ -9,6 +9,7 @@ using AquaMai.Helpers;
using AquaMai.Resources;
using AquaMai.Utils;
using AquaMai.UX;
using AquaMai.Visual;
using MelonLoader;
using Tomlet;
using UnityEngine;
@@ -166,22 +167,19 @@ namespace AquaMai
Patch(typeof(FixCheckAuth));
Patch(typeof(DebugFeature));
Patch(typeof(FixConnSlide));
// Visual
Patch(typeof(FixSlideAutoPlay)); // Rename: SlideAutoPlayTweak -> FixSlideAutoPlay, 不过这个应该无副作用所以不需要改配置文件
Patch(typeof(FixCircleSlideJudge)); // 这个我觉得算无副作用, 可以常开
Patch(typeof(FixLevelDisplay));
Patch(typeof(CustomLogo));
// UX
Patch(typeof(CustomVersionString));
Patch(typeof(CustomPlaceName));
Patch(typeof(RunCommandOnEvents));
Patch(typeof(CustomLogo));
// Utils
Patch(typeof(JudgeAdjust));
Patch(typeof(TouchPanelBaudRate));
# if DEBUG
Patch(typeof(LogNetworkErrors));
# endif
// Apply patches based on the settings
ApplyPatches();

View File

@@ -117,70 +117,11 @@ public class Config
""")]
public bool CustomFont { get; set; }
[ConfigComment(
en: """
Provide the ability to use custom skins (advanced feature)
Load skin textures from LocalAssets\Skins
""",
zh: """
提供自定义皮肤的能力(高级功能)
从 LocalAssets\Skins 中加载皮肤贴图
""")]
public bool CustomSkins { get; set; }
[ConfigComment(
en: """
More detailed judgment display
Requires CustomSkins to be enabled and the resource file to be downloaded
https://github.com/hykilpikonna/AquaDX/releases/download/nightly/JudgeDisplay4B.7z
""",
zh: """
更精细的判定表示
需开启 CustomSkins 并下载资源文件
https://github.com/hykilpikonna/AquaDX/releases/download/nightly/JudgeDisplay4B.7z
""")]
public bool JudgeDisplay4B { get; set; }
[ConfigComment(
en: """
Custom track start difficulty image (not really custom difficulty)
Requires CustomSkins to be enabled
Will load four image resources through custom skins: musicBase, musicTab, musicLvBase, musicLvText
""",
zh: """
自定义在歌曲开始界面上显示的难度贴图 (并不是真的自定义难度)
需要启用自定义皮肤功能
会通过自定义皮肤加载四个图片资源: musicBase, musicTab, musicLvBase, musicLvText
""")]
public bool CustomTrackStartDiff { get; set; }
[ConfigComment(
en: "Map touch actions to buttons",
zh: "映射触摸操作至实体按键")]
public bool TouchToButtonInput { get; set; }
[ConfigComment(
en: """
Delayed the animation of the song start screen
For recording chart confirmation
""",
zh: """
推迟了歌曲开始界面的动画
录制谱面确认用
""")]
public bool TrackStartProcessTweak { get; set; }
[ConfigComment(
en: """
Disable the TRACK X text, DX/Standard display box, and the derakkuma at the bottom of the screen in the song start screen
For recording chart confirmation
""",
zh: """
在歌曲开始界面, 把 TRACK X 字样, DX/标准谱面的显示框, 以及画面下方的滴蜡熊隐藏掉
录制谱面确认用
""")]
public bool DisableTrackStartTabs { get; set; }
[ConfigComment(
en: "Cannot be used together with HanabiFix",
zh: """

View File

@@ -2,7 +2,7 @@
using Monitor;
using UnityEngine;
namespace AquaMai.Fix;
namespace AquaMai.Visual;
public class BreakSlideJudgeBlink
{
@@ -21,4 +21,4 @@ public class BreakSlideJudgeBlink
float num = ___SpriteRenderAdd.color.r;
___SpriteRenderAdd.color = new Color(num, num, num, 1f);
}
}
}

87
AquaMai/Visual/Config.cs Normal file
View File

@@ -0,0 +1,87 @@
using AquaMai.Attributes;
namespace AquaMai.Visual;
public class Config
{
[ConfigComment(
en: """
Provide the ability to use custom skins (advanced feature)
Load skin textures from LocalAssets\Skins
""",
zh: """
提供自定义皮肤的能力(高级功能)
从 LocalAssets\Skins 中加载皮肤贴图
""")]
public bool CustomSkins { get; set; }
[ConfigComment(
en: """
More detailed judgment display
Requires CustomSkins to be enabled and the resource file to be downloaded
https://github.com/hykilpikonna/AquaDX/releases/download/nightly/JudgeDisplay4B.7z
""",
zh: """
更精细的判定表示
需开启 CustomSkins 并下载资源文件
https://github.com/hykilpikonna/AquaDX/releases/download/nightly/JudgeDisplay4B.7z
""")]
public bool JudgeDisplay4B { get; set; }
[ConfigComment(
en: """
Custom track start difficulty image (not really custom difficulty)
Requires CustomSkins to be enabled
Will load four image resources through custom skins: musicBase, musicTab, musicLvBase, musicLvText
""",
zh: """
自定义在歌曲开始界面上显示的难度贴图 (并不是真的自定义难度)
需要启用自定义皮肤功能
会通过自定义皮肤加载四个图片资源: musicBase, musicTab, musicLvBase, musicLvText
""")]
public bool CustomTrackStartDiff { get; set; }
[ConfigComment(
en: """
Delayed the animation of the song start screen
For recording chart confirmation
""",
zh: """
推迟了歌曲开始界面的动画
录制谱面确认用
""")]
public bool TrackStartProcessTweak { get; set; }
[ConfigComment(
en: """
Disable the TRACK X text, DX/Standard display box, and the derakkuma at the bottom of the screen in the song start screen
For recording chart confirmation
""",
zh: """
在歌曲开始界面, 把 TRACK X 字样, DX/标准谱面的显示框, 以及画面下方的滴蜡熊隐藏掉
录制谱面确认用
""")]
public bool DisableTrackStartTabs { get; set; }
[ConfigComment(
en: """
Make the judgment display of Wifi Slide different in up and down (originally all Wifi judgment displays are towards the center), just like in majdata
The reason for this bug is that SEGA forgot to assign EndButtonId to Wifi
""",
zh: """
这个 Patch 让 Wifi Slide 的判定显示有上下的区别 (原本所有 Wifi 的判定显示都是朝向圆心的), 就像 majdata 里那样
这个 bug 产生的原因是 SBGA 忘记给 Wifi 的 EndButtonId 赋值了
""")]
public bool FanJudgeFlip { get; set; }
[ConfigComment(
en: """
This Patch makes the Critical judgment of BreakSlide also flicker like BreakTap
Recommended to use with custom skins (otherwise the visual effect may not be good)
""",
zh: """
这个 Patch 让 BreakSlide 的 Critical 判定也可以像 BreakTap 一样闪烁
推荐与自定义皮肤一起使用 (否则视觉效果可能并不好)
""")]
public bool BreakSlideJudgeBlink { get; set; }
}

View File

@@ -7,7 +7,7 @@ using Process;
using UnityEngine;
using UnityEngine.UI;
namespace AquaMai.UX;
namespace AquaMai.Visual;
public class CustomLogo
{

View File

@@ -8,7 +8,7 @@ using Monitor.Game;
using Process;
using UnityEngine;
namespace AquaMai.UX;
namespace AquaMai.Visual;
public class CustomSkins
{
@@ -18,7 +18,7 @@ public class CustomSkins
private static Sprite customOutline;
private static Sprite[,] customSlideFan = new Sprite[4, 11];
public static readonly Sprite[,] CustomJudge = new Sprite[2, ((int)NoteJudge.ETiming.End + 1)];
public static readonly Sprite[,,,] CustomJudgeSlide = new Sprite[2, 3, 2, ((int)NoteJudge.ETiming.End + 1)];
public static readonly Texture2D[] CustomTrackStart = new Texture2D[4];
@@ -113,7 +113,7 @@ public class CustomSkins
int? idx3 = (args.Length < 4) ? null : (int.TryParse(args[3], out temp) ? temp : null);
Traverse traverse;
if (CustomTrackStartFields.Contains(fieldName))
{
var i = CustomTrackStartFields.IndexOf(fieldName);
@@ -142,7 +142,7 @@ public class CustomSkins
MelonLogger.Msg($"[CustomNoteSkin] Successfully loaded {name}");
continue;
}
if (fieldName == "_judgeSlideNormal" || fieldName == "_judgeSlideBreak")
{
if (!idx1.HasValue || !idx2.HasValue || !idx3.HasValue)

View File

@@ -5,20 +5,20 @@ using UI;
using UnityEngine;
using UnityEngine.UI;
namespace AquaMai.UX;
namespace AquaMai.Visual;
public class CustomTrackStartDiff
{
// 自定义在歌曲开始界面上显示的难度 (并不是真的自定义难度)
// 需要启用自定义皮肤功能
// 会加载四个图片资源: musicBase, musicTab, musicLvBase, musicLvText
[HarmonyPostfix]
[HarmonyPatch(typeof(TrackStartMonitor), "SetTrackStart")]
private static void DisableTabs(
MultipleImage ____musicBaseImage,
MultipleImage ____musicTabImage,
SpriteCounter ____difficultySingle,
SpriteCounter ____difficultySingle,
SpriteCounter ____difficultyDouble,
Image ____levelTextImage,
List<ResultMonitor.SpriteSheet> ____musicLevelSpriteSheets,
@@ -31,7 +31,7 @@ public class CustomTrackStartDiff
____musicBaseImage.MultiSprites[6] = Sprite.Create(texture, new Rect(0, 0, texture.width, texture.height), new Vector2(0.5f, 0.5f), 100f);
____musicBaseImage.ChangeSprite(6);
}
texture = CustomSkins.CustomTrackStart[1];
if (texture != null)
{
@@ -63,4 +63,4 @@ public class CustomTrackStartDiff
____levelTextImage.sprite = sheet[14];
}
}
}
}

View File

@@ -1,16 +1,14 @@
using System.Collections.Generic;
using HarmonyLib;
using HarmonyLib;
using Monitor;
using UI;
using UnityEngine;
using UnityEngine.UI;
namespace AquaMai.UX;
namespace AquaMai.Visual;
public class DisableTrackStartTabs
{
// 在歌曲开始界面, 把 TRACK X 字样, DX/标准谱面的显示框, 以及画面下方的滴蜡熊隐藏掉, 让他看起来不那么 sinmai, 更像是 majdata
[HarmonyPostfix]
[HarmonyPatch(typeof(TrackStartMonitor), "SetTrackStart")]
private static void DisableTabs(
@@ -27,4 +25,4 @@ public class DisableTrackStartTabs
____musicTabObj[2].gameObject.SetActive(false);
____derakkumaRoot.SetActive(false);
}
}
}

View File

@@ -1,7 +1,7 @@
using HarmonyLib;
using Monitor;
namespace AquaMai.Fix;
namespace AquaMai.Visual;
public class FanJudgeFlip
{
@@ -29,4 +29,4 @@ public class FanJudgeFlip
}
}
}
}
}

View File

@@ -2,10 +2,9 @@
using HarmonyLib;
using Manager;
using Monitor;
using Process;
using UnityEngine;
namespace AquaMai.Fix;
namespace AquaMai.Visual;
public class FixCircleSlideJudge
{
@@ -39,5 +38,5 @@ public class FixCircleSlideJudge
}
}
}

View File

@@ -3,7 +3,7 @@ using HarmonyLib;
using Manager;
using Monitor;
namespace AquaMai.Fix;
namespace AquaMai.Visual;
public class FixSlideAutoPlay
{

View File

@@ -1,14 +1,13 @@
using HarmonyLib;
using Manager;
using Monitor;
using UnityEngine;
namespace AquaMai.UX;
namespace AquaMai.Visual;
public class JudgeDisplay4B
{
// 精确到子判定的自定义判定显示, 需要启用自定义皮肤功能 (理论上不启用自定义皮肤不会崩游戏, 只不过此时这个功能显然不会生效)
[HarmonyPostfix]
[HarmonyPatch(typeof(SlideJudge), "Initialize")]
private static void SlideJudgeDisplay4B(
@@ -32,8 +31,8 @@ public class JudgeDisplay4B
}
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(JudgeGrade), "Initialize")]
private static void JudgeGradeDisplay4B(
@@ -47,7 +46,7 @@ public class JudgeDisplay4B
___SpriteRender.sprite = sprite;
}
}
[HarmonyPostfix]
[HarmonyPatch(typeof(JudgeGrade), "InitializeBreak")]
private static void JudgeGradeBreakDisplay4B(
@@ -64,12 +63,12 @@ public class JudgeDisplay4B
}
}
}
[HarmonyPrefix]
[HarmonyPatch(typeof(JudgeGrade), "InitializeBreak")]
private static void InitializeBreakFix(ref NoteJudge.EJudgeType type)
{
type = NoteJudge.EJudgeType.Break;
}
}
}

View File

@@ -1,12 +1,8 @@
using System.Collections.Generic;
using HarmonyLib;
using Monitor;
using HarmonyLib;
using Process;
using UI;
using UnityEngine;
using UnityEngine.UI;
namespace AquaMai.UX;
namespace AquaMai.Visual;
public class TrackStartProcessTweak
{
@@ -66,6 +62,6 @@ public class TrackStartProcessTweak
return true;
}
}