[RF] Move some patches to visual
Build AquaMai / build (push) Has been cancelled Details

pull/78/head
Clansty 2024-10-28 06:09:42 +08:00
parent 6945032077
commit 7933d49bb2
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
16 changed files with 127 additions and 126 deletions

View File

@ -37,6 +37,11 @@ public class Config
zh: "节省一些不知道有用没用的时间,跳过一些不必要的界面")] zh: "节省一些不知道有用没用的时间,跳过一些不必要的界面")]
public TimeSaving.Config TimeSaving { get; set; } = new(); 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( [ConfigComment(
zh: "窗口相关设置")] zh: "窗口相关设置")]
public WindowState.Config WindowState { get; set; } = new(); public WindowState.Config WindowState { get; set; } = new();

View File

@ -55,28 +55,6 @@ public class Config
""")] """)]
public bool FontFix { get; set; } 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( [ConfigComment(
en: """ en: """
Make the AutoPlay random judgment mode really randomize all judgments (down to sub-judgments) 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.Resources;
using AquaMai.Utils; using AquaMai.Utils;
using AquaMai.UX; using AquaMai.UX;
using AquaMai.Visual;
using MelonLoader; using MelonLoader;
using Tomlet; using Tomlet;
using UnityEngine; using UnityEngine;
@ -166,22 +167,19 @@ namespace AquaMai
Patch(typeof(FixCheckAuth)); Patch(typeof(FixCheckAuth));
Patch(typeof(DebugFeature)); Patch(typeof(DebugFeature));
Patch(typeof(FixConnSlide)); Patch(typeof(FixConnSlide));
// Visual
Patch(typeof(FixSlideAutoPlay)); // Rename: SlideAutoPlayTweak -> FixSlideAutoPlay, 不过这个应该无副作用所以不需要改配置文件 Patch(typeof(FixSlideAutoPlay)); // Rename: SlideAutoPlayTweak -> FixSlideAutoPlay, 不过这个应该无副作用所以不需要改配置文件
Patch(typeof(FixCircleSlideJudge)); // 这个我觉得算无副作用, 可以常开 Patch(typeof(FixCircleSlideJudge)); // 这个我觉得算无副作用, 可以常开
Patch(typeof(FixLevelDisplay)); Patch(typeof(FixLevelDisplay));
Patch(typeof(CustomLogo));
// UX // UX
Patch(typeof(CustomVersionString)); Patch(typeof(CustomVersionString));
Patch(typeof(CustomPlaceName)); Patch(typeof(CustomPlaceName));
Patch(typeof(RunCommandOnEvents)); Patch(typeof(RunCommandOnEvents));
Patch(typeof(CustomLogo));
// Utils // Utils
Patch(typeof(JudgeAdjust)); Patch(typeof(JudgeAdjust));
Patch(typeof(TouchPanelBaudRate)); Patch(typeof(TouchPanelBaudRate));
# if DEBUG
Patch(typeof(LogNetworkErrors));
# endif
// Apply patches based on the settings // Apply patches based on the settings
ApplyPatches(); ApplyPatches();

View File

@ -117,70 +117,11 @@ public class Config
""")] """)]
public bool CustomFont { get; set; } 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( [ConfigComment(
en: "Map touch actions to buttons", en: "Map touch actions to buttons",
zh: "映射触摸操作至实体按键")] zh: "映射触摸操作至实体按键")]
public bool TouchToButtonInput { get; set; } 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( [ConfigComment(
en: "Cannot be used together with HanabiFix", en: "Cannot be used together with HanabiFix",
zh: """ zh: """

View File

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

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;
using UnityEngine.UI; using UnityEngine.UI;
namespace AquaMai.UX; namespace AquaMai.Visual;
public class CustomLogo public class CustomLogo
{ {

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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