Skip to content

Commit

Permalink
feat: 可以手动维修,不用快修 (#192)
Browse files Browse the repository at this point in the history
  • Loading branch information
kuainx authored Feb 9, 2025
1 parent 82b1ff9 commit 65ccd0c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions autowsgr/configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,6 +184,8 @@ class UserConfig(BaseConfig):
"""是否在启动时检查游戏页面"""
dock_full_destroy: bool = True
"""船坞已满时自动清空, 若设置为false则船坞已满后终止所有常规出征任务"""
repair_manually: bool = False
"""是否手动修理, 若设置为True则需要修理时不使用快修, 结束脚本"""
bathroom_feature_count: int = 1
"""浴室数(购买的浴室装饰数, 最大为 3) TODO: 可自动获取"""
bathroom_count: int = 2
Expand Down
3 changes: 3 additions & 0 deletions autowsgr/game/game_operation.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,9 @@ def quick_repair(
if timer.config.debug:
timer.logger.debug('ship_stats:', ship_stats)
if any(need_repair) or timer.image_exist(IMG.repair_image[1]):
if timer.config.repair_manually:
timer.logger.info('需要手动修理舰船')
raise BaseException('需要手动修理舰船')
timer.click(420, 420, times=2, delay=0.8) # 进入修理页面
# 快修已经开始泡澡的船
pos = timer.get_image_position(IMG.repair_image[1])
Expand Down

0 comments on commit 65ccd0c

Please sign in to comment.