feat: 优化决任务逻辑,使得可维修的船应修尽修 #309
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
task_runner.py:
· register()中添加quick_repair_mode参数以控制注册时是否快修
· RepairTask()中添加scan()方法用于手动扫描可维修的船; 添加managed_repaired_ships标记位标记runner管理的维修 · DecisiveFight()中引入repair_strategy; 重写repair()以适应盲计时和抛出退出决战的钩子 · 大幅修改DecisiveFightTask()的逻辑以适应中断决战插入维修任务
· TaskRunner()中添加所有任务完成后应修尽修的逻辑
decisive_battle.py:
· 将repair_strategy引入决战逻辑
· 修改need_repair()以抛出钩子
common.py:
· WorkShop的_time_to_seconds()中解决了读取维修时间时将":"识别为"."的问题