Skip to content

Fix: 滿油時無法收穫委託#5507

Draft
ken1882 wants to merge 2 commits intoLmeSzinc:devfrom
ken1882:compeador/commision-fuel-dorm
Draft

Fix: 滿油時無法收穫委託#5507
ken1882 wants to merge 2 commits intoLmeSzinc:devfrom
ken1882:compeador/commision-fuel-dorm

Conversation

@ken1882
Copy link
Copy Markdown
Contributor

@ken1882 ken1882 commented Feb 11, 2026

當滿油時委託獎勵若有油會無法領取獎勵造成 ALAS 錯誤退出

修正為偵測到滿油提示時觸發後宅購買11個咖哩消耗少量燃料後保持獎勵正常領取

當前僅支援日服

@ken1882 ken1882 force-pushed the compeador/commision-fuel-dorm branch from c2d6639 to 3bc3444 Compare February 12, 2026 01:51
Copy link
Copy Markdown
Owner

@LmeSzinc LmeSzinc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

对于未支持的服务器,不要复制别的服务器的assets去占位,不然很难知道缺了什么
运行时增加服务器判断直接跳过未支持的服务器

Comment on lines +406 to +423
def buy_food(self):
"""
Buy 11 navy curries, should only be here when fuel is maxed.
"""
while 1:
self.device.screenshot()
cost = OCR_FUEL_COST.ocr(self.device.image)
logger.info(f'Current dorm food fuel cost: {cost}')
if self.appear(FOOD_BUY_COST) and cost > 100:
self.appear_then_click(FOOD_BUY_CONFIRM)
break
elif self.appear(FOOD_BUY_ADD_10) and cost < 100:
self.device.click(FOOD_BUY_ADD_10)
elif cost > 1000:
logger.warning('Incorrect cost for dorm food, abort')
break
else:
self.device.click(BTN_BUY_CURRY)
Copy link
Copy Markdown
Owner

@LmeSzinc LmeSzinc Feb 18, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

BTN_BUY_CURRY 需要是一个 assets
分开3个状态循环,从后宅页面经过食物页面进入购买页面,在购买页面点加号直到目标数量,确定购买关闭食物页面回到后宅页面

Comment on lines +559 to +565
if self.appear(FUEL_MAXED):
logger.info("Fuel maxed, skip reward receive")
self.config.cross_set('Dorm.Dorm.BuyFood', True)
self.config.task_call('Dorm')
self.config.task_delay(minute=1)
self.config.task_stop()
break
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

买咖喱作为一个单独的功能,不进入 Dorm 任务,在这里直接调用
因为不进入 Dorm 任务了,所以也不需要用户设置

@ken1882 ken1882 force-pushed the compeador/commision-fuel-dorm branch from 430b7a8 to 2f49f93 Compare March 24, 2026 10:06
@ken1882 ken1882 marked this pull request as draft March 24, 2026 10:08
@LmeSzinc LmeSzinc added the feature request / 功能请求 New feature or requests label Mar 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature request / 功能请求 New feature or requests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants