mirror of
https://github.com/babalae/better-genshin-impact.git
synced 2026-05-21 09:45:48 +08:00
fix auto skip plot when pathing
This commit is contained in:
@@ -912,7 +912,10 @@ public class PathExecutor
|
||||
|
||||
if (_autoSkipTrigger == null)
|
||||
{
|
||||
_autoSkipTrigger = new AutoSkipTrigger();
|
||||
_autoSkipTrigger = new AutoSkipTrigger(new AutoSkipConfig
|
||||
{
|
||||
ClickChatOption = "优先选择最后一个选项",
|
||||
});
|
||||
_autoSkipTrigger.Init();
|
||||
}
|
||||
|
||||
|
||||
@@ -26,9 +26,9 @@ public partial class AutoSkipConfig : ObservableObject
|
||||
[ObservableProperty]
|
||||
private bool _quicklySkipConversationsEnabled = true;
|
||||
|
||||
public int ChatOptionTextWidth { get; set; } = 280;
|
||||
|
||||
public int ExpeditionOptionTextWidth { get; set; } = 130;
|
||||
// public int ChatOptionTextWidth { get; set; } = 280;
|
||||
//
|
||||
// public int ExpeditionOptionTextWidth { get; set; } = 130;
|
||||
|
||||
/// <summary>
|
||||
/// 选择选项前的延迟(毫秒)
|
||||
|
||||
@@ -65,12 +65,25 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
private List<string> _selectList = [];
|
||||
|
||||
private PostMessageSimulator? _postMessageSimulator;
|
||||
|
||||
private readonly bool _isCustomConfiguration;
|
||||
|
||||
public AutoSkipTrigger()
|
||||
{
|
||||
_autoSkipAssets = AutoSkipAssets.Instance;
|
||||
_config = TaskContext.Instance().Config.AutoSkipConfig;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 用于内部的其他方法调用
|
||||
/// </summary>
|
||||
/// <param name="config"></param>
|
||||
public AutoSkipTrigger(AutoSkipConfig config)
|
||||
{
|
||||
_autoSkipAssets = AutoSkipAssets.Instance;
|
||||
_config = config;
|
||||
_isCustomConfiguration = true;
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
@@ -79,6 +92,14 @@ public partial class AutoSkipTrigger : ITaskTrigger
|
||||
// IsUseInteractionKey = _config.SelectChatOptionType == SelectChatOptionTypes.UseInteractionKey;
|
||||
_postMessageSimulator = TaskContext.Instance().PostMessageSimulator;
|
||||
|
||||
if (!_isCustomConfiguration)
|
||||
{
|
||||
InitKeyword();
|
||||
}
|
||||
}
|
||||
|
||||
private void InitKeyword()
|
||||
{
|
||||
try
|
||||
{
|
||||
var defaultPauseListJson = Global.ReadAllTextIfExist(@"User\AutoSkip\default_pause_options.json");
|
||||
|
||||
Reference in New Issue
Block a user