Open
Conversation
c2d6639 to
3bc3444
Compare
LmeSzinc
reviewed
Feb 18, 2026
Owner
LmeSzinc
left a comment
There was a problem hiding this comment.
对于未支持的服务器,不要复制别的服务器的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) |
Owner
There was a problem hiding this comment.
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 |
Owner
There was a problem hiding this comment.
买咖喱作为一个单独的功能,不进入 Dorm 任务,在这里直接调用
因为不进入 Dorm 任务了,所以也不需要用户设置
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
當滿油時委託獎勵若有油會無法領取獎勵造成 ALAS 錯誤退出
修正為偵測到滿油提示時觸發後宅購買11個咖哩消耗少量燃料後保持獎勵正常領取
當前僅支援日服