辉鸭蛋
|
c37c43ce92
|
dispatcher supprot pathing script
调度器支持路径追踪功能及多项代码优化
在 `ScriptGroupProject.cs` 中:
- 添加对多个命名空间的引用。
- 修改构造函数,增加 `folder` 和 `type` 参数,删除 `kmName` 参数。
- 添加 `BuildKeyMouseProject` 和 `BuildPathingProject` 静态方法。
- 在 `Run` 方法中增加 `Pathing` 类型处理逻辑。
- 在 `ScriptGroupProjectExtensions` 中增加 `Pathing` 类型描述。
在 `PathingTask.cs` 中:
- 添加 `FileName` 属性,并在 `BuildFromFilePath` 方法中设置。
在 `Navigation.cs` 中:
- 将 `Navigation` 类改为 `public`。
- 添加 `_isWarmUp` 静态字段,防止重复加载地图特征点。
- 将 `GetPosition`、`GetTargetOrientation` 和 `GetDistance` 方法改为 `public`。
在 `GameTaskManager.cs` 中:
- 在 `AddTrigger` 方法中添加注释,指出清理 `TriggerDictionary` 的问题。
在 `ScriptService.cs` 中:
- 在 `RunMulti` 方法中增加 `hasTimer` 变量,并在处理 `Pathing` 类型时设置。
- 修改 `RunMulti` 方法逻辑,确保无定时操作时检查 JS 脚本。
- 在 `Run` 方法中增加 `Pathing` 类型处理逻辑。
在 `MapPathingPage.xaml` 中:
- 注释掉第四列定义和相关 `Grid` 元素。
- 修改 `ListView` 中 `GridViewColumn` 的 `DisplayMemberBinding`。
在 `ScriptControlPage.xaml` 中:
- 在 `ContextMenu` 中添加新的 `MenuItem`,用于添加路径追踪任务。
在 `PromptDialog.xaml.cs` 中:
- 添加新的 `Prompt` 方法,允许指定对话框大小。
- 修改 `ResponseText` 属性逻辑,增加默认返回值。
在 `MapPathingViewModel.cs` 中:
- 调整 `using` 语句顺序,删除重复引用。
在 `ScriptControlViewModel.cs` 中:
- 修改 `OnAddKmScript` 方法,使用 `BuildKeyMouseProject` 方法创建键鼠脚本项目。
- 添加 `OnAddPathing` 方法及其辅助方法,用于添加路径追踪任务。
- 在 `RunSelectedScriptGroup` 方法中,将脚本运行逻辑放入 `Task.Run` 中,避免阻塞 UI 线程。
|
2024-09-08 23:17:48 +08:00 |
|
辉鸭蛋
|
5984adf015
|
auto pathing: add pick timer
更新地图特征点路径和UI文本,地图追踪时添加自动拾取
在 `FeatureStorage.cs` 中,将 `rootPath` 的路径从 `Global.Absolute(@"User\Map\");` 修改为 `Global.Absolute(@"Assets\Map\");`。
在 `Navigation.cs` 中,更新了日志信息的内容,使其更加明确首次加载速度较慢。
在 `BigMap.cs` 中,将 `FeatureMatcher` 的初始化参数从 `MapAssets.Instance.MainMap256BlockMat.Value` 修改为 `new Size(4096, 3328)`。
在 `MapPathingPage.xaml` 中,更新了部分 UI 文本,使其更加准确和清晰。例如,将“查看地图”修改为“查看实时追踪地图”,并在功能描述中添加了“尝鲜”字样。
在 `MapPathingPage.xaml` 中,注释掉了一个 `GridViewColumn`,该列包含了一个操作按钮。
在 `MapPathingViewModel.cs` 中,添加了 `using BetterGenshinImpact.Core.Script.Dependence.Model;` 引用。
在 `MapPathingViewModel.cs` 中,修改了 `TaskRunner` 的初始化参数,并在执行路径任务前添加了一个触发器。
在 `PickHandler.cs` 中,添加了一个新的类 `PickHandler`,并标记为 `[Obsolete]`,表示该类暂时不需要。
|
2024-09-08 20:28:50 +08:00 |
|
辉鸭蛋
|
4276957837
|
tp opt & F11 can cancel script task
优化日志记录和任务取消逻辑
在 `PathExecutor.cs` 中添加了 `using System.Diagnostics;` 语句。
注释掉了 `PathExecutor` 类中的部分日志信息。
将 `MoveTo` 和 `MoveCloseTo` 方法中的日志记录改为使用 `Debug.WriteLine`。
修改了 `MoveTo` 和 `MoveCloseTo` 方法中的循环条件,改为 `while (!cts.IsCancellationRequested)`。
将 `MoveTo` 方法中的超时时间从 30 秒改为 60 秒。
在 `TpTask.cs` 中增加了对配置项的最小值检查。
在 `MapAssets.cs` 中添加了新的地图坐标 `{ "纳塔", [8973.5, -1879.1] }`。
在 `HomePageViewModel.cs` 中添加了 `using BetterGenshinImpact.Core.Script;` 语句。
在 `HomePageViewModel` 类的 `Stop` 方法中,添加了取消独立任务的逻辑。
|
2024-09-08 19:44:34 +08:00 |
|
辉鸭蛋
|
a0691f1c19
|
auto pathing: add mapper viewer
|
2024-09-08 19:08:46 +08:00 |
|
辉鸭蛋
|
ca6994a720
|
auto pathing : first version
|
2024-09-08 15:16:02 +08:00 |
|
辉鸭蛋
|
cb09a369c2
|
auto pathing: fix jump and fly
|
2024-09-08 12:33:58 +08:00 |
|
辉鸭蛋
|
1fd5320df2
|
auto pathing: update
- 移除了不必要的 `using` 语句,添加了新的 `using` 语句。
- 将 `Waypoints` 属性重命名为 `Positions`。
- 更新了 `BuildFromFilePath` 方法中的 `JsonOptions` 引用。
- 将 `Waypoint` 类移到单独的文件中,并添加了相关属性和注释。
- 添加了 `SaveToFile` 方法,用于将 `PathingTask` 对象保存到文件。
- 更新了 `PathExecutor` 中的 `TaskControl` 引用,简化了代码。
- 更新了 `PathRecorder` 的属性和方法,使用私有字段 `_pathingTask`。
- 更新了 `MapPathingPage.xaml` 的命令绑定。
- 更新了 `HotKeyPageViewModel` 和 `MapPathingViewModel` 的逻辑。
- 添加了新的 `PathingTaskConfig` 类,用于配置路径任务。
|
2024-09-08 02:23:45 +08:00 |
|
辉鸭蛋
|
5818bcd7ed
|
refactor the path task-related code, using the new enum class
在 `PathingTask.cs`、`PathExecutor.cs` 和 `PathRecorder.cs` 中,删除了 `WaypointType`、`MoveType`、`ActionType` 和 `PathingTaskType` 枚举,并将其替换为 `Enum` 命名空间中的类。更新了 `PathingTaskInfo` 类的属性默认值和新增属性。在 `PathExecutor.cs` 中,使用 `.Code` 属性进行比较,并优化了 `prevPositions` 列表的索引。在 `HotKeyPageViewModel.cs` 中,重命名了变量并更新了回调函数。在 `ActionEnum.cs`、`MoveStatusType.cs`、`PathingTaskType.cs` 和 `WaypointType.cs` 中,定义了新的枚举类及其静态实例和相关方法。
|
2024-09-07 14:53:25 +08:00 |
|
辉鸭蛋
|
7c1febf307
|
add pathing ui
|
2024-09-01 20:15:47 +08:00 |
|
辉鸭蛋
|
5955f90c03
|
update pathing page
|
2024-09-01 02:10:13 +08:00 |
|
lwh9346
|
622a4d5fde
|
allow adding target points
|
2024-08-19 11:25:55 +08:00 |
|
lwh9346
|
fb0c63f8a8
|
optimize fly mode and path recording
|
2024-08-19 11:14:37 +08:00 |
|
lwh9346
|
1610f1cd31
|
remove redundant screen capture
|
2024-08-18 22:47:23 +08:00 |
|
lwh9346
|
ab2d6c1de4
|
copy when transforming coordinate
|
2024-08-18 21:55:08 +08:00 |
|
lwh9346
|
8f64c0ca4e
|
remove unnecessary task run
|
2024-08-18 21:28:03 +08:00 |
|
lwh9346
|
9393b0cb24
|
test and make "move to" functional
|
2024-08-17 19:16:26 +08:00 |
|
ema
|
9b874d3747
|
small trial with using Toast instead of MessageBox
|
2024-08-16 00:43:32 +08:00 |
|
辉鸭蛋
|
6651ec7d9f
|
attempt to correct coordinates
|
2024-08-15 00:00:12 +08:00 |
|
lwh9346
|
d148014b7f
|
testing code
|
2024-08-14 16:11:13 +08:00 |
|
lwh9346
|
8a5d1d5f64
|
add path executor
|
2024-08-14 15:08:37 +08:00 |
|
lwh9346
|
cc245b0e8a
|
change file structure
|
2024-08-14 14:01:21 +08:00 |
|
lwh9346
|
f82e35382c
|
add UNTESTED path executor
|
2024-08-14 10:17:16 +08:00 |
|
lwh9346
|
224fc9917a
|
add walk and swim to "move to" function
|
2024-08-14 01:39:27 +08:00 |
|
lwh9346
|
f61a7c32d4
|
add basic code for auto pathing
|
2024-08-14 00:36:57 +08:00 |
|