[RF] Move some settings to TimeSavingConfig

pull/55/head
Clansty 2024-09-27 19:13:53 +08:00
parent 24e6808984
commit 9605264b9a
No known key found for this signature in database
GPG Key ID: 3A6BE8BAF2EDE134
11 changed files with 131 additions and 96 deletions

View File

@ -302,9 +302,14 @@
<Compile Include="Helpers\MessageHelper.cs" />
<Compile Include="Helpers\MusicDirHelper.cs" />
<Compile Include="Helpers\SharedInstances.cs" />
<Compile Include="Performance\ImproveLoadSpeed.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
<Compile Include="Main.cs" />
<Compile Include="TimeSaving\ImproveLoadSpeed.cs" />
<Compile Include="TimeSaving\IWontTapOrSlideVigorously.cs" />
<Compile Include="TimeSaving\SkipEventInfo.cs" />
<Compile Include="TimeSaving\SkipGameOverScreen.cs" />
<Compile Include="TimeSaving\SkipToMusicSelection.cs" />
<Compile Include="TimeSaving\SkipWarningScreen.cs" />
<Compile Include="TouchSensitivity\Enable.cs" />
<Compile Include="Utils\JudgeAdjust.cs" />
<Compile Include="Utils\LogUserId.cs" />
@ -322,9 +327,6 @@
<Compile Include="UX\RunCommandOnEvents.cs" />
<Compile Include="UX\SelectionDetail.cs" />
<Compile Include="UX\SinglePlayer.cs" />
<Compile Include="UX\SkipEventInfo.cs" />
<Compile Include="UX\SkipWarningScreen.cs" />
<Compile Include="UX\SkipToMusicSelection.cs" />
<Compile Include="UX\TestProof.cs" />
</ItemGroup>
<ItemGroup>
@ -338,6 +340,9 @@
<ItemGroup>
<Content Include="FodyWeavers.xml" />
</ItemGroup>
<ItemGroup>
<Folder Include="Performance\" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="packages\Fody.6.8.1\build\Fody.targets" Condition="Exists('packages\Fody.6.8.1\build\Fody.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">

View File

@ -14,12 +14,8 @@ DebugFeature=true
# ===================================
# UX: User Experience Improvements
[UX]
# Skip the warning screen and logo shown after the POST sequence
SkipWarningScreen=true
# Single player: Show 1P only, at the center of the screen
SinglePlayer=true
# !!EXPERIMENTAL!! Skip from the card-scanning screen directly to music selection screen
SkipToMusicSelection=false
# Set the version string displayed at the top-right corner of the screen
CustomVersionString=""
# Deprecated: Use `LoadAssetsPng` instead
@ -33,8 +29,6 @@ LoadLocalBga=true
QuickSkip=true
# Add ".ab" image resources without the need of rebuilding a manifest
LoadAssetBundleWithoutManifest=true
# Skip "New Event" and "Information" text boxes for new users
SkipEventInfo=true
# Random BGM, put Mai2Cue.{acb,awb} of old version of the game in `LocalAssets\Mai2Cue` and rename them
# Do not enable when SinglePlayer is off
RandomBgm=false
@ -59,10 +53,6 @@ HideSelfMadeCharts=true
# Show detail of selected song in music selection screen
SelectionDetail=true
[Performance]
# Disable some useless delays to speed up the game boot process
ImproveLoadSpeed=true
[Fix]
# Allow login with higher data version
SkipVersionCheck=true
@ -85,6 +75,22 @@ JudgeAdjustB=0.0
# Touch screen delay, unit is milliseconds, one second = 1000 milliseconds. Must be an integer
TouchDelay=0
# ===================================
# Save some potentially unnecessary time
[TimeSaving]
# Skip the warning screen and logo shown after the POST sequence
SkipWarningScreen=true
# Disable some useless delays to speed up the game boot process
ImproveLoadSpeed=true
# Directly enter the song selection screen after login
SkipToMusicSelection=false
# Skip possible prompts like "New area discovered", "New songs added", "There are events" during game login/registration
SkipEventInfo=true
# Skip the "Do not tap or slide vigorously" screen, immediately proceed to the next screen once data is loaded
IWontTapOrSlideVigorously=true
# Skip the "Goodbye" screen at the end of the game
SkipGameOverScreen=true
[TouchSensitivity]
# Enable custom sensitivity
# When enabled, the settings in Test mode will not take effect

View File

@ -1,4 +1,7 @@
# 试试使用 MaiChartManager 图形化配置 AquaMai 吧!
# https://github.com/clansty/MaiChartManager
# ===================================
# “作弊”功能
[Cheat]
@ -14,12 +17,8 @@ DebugFeature=true
# ===================================
# 用户体验改进
[UX]
# 跳过日服启动时候的 WARNING 界面
SkipWarningScreen=true
# 单人模式,不显示 2P
SinglePlayer=true
# 登录完成后直接进入选歌界面
SkipToMusicSelection=false
# 把右上角的版本更改为自定义文本
CustomVersionString=""
# 已弃用,请使用 LoadAssetsPng
@ -38,8 +37,6 @@ QuickSkip=true
# 优化图片资源的加载,就算没有 AssetBundleImages.manifest 也可以正常加载 ab 格式的图片资源
# 导入了删除曲包之类的话,应该需要开启这个
LoadAssetBundleWithoutManifest=true
# 跳过登录 / 注册游戏时候可能的 “发现了新的区域哟” “乐曲增加” “有活动哟” 之类的提示
SkipEventInfo=true
# 在 `LocalAssets\Mai2Cue` 这个目录下放置了旧版游戏的 Mai2Cue.{acb,awb} 并重命名的话,可以在播放游戏 BGM 的时候随机播放这里面的旧版游戏 BGM
# 和 2P 模式有冲突,如果你没有开启 'SinglePlayer' 的话,请关闭这个
RandomBgm=false
@ -65,13 +62,6 @@ HideSelfMadeCharts=true
# 选歌界面显示选择的歌曲的详情
SelectionDetail=true
# ===================================
# 一些性能优化
[Performance]
# 在自检界面,每个屏幕结束的时候都会等两秒才进入下一个屏幕,很浪费时间
# 开了这个选项之后就不会等了
ImproveLoadSpeed=true
# ===================================
# 修复一些潜在的问题
[Fix]
@ -101,6 +91,23 @@ JudgeAdjustB=0.0
# 触摸屏延迟,单位为毫秒,一秒 = 1000 毫秒。必须是整数
TouchDelay=0
# ===================================
# 节省一些不知道有用没用的时间
[TimeSaving]
# 跳过日服启动时候的 WARNING 界面
SkipWarningScreen=true
# 在自检界面,每个屏幕结束的时候都会等两秒才进入下一个屏幕,很浪费时间
# 开了这个选项之后就不会等了
ImproveLoadSpeed=true
# 登录完成后直接进入选歌界面
SkipToMusicSelection=false
# 跳过登录 / 注册游戏时候可能的 “发现了新的区域哟” “乐曲增加” “有活动哟” 之类的提示
SkipEventInfo=true
# 跳过“不要大力拍打或滑动哦”这个界面,数据一旦加载完就立马进入下一个界面
IWontTapOrSlideVigorously=true
# 跳过游戏结束的“再见”界面
SkipGameOverScreen=true
[TouchSensitivity]
# 是否启用自定义灵敏度
# 这里启用之后 Test 里的就不再起作用了

View File

@ -8,9 +8,9 @@ namespace AquaMai
{
public UXConfig UX { get; set; } = new();
public CheatConfig Cheat { get; set; } = new();
public PerformanceConfig Performance { get; set; } = new();
public FixConfig Fix { get; set; } = new();
public UtilsConfig Utils { get; set; } = new();
public TimeSavingConfig TimeSaving { get; set; } = new();
public TouchSensitivityConfig TouchSensitivity { get; set; } = new();
public class CheatConfig
@ -23,9 +23,7 @@ namespace AquaMai
public class UXConfig
{
public bool SkipWarningScreen { get; set; }
public bool SinglePlayer { get; set; }
public bool SkipToMusicSelection { get; set; }
public bool LoadAssetsPng { get; set; }
public bool LoadJacketPng { get; set; }
public bool LoadAssetBundleWithoutManifest { get; set; }
@ -33,7 +31,6 @@ namespace AquaMai
public bool RandomBgm { get; set; }
public bool DemoMaster { get; set; }
public bool ExtendTimer { get; set; }
public bool SkipEventInfo { get; set; }
public bool ImmediateSave { get; set; }
public bool LoadLocalBga { get; set; }
public bool TestProof { get; set; }
@ -45,11 +42,6 @@ namespace AquaMai
public string ExecOnEntry { get; set; } = "";
}
public class PerformanceConfig
{
public bool ImproveLoadSpeed { get; set; }
}
public class FixConfig
{
public bool SkipVersionCheck { get; set; }
@ -68,6 +60,16 @@ namespace AquaMai
public int TouchDelay { get; set; }
}
public class TimeSavingConfig
{
public bool SkipWarningScreen { get; set; }
public bool ImproveLoadSpeed { get; set; }
public bool SkipToMusicSelection { get; set; }
public bool SkipEventInfo { get; set; }
public bool IWontTapOrSlideVigorously { get; set; }
public bool SkipGameOverScreen { get; set; }
}
public class TouchSensitivityConfig
{
public bool Enable { get; set; }

View File

@ -0,0 +1,15 @@
using HarmonyLib;
using Monitor;
namespace AquaMai.TimeSaving;
public class IWontTapOrSlideVigorously
{
[HarmonyPrefix]
[HarmonyPatch(typeof(PlInformationMonitor), "IsPlayPlInfoEnd")]
public static bool Patch(ref bool __result)
{
__result = true;
return false;
}
}

View File

@ -2,7 +2,7 @@
using HarmonyLib;
using Process;
namespace AquaMai.Performance
namespace AquaMai.TimeSaving
{
public class ImproveLoadSpeed
{

View File

@ -3,7 +3,7 @@ using HarmonyLib;
using Process;
using Process.Information;
namespace AquaMai.UX
namespace AquaMai.TimeSaving
{
public class SkipEventInfo
{

View File

@ -0,0 +1,26 @@
using HarmonyLib;
using Monitor;
using Process;
namespace AquaMai.TimeSaving;
public class SkipGameOverScreen
{
[HarmonyPrefix]
[HarmonyPatch(typeof(GameOverMonitor), "IsPlayEnd")]
public static bool GameOverMonitorPlayEnd(ref bool __result)
{
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameOverProcess), "OnUpdate")]
public static void GameOverProcessOnUpdate(ref GameOverProcess.GameOverSequence ____state)
{
if (____state == GameOverProcess.GameOverSequence.SkyChange)
{
____state = GameOverProcess.GameOverSequence.Disp;
}
}
}

View File

@ -5,7 +5,7 @@ using Monitor;
using Process;
using Process.Information;
namespace AquaMai.UX
namespace AquaMai.TimeSaving
{
public class SkipToMusicSelection
{

View File

@ -1,7 +1,7 @@
using HarmonyLib;
using Monitor;
namespace AquaMai.UX
namespace AquaMai.TimeSaving
{
public class SkipWarningScreen
{

View File

@ -52,31 +52,5 @@ namespace AquaMai.UX
____monitors[0].SetButtonPressed(InputManager.ButtonSetting.Button04);
Traverse.Create(__instance).Method("OnTimeUp").GetValue();
}
[HarmonyPrefix]
[HarmonyPatch(typeof(PlInformationMonitor), "IsPlayPlInfoEnd")]
public static bool IWontTapOrSlideVigorously(ref bool __result)
{
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameOverMonitor), "IsPlayEnd")]
public static bool GameOverMonitorPlayEnd(ref bool __result)
{
__result = true;
return false;
}
[HarmonyPrefix]
[HarmonyPatch(typeof(GameOverProcess), "OnUpdate")]
public static void GameOverProcessOnUpdate(ref GameOverProcess.GameOverSequence ____state)
{
if (____state == GameOverProcess.GameOverSequence.SkyChange)
{
____state = GameOverProcess.GameOverSequence.Disp;
}
}
}
}