diff --git a/kotonebot-resource/sprites/jp/produce/produce_preparation1.png b/kotonebot-resource/sprites/jp/produce/produce_preparation1.png deleted file mode 100644 index 37bafc8..0000000 Binary files a/kotonebot-resource/sprites/jp/produce/produce_preparation1.png and /dev/null differ diff --git a/kotonebot-resource/sprites/jp/produce/produce_preparation1.png.json b/kotonebot-resource/sprites/jp/produce/produce_preparation1.png.json deleted file mode 100644 index 4f6cdca..0000000 --- a/kotonebot-resource/sprites/jp/produce/produce_preparation1.png.json +++ /dev/null @@ -1 +0,0 @@ -{"definitions":{"e88c9ad1-ec37-4fcd-b086-862e1e7ce8fd":{"name":"Produce.ButtonPIdolOverview","displayName":"Pアイドルー覧 P偶像列表展示","type":"template","annotationId":"e88c9ad1-ec37-4fcd-b086-862e1e7ce8fd","useHintRect":false},"44ba8515-4a60-42c9-8878-b42e4e34ee15":{"name":"Produce.BoxStepIndicator","displayName":"培育准备页面 当前步骤","type":"hint-box","annotationId":"44ba8515-4a60-42c9-8878-b42e4e34ee15","useHintRect":false}},"annotations":[{"id":"e88c9ad1-ec37-4fcd-b086-862e1e7ce8fd","type":"rect","data":{"x1":49,"y1":736,"x2":185,"y2":759},"tip":"Pアイドルー覧 P偶像列表展示"},{"id":"44ba8515-4a60-42c9-8878-b42e4e34ee15","type":"rect","data":{"x1":4,"y1":11,"x2":405,"y2":99}}]} \ No newline at end of file diff --git a/kotonebot-resource/sprites/jp/produce/produce_preparation2.png.json b/kotonebot-resource/sprites/jp/produce/produce_preparation2.png.json deleted file mode 100644 index d1278b5..0000000 --- a/kotonebot-resource/sprites/jp/produce/produce_preparation2.png.json +++ /dev/null @@ -1 +0,0 @@ -{"definitions":{"7e3e3a94-e05c-477e-bd92-0afc172bdb94":{"name":"Produce.BoxSetCountIndicator","displayName":"培育开始页面 当前编成编号","type":"hint-box","annotationId":"7e3e3a94-e05c-477e-bd92-0afc172bdb94","useHintRect":false},"389bdefb-4b76-4ac3-9460-d59c144f8de7":{"name":"Produce.PointProduceNextSet","displayName":"培育开始页面 下一个编成","type":"hint-point","annotationId":"389bdefb-4b76-4ac3-9460-d59c144f8de7","useHintRect":false},"745d904e-19eb-4e15-b734-ef116e6e7c48":{"name":"Produce.PointProducePrevSet","displayName":"培育开始页面 上一个编成","type":"hint-point","annotationId":"745d904e-19eb-4e15-b734-ef116e6e7c48","useHintRect":false}},"annotations":[{"id":"7e3e3a94-e05c-477e-bd92-0afc172bdb94","type":"rect","data":{"x1":17,"y1":671,"x2":119,"y2":707}},{"id":"389bdefb-4b76-4ac3-9460-d59c144f8de7","type":"point","data":{"x":702,"y":832}},{"id":"745d904e-19eb-4e15-b734-ef116e6e7c48","type":"point","data":{"x":14,"y":832}}]} \ No newline at end of file diff --git a/kotonebot-resource/sprites/jp/produce/produce_preparation0.png b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_0.png similarity index 100% rename from kotonebot-resource/sprites/jp/produce/produce_preparation0.png rename to kotonebot-resource/sprites/jp/produce/screenshot_produce_start_0.png diff --git a/kotonebot-resource/sprites/jp/produce/produce_preparation0.png.json b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_0.png.json similarity index 100% rename from kotonebot-resource/sprites/jp/produce/produce_preparation0.png.json rename to kotonebot-resource/sprites/jp/produce/screenshot_produce_start_0.png.json diff --git a/screenshots/produce/select_p_idol.png b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_1_p_idol.png similarity index 100% rename from screenshots/produce/select_p_idol.png rename to kotonebot-resource/sprites/jp/produce/screenshot_produce_start_1_p_idol.png diff --git a/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_1_p_idol.png.json b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_1_p_idol.png.json new file mode 100644 index 0000000..6c7b827 --- /dev/null +++ b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_1_p_idol.png.json @@ -0,0 +1 @@ +{"definitions":{"e88c9ad1-ec37-4fcd-b086-862e1e7ce8fd":{"name":"Produce.ButtonPIdolOverview","displayName":"Pアイドルー覧 P偶像列表展示","type":"template","annotationId":"e88c9ad1-ec37-4fcd-b086-862e1e7ce8fd","useHintRect":false},"44ba8515-4a60-42c9-8878-b42e4e34ee15":{"name":"Produce.TextStepIndicator1","displayName":"1. アイドル選択","type":"template","annotationId":"44ba8515-4a60-42c9-8878-b42e4e34ee15","useHintRect":false}},"annotations":[{"id":"e88c9ad1-ec37-4fcd-b086-862e1e7ce8fd","type":"rect","data":{"x1":49,"y1":736,"x2":185,"y2":759},"tip":"Pアイドルー覧 P偶像列表展示"},{"id":"44ba8515-4a60-42c9-8878-b42e4e34ee15","type":"rect","data":{"x1":18,"y1":32,"x2":168,"y2":66}}]} \ No newline at end of file diff --git a/kotonebot-resource/sprites/jp/produce/produce_preparation2.png b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_2_support_card.png similarity index 100% rename from kotonebot-resource/sprites/jp/produce/produce_preparation2.png rename to kotonebot-resource/sprites/jp/produce/screenshot_produce_start_2_support_card.png diff --git a/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_2_support_card.png.json b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_2_support_card.png.json new file mode 100644 index 0000000..3c5523a --- /dev/null +++ b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_2_support_card.png.json @@ -0,0 +1 @@ +{"definitions":{"7e3e3a94-e05c-477e-bd92-0afc172bdb94":{"name":"Produce.BoxSetCountIndicator","displayName":"培育开始页面 当前编成编号","type":"hint-box","annotationId":"7e3e3a94-e05c-477e-bd92-0afc172bdb94","useHintRect":false},"389bdefb-4b76-4ac3-9460-d59c144f8de7":{"name":"Produce.PointProduceNextSet","displayName":"培育开始页面 下一个编成","type":"hint-point","annotationId":"389bdefb-4b76-4ac3-9460-d59c144f8de7","useHintRect":false},"745d904e-19eb-4e15-b734-ef116e6e7c48":{"name":"Produce.PointProducePrevSet","displayName":"培育开始页面 上一个编成","type":"hint-point","annotationId":"745d904e-19eb-4e15-b734-ef116e6e7c48","useHintRect":false},"a48324ae-7c1a-489e-b3c4-93d12267f88d":{"name":"Produce.TextStepIndicator2","displayName":"2. サポート選択","type":"template","annotationId":"a48324ae-7c1a-489e-b3c4-93d12267f88d","useHintRect":false}},"annotations":[{"id":"7e3e3a94-e05c-477e-bd92-0afc172bdb94","type":"rect","data":{"x1":17,"y1":671,"x2":119,"y2":707}},{"id":"389bdefb-4b76-4ac3-9460-d59c144f8de7","type":"point","data":{"x":702,"y":832}},{"id":"745d904e-19eb-4e15-b734-ef116e6e7c48","type":"point","data":{"x":14,"y":832}},{"id":"a48324ae-7c1a-489e-b3c4-93d12267f88d","type":"rect","data":{"x1":59,"y1":34,"x2":208,"y2":64}}]} \ No newline at end of file diff --git a/screenshots/produce/select_memory.png b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_3_memory.png similarity index 100% rename from screenshots/produce/select_memory.png rename to kotonebot-resource/sprites/jp/produce/screenshot_produce_start_3_memory.png diff --git a/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_3_memory.png.json b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_3_memory.png.json new file mode 100644 index 0000000..65130ec --- /dev/null +++ b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_3_memory.png.json @@ -0,0 +1 @@ +{"definitions":{"f43c313b-8a7b-467b-8442-fc5bcb8b4388":{"name":"Produce.TextStepIndicator3","displayName":"3.メモリー選択","type":"template","annotationId":"f43c313b-8a7b-467b-8442-fc5bcb8b4388","useHintRect":false}},"annotations":[{"id":"f43c313b-8a7b-467b-8442-fc5bcb8b4388","type":"rect","data":{"x1":98,"y1":34,"x2":248,"y2":61}}]} \ No newline at end of file diff --git a/screenshots/produce/select_end.png b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_4_end.png similarity index 100% rename from screenshots/produce/select_end.png rename to kotonebot-resource/sprites/jp/produce/screenshot_produce_start_4_end.png diff --git a/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_4_end.png.json b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_4_end.png.json new file mode 100644 index 0000000..5727dce --- /dev/null +++ b/kotonebot-resource/sprites/jp/produce/screenshot_produce_start_4_end.png.json @@ -0,0 +1 @@ +{"definitions":{"b62bf889-da3c-495a-8707-f3bde73efe92":{"name":"Produce.TextStepIndicator4","displayName":"4.開始確認","type":"template","annotationId":"b62bf889-da3c-495a-8707-f3bde73efe92","useHintRect":false}},"annotations":[{"id":"b62bf889-da3c-495a-8707-f3bde73efe92","type":"rect","data":{"x1":140,"y1":35,"x2":244,"y2":63}}]} \ No newline at end of file diff --git a/kotonebot/tasks/produce/produce.py b/kotonebot/tasks/produce/produce.py index 39e3c43..c2aca4f 100644 --- a/kotonebot/tasks/produce/produce.py +++ b/kotonebot/tasks/produce/produce.py @@ -229,7 +229,7 @@ def do_produce( logger.info('AP insufficient. Exiting produce.') device.click(image.expect_wait(R.InPurodyuusu.ButtonCancel)) return False - # 1. 选择 PIdol [screenshots/produce/select_p_idol.png] + # 1. 选择 PIdol [screenshots/produce/screenshot_produce_start_1_p_idol.png] select_idol(idol_skin_id) it = Interval() while True: @@ -239,10 +239,10 @@ def do_produce( dialog.no() elif image.find(R.Common.ButtonNextNoIcon): device.click() - elif ocr.find(contains('サポート'), rect=R.Produce.BoxStepIndicator): + elif image.find(R.Produce.TextStepIndicator2): break - # 2. 选择支援卡 自动编成 [screenshots/produce/select_support_card.png] - ocr.expect_wait(contains('サポート'), rect=R.Produce.BoxStepIndicator) + # 2. 选择支援卡 自动编成 [screenshots/produce/screenshot_produce_start_2_support_card.png] + image.expect_wait(R.Produce.TextStepIndicator2) it = Interval() while True: if image.find(R.Common.ButtonNextNoIcon, colored=True): @@ -255,8 +255,8 @@ def do_produce( device.click() device.screenshot() it.wait() - # 3. 选择回忆 自动编成 [screenshots/produce/select_memory.png] - ocr.expect_wait(contains('メモリー'), rect=R.Produce.BoxStepIndicator) + # 3. 选择回忆 自动编成 [screenshots/produce/screenshot_produce_start_3_memory.png] + image.expect_wait(R.Produce.TextStepIndicator3) # 自动编成 if memory_set_index is not None and not 1 <= memory_set_index <= 10: raise ValueError('`memory_set_index` must be in range [1, 10].') @@ -268,12 +268,12 @@ def do_produce( else: select_set(memory_set_index) (SimpleDispatcher('do_produce.step_3') + .until(R.Produce.TextStepIndicator4) .click(R.Common.ButtonNextNoIcon) .click(R.Common.ButtonConfirm) - .until(contains('開始確認'), rect=R.Produce.BoxStepIndicator) ).run() - # 4. 选择道具 [screenshots/produce/select_end.png] + # 4. 选择道具 [screenshots/produce/screenshot_produce_start_4_end.png] # TODO: 如果道具不足,这里加入推送提醒 if conf().produce.use_note_boost: if image.find(R.Produce.CheckboxIconNoteBoost): diff --git a/screenshots/produce/select_support_card.png b/screenshots/produce/select_support_card.png deleted file mode 100644 index cce4f74..0000000 Binary files a/screenshots/produce/select_support_card.png and /dev/null differ