1
0
mirror of https://github.com/TheFunny/ArisuAutoSweeper synced 2026-06-24 00:54:52 +00:00

18 Commits

Author SHA1 Message Date
YoursFunny 15bf77da3d fix(cafe): expand search box 2023-11-23 16:21:58 +08:00
YoursFunny 4ce8073096 perf(sweep): simplify sweep num ocr 2023-11-23 16:08:51 +08:00
YoursFunny aa872c890d doc: update readme 2023-11-23 14:45:31 +08:00
YoursFunny 25e0559171 feat: add oversea servers 2023-11-23 14:23:52 +08:00
YoursFunny df6da1f77a fix(cafe): adjust property of second cafe setting 2023-11-23 14:06:38 +08:00
YoursFunny fc49adc859 doc: update readme 2023-11-22 22:23:09 +08:00
YoursFunny 4582406ef2 perf(tc): improve status check stability 2023-11-22 22:04:50 +08:00
YoursFunny 256dc96598 fix(tc): restrict count frequency of claim reward 2023-11-22 22:01:07 +08:00
YoursFunny 04744d6f8c fix(scrimmage): add missing multiply of ap count 2023-11-22 22:01:06 +08:00
YoursFunny 8fe578615d fix: change webui port 2023-11-22 21:02:00 +08:00
YoursFunny 5e9615542c fix: set repo when update 2023-11-22 20:47:18 +08:00
YoursFunny 36c5f60eb3 fix(cafe): adjust property of second cafe setting 2023-11-22 19:05:36 +08:00
YoursFunny 91650cc584 feat: add en assets for bounty scrimmage and sweep 2023-11-22 19:04:50 +08:00
YoursFunny 67881568dd perf(button): combine shared assets 2023-11-22 13:13:39 +08:00
YoursFunny f8404edd9e fix: set repo of build-in update 2023-11-21 23:15:06 +08:00
YoursFunny ff3ec041d2 refactor(cafe): separate ui operation and simplify template extraction 2023-11-21 22:18:28 +08:00
YoursFunny 99074a1575 feat(cafe): add template search area 2023-11-21 21:31:01 +08:00
YoursFunny 7862fa6cb8 fix(scrimmage): fix typo 2023-11-21 20:56:39 +08:00
105 changed files with 448 additions and 378 deletions
+6 -1
View File
@@ -22,7 +22,12 @@ The script is still under active development. The following features have been i
Supported servers: Supported servers:
- [x] JP - [x] JP
- [x] OVERSEA - Global - [x] OVERSEA
Supported in-game languages:
- [x] Japanese
- [x] English
## Relative projects ## Relative projects
+8 -2
View File
@@ -22,12 +22,18 @@
目前支持的服务器: 目前支持的服务器:
- [x] 日服 - [x] 日服
- [x] 国际服 - 全球 - [x] 国际服
目前支持的游戏内语言:
- [x] 日语
- [x] 英语
## 已知问题 ## 已知问题
若愿意提供其他服务器支持,请开 PR 或 Issue。 若愿意提供其他语言或国服支持,请开 PR 或 Issue。
- **国际服登录的全屏通知**:未实现自动关闭,正在研究中
- **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue - **大小月卡**:未实现自动领取,~~因为没买过~~,可能不影响使用。愿意提供图片的请开 Issue
- **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开 - **月卡的额外悬赏券和学院交流券**:不太清楚月卡领取额外券的机制,~~因为没买过~~,可能影响相关任务使用券和体力的计算。愿意提供相关信息的请开
Issue Issue
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 4.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 905 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 5.8 KiB

After

Width:  |  Height:  |  Size: 5.8 KiB

Before

Width:  |  Height:  |  Size: 6.5 KiB

After

Width:  |  Height:  |  Size: 6.5 KiB

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 5.1 KiB

Before

Width:  |  Height:  |  Size: 8.5 KiB

After

Width:  |  Height:  |  Size: 8.5 KiB

Before

Width:  |  Height:  |  Size: 5.7 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Before

Width:  |  Height:  |  Size: 5.3 KiB

After

Width:  |  Height:  |  Size: 5.3 KiB

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 9.4 KiB

After

Width:  |  Height:  |  Size: 9.4 KiB

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.4 KiB

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Before

Width:  |  Height:  |  Size: 7.8 KiB

After

Width:  |  Height:  |  Size: 7.8 KiB

Before

Width:  |  Height:  |  Size: 905 KiB

After

Width:  |  Height:  |  Size: 905 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1016 KiB

Before

Width:  |  Height:  |  Size: 3.9 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
+7 -4
View File
@@ -55,7 +55,7 @@ class ConfigModel:
# Webui # Webui
WebuiHost: str = "0.0.0.0" WebuiHost: str = "0.0.0.0"
WebuiPort: int = 22367 WebuiPort: int = 23467
Language: str = "en-US" Language: str = "en-US"
Theme: str = "default" Theme: str = "default"
DpiScaling: bool = True DpiScaling: bool = True
@@ -77,6 +77,12 @@ class DeployConfig(ConfigModel):
self.config_template = {} self.config_template = {}
self.read() self.read()
self.set_repo()
self.write()
self.show_config()
def set_repo(self):
# Bypass webui.config.DeployConfig.__setattr__() # Bypass webui.config.DeployConfig.__setattr__()
# Don't write these into deploy.yaml # Don't write these into deploy.yaml
if self.Repository == 'cn': if self.Repository == 'cn':
@@ -84,9 +90,6 @@ class DeployConfig(ConfigModel):
if self.Repository == 'global': if self.Repository == 'global':
super().__setattr__('Repository', 'https://github.com/TheFunny/ArisuAutoSweeper') super().__setattr__('Repository', 'https://github.com/TheFunny/ArisuAutoSweeper')
self.write()
self.show_config()
def show_config(self): def show_config(self):
logger.hr("Show deploy config", 1) logger.hr("Show deploy config", 1)
for k, v in self.config.items(): for k, v in self.config.items():
+2 -2
View File
@@ -128,8 +128,8 @@ Deploy:
WebuiHost: 0.0.0.0 WebuiHost: 0.0.0.0
# --port. Port to listen # --port. Port to listen
# You will be able to access webui via `http://{host}:{port}` # You will be able to access webui via `http://{host}:{port}`
# [In most cases] Default to 22367 # [In most cases] Default to 23467
WebuiPort: 22367 WebuiPort: 23467
# Language to use on web ui # Language to use on web ui
# 'zh-CN' for Chinese simplified # 'zh-CN' for Chinese simplified
# 'en-US' for English # 'en-US' for English
+1 -1
View File
@@ -49,7 +49,7 @@ def func(ev: threading.Event):
args, _ = parser.parse_known_args() args, _ = parser.parse_known_args()
host = args.host or State.deploy_config.WebuiHost or "0.0.0.0" host = args.host or State.deploy_config.WebuiHost or "0.0.0.0"
port = args.port or int(State.deploy_config.WebuiPort) or 22367 port = args.port or int(State.deploy_config.WebuiPort) or 23467
State.electron = args.electron State.electron = args.electron
logger.hr("Launcher config") logger.hr("Launcher config")
+4
View File
@@ -12,6 +12,10 @@
"option": [ "option": [
"auto", "auto",
"JP-Official", "JP-Official",
"OVERSEA-TWHKMO",
"OVERSEA-Korea",
"OVERSEA-Asia",
"OVERSEA-America",
"OVERSEA-Global" "OVERSEA-Global"
] ]
}, },
+1 -1
View File
@@ -17,7 +17,7 @@ class GeneratedConfig:
# Group `Emulator` # Group `Emulator`
Emulator_Serial = 'auto' Emulator_Serial = 'auto'
Emulator_PackageName = 'auto' # auto, JP-Official, OVERSEA-Global Emulator_PackageName = 'auto' # auto, JP-Official, OVERSEA-TWHKMO, OVERSEA-Korea, OVERSEA-Asia, OVERSEA-America, OVERSEA-Global
Emulator_GameLanguage = 'auto' # auto, jp, en Emulator_GameLanguage = 'auto' # auto, jp, en
Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy Emulator_ScreenshotMethod = 'auto' # auto, ADB, ADB_nc, uiautomator2, aScreenCap, aScreenCap_nc, DroidCast, DroidCast_raw, scrcpy
Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch Emulator_ControlMethod = 'MaaTouch' # minitouch, MaaTouch
+5 -1
View File
@@ -85,11 +85,15 @@
"help": "Can't distinguish different regions of oversea servers, please select the server manually.", "help": "Can't distinguish different regions of oversea servers, please select the server manually.",
"auto": "Auto-detect", "auto": "Auto-detect",
"JP-Official": "[JP]-Official", "JP-Official": "[JP]-Official",
"OVERSEA-TWHKMO": "[OVERSEA]-TW/HK/MO",
"OVERSEA-Korea": "[OVERSEA]-Korea",
"OVERSEA-Asia": "[OVERSEA]-Asia",
"OVERSEA-America": "[OVERSEA]-North America",
"OVERSEA-Global": "[OVERSEA]-Global" "OVERSEA-Global": "[OVERSEA]-Global"
}, },
"GameLanguage": { "GameLanguage": {
"name": "In-game Text Language", "name": "In-game Text Language",
"help": "", "help": "Can't detect language automatically, please select the language manually.",
"auto": "Auto-detect", "auto": "Auto-detect",
"jp": "Japanese", "jp": "Japanese",
"en": "English" "en": "English"
+5 -1
View File
@@ -85,11 +85,15 @@
"help": "无法区分国际服的不同地区,请手动选择服务器", "help": "无法区分国际服的不同地区,请手动选择服务器",
"auto": "自动检测", "auto": "自动检测",
"JP-Official": "[日服]-官服", "JP-Official": "[日服]-官服",
"OVERSEA-TWHKMO": "[国际服]-港澳台",
"OVERSEA-Korea": "[国际服]-韩国",
"OVERSEA-Asia": "[国际服]-亚洲",
"OVERSEA-America": "[国际服]-北美",
"OVERSEA-Global": "[国际服]-全球" "OVERSEA-Global": "[国际服]-全球"
}, },
"GameLanguage": { "GameLanguage": {
"name": "游戏内文本语言", "name": "游戏内文本语言",
"help": "", "help": "无法自动检测语言,请手动选择语言",
"auto": "自动检测", "auto": "自动检测",
"jp": "日语", "jp": "日语",
"en": "英语" "en": "英语"
+4
View File
@@ -8,6 +8,10 @@ server = 'JP-Official'
VALID_LANG = ['jp', 'en'] VALID_LANG = ['jp', 'en']
VALID_SERVER = { VALID_SERVER = {
'JP-Official': 'com.YostarJP.BlueArchive', 'JP-Official': 'com.YostarJP.BlueArchive',
'OVERSEA-TWHKMO': 'com.nexon.bluearchive',
'OVERSEA-Korea': 'com.nexon.bluearchive',
'OVERSEA-Asia': 'com.nexon.bluearchive',
'OVERSEA-America': 'com.nexon.bluearchive',
'OVERSEA-Global': 'com.nexon.bluearchive', 'OVERSEA-Global': 'com.nexon.bluearchive',
} }
VALID_PACKAGE = set(list(VALID_SERVER.values())) VALID_PACKAGE = set(list(VALID_SERVER.values()))
+5 -1
View File
@@ -13,7 +13,11 @@ from module.config.atomicwrites import atomic_write
LANGUAGES = ['zh-CN', 'en-US'] LANGUAGES = ['zh-CN', 'en-US']
SERVER_TO_TIMEZONE = { SERVER_TO_TIMEZONE = {
'JP-Official': timedelta(hours=9), 'JP-Official': timedelta(hours=9),
'OVERSEA-Global': timedelta(hours=0), 'OVERSEA-TWHKMO': timedelta(hours=9),
'OVERSEA-Korea': timedelta(hours=9),
'OVERSEA-Asia': timedelta(hours=9),
'OVERSEA-America': timedelta(hours=9),
'OVERSEA-Global': timedelta(hours=9),
} }
DEFAULT_TIME = datetime(2020, 1, 1, 0, 0) DEFAULT_TIME = datetime(2020, 1, 1, 0, 0)
+2 -2
View File
@@ -16,8 +16,8 @@ import time
from subprocess import PIPE, Popen from subprocess import PIPE, Popen
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
from module.logger import logger
from module.config.utils import random_id from module.config.utils import random_id
from module.logger import logger
from module.webui.setting import State from module.webui.setting import State
if TYPE_CHECKING: if TYPE_CHECKING:
@@ -41,7 +41,7 @@ def am_i_the_only_thread() -> bool:
def remote_access_service( def remote_access_service(
local_host="127.0.0.1", local_host="127.0.0.1",
local_port=22367, local_port=23467,
server="app.pywebio.online", server="app.pywebio.online",
server_port=1022, server_port=1022,
remote_port="/", remote_port="/",
+3
View File
@@ -5,6 +5,7 @@ import time
from typing import Generator, List, Tuple from typing import Generator, List, Tuple
import requests import requests
from deploy.Windows.config import ExecutionError from deploy.Windows.config import ExecutionError
from deploy.Windows.git import GitManager from deploy.Windows.git import GitManager
from deploy.Windows.pip import PipManager from deploy.Windows.pip import PipManager
@@ -20,6 +21,7 @@ from module.webui.utils import TaskHandler, get_next_time
class Updater(DeployConfig, GitManager, PipManager): class Updater(DeployConfig, GitManager, PipManager):
def __init__(self, file=DEPLOY_CONFIG): def __init__(self, file=DEPLOY_CONFIG):
super().__init__(file=file) super().__init__(file=file)
self.set_repo()
self.state = 0 self.state = 0
self.event: threading.Event = None self.event: threading.Event = None
@@ -194,6 +196,7 @@ class Updater(DeployConfig, GitManager, PipManager):
def update(self): def update(self):
logger.hr("Run update") logger.hr("Run update")
self.set_repo()
try: try:
self.git_install() self.git_install()
self.pip_install() self.pip_install()
+30 -135
View File
@@ -22,15 +22,8 @@ ACCOUNT_INFO_CHECK = ButtonWrapper(
) )
BACK = ButtonWrapper( BACK = ButtonWrapper(
name='BACK', name='BACK',
jp=Button( share=Button(
file='./assets/jp/base/page/BACK.png', file='./assets/share/base/page/BACK.png',
area=(34, 19, 81, 56),
search=(14, 0, 101, 76),
color=(93, 118, 164),
button=(34, 19, 81, 56),
),
en=Button(
file='./assets/en/base/page/BACK.png',
area=(34, 19, 81, 56), area=(34, 19, 81, 56),
search=(14, 0, 101, 76), search=(14, 0, 101, 76),
color=(93, 118, 164), color=(93, 118, 164),
@@ -141,15 +134,8 @@ GACHA_CHECK = ButtonWrapper(
) )
HOME = ButtonWrapper( HOME = ButtonWrapper(
name='HOME', name='HOME',
jp=Button( share=Button(
file='./assets/jp/base/page/HOME.png', file='./assets/share/base/page/HOME.png',
area=(1218, 8, 1253, 41),
search=(1198, 0, 1273, 61),
color=(168, 182, 205),
button=(1218, 8, 1253, 41),
),
en=Button(
file='./assets/en/base/page/HOME.png',
area=(1218, 8, 1253, 41), area=(1218, 8, 1253, 41),
search=(1198, 0, 1273, 61), search=(1198, 0, 1273, 61),
color=(168, 182, 205), color=(168, 182, 205),
@@ -158,15 +144,8 @@ HOME = ButtonWrapper(
) )
LOADING_CHECK = ButtonWrapper( LOADING_CHECK = ButtonWrapper(
name='LOADING_CHECK', name='LOADING_CHECK',
jp=Button( share=Button(
file='./assets/jp/base/page/LOADING_CHECK.png', file='./assets/share/base/page/LOADING_CHECK.png',
area=(1084, 659, 1120, 674),
search=(1064, 639, 1140, 694),
color=(173, 196, 219),
button=(1084, 659, 1120, 674),
),
en=Button(
file='./assets/en/base/page/LOADING_CHECK.png',
area=(1084, 659, 1120, 674), area=(1084, 659, 1120, 674),
search=(1064, 639, 1140, 694), search=(1064, 639, 1140, 694),
color=(173, 196, 219), color=(173, 196, 219),
@@ -192,15 +171,8 @@ MAIL_CHECK = ButtonWrapper(
) )
MAIN_GO_TO_CAFE = ButtonWrapper( MAIN_GO_TO_CAFE = ButtonWrapper(
name='MAIN_GO_TO_CAFE', name='MAIN_GO_TO_CAFE',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_CAFE.png', file='./assets/share/base/page/MAIN_GO_TO_CAFE.png',
area=(81, 638, 102, 668),
search=(61, 618, 122, 688),
color=(156, 209, 233),
button=(81, 638, 102, 668),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_CAFE.png',
area=(81, 638, 102, 668), area=(81, 638, 102, 668),
search=(61, 618, 122, 688), search=(61, 618, 122, 688),
color=(156, 209, 233), color=(156, 209, 233),
@@ -209,15 +181,8 @@ MAIN_GO_TO_CAFE = ButtonWrapper(
) )
MAIN_GO_TO_CIRCLE = ButtonWrapper( MAIN_GO_TO_CIRCLE = ButtonWrapper(
name='MAIN_GO_TO_CIRCLE', name='MAIN_GO_TO_CIRCLE',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_CIRCLE.png', file='./assets/share/base/page/MAIN_GO_TO_CIRCLE.png',
area=(540, 631, 583, 660),
search=(520, 611, 603, 680),
color=(131, 204, 234),
button=(540, 631, 583, 660),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_CIRCLE.png',
area=(540, 631, 583, 660), area=(540, 631, 583, 660),
search=(520, 611, 603, 680), search=(520, 611, 603, 680),
color=(131, 204, 234), color=(131, 204, 234),
@@ -226,15 +191,8 @@ MAIN_GO_TO_CIRCLE = ButtonWrapper(
) )
MAIN_GO_TO_CRAFTING = ButtonWrapper( MAIN_GO_TO_CRAFTING = ButtonWrapper(
name='MAIN_GO_TO_CRAFTING', name='MAIN_GO_TO_CRAFTING',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_CRAFTING.png', file='./assets/share/base/page/MAIN_GO_TO_CRAFTING.png',
area=(665, 622, 693, 664),
search=(645, 602, 713, 684),
color=(192, 229, 241),
button=(665, 622, 693, 664),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_CRAFTING.png',
area=(665, 622, 693, 664), area=(665, 622, 693, 664),
search=(645, 602, 713, 684), search=(645, 602, 713, 684),
color=(192, 229, 241), color=(192, 229, 241),
@@ -243,15 +201,8 @@ MAIN_GO_TO_CRAFTING = ButtonWrapper(
) )
MAIN_GO_TO_GACHA = ButtonWrapper( MAIN_GO_TO_GACHA = ButtonWrapper(
name='MAIN_GO_TO_GACHA', name='MAIN_GO_TO_GACHA',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_GACHA.png', file='./assets/share/base/page/MAIN_GO_TO_GACHA.png',
area=(900, 623, 924, 670),
search=(880, 603, 944, 690),
color=(157, 219, 241),
button=(900, 623, 924, 670),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_GACHA.png',
area=(900, 623, 924, 670), area=(900, 623, 924, 670),
search=(880, 603, 944, 690), search=(880, 603, 944, 690),
color=(157, 219, 241), color=(157, 219, 241),
@@ -260,15 +211,8 @@ MAIN_GO_TO_GACHA = ButtonWrapper(
) )
MAIN_GO_TO_MAIL = ButtonWrapper( MAIN_GO_TO_MAIL = ButtonWrapper(
name='MAIN_GO_TO_MAIL', name='MAIN_GO_TO_MAIL',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_MAIL.png', file='./assets/share/base/page/MAIN_GO_TO_MAIL.png',
area=(1130, 29, 1156, 49),
search=(1110, 9, 1176, 69),
color=(94, 121, 166),
button=(1130, 29, 1156, 49),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_MAIL.png',
area=(1130, 29, 1156, 49), area=(1130, 29, 1156, 49),
search=(1110, 9, 1176, 69), search=(1110, 9, 1176, 69),
color=(94, 121, 166), color=(94, 121, 166),
@@ -277,15 +221,8 @@ MAIN_GO_TO_MAIL = ButtonWrapper(
) )
MAIN_GO_TO_MOMOTALK = ButtonWrapper( MAIN_GO_TO_MOMOTALK = ButtonWrapper(
name='MAIN_GO_TO_MOMOTALK', name='MAIN_GO_TO_MOMOTALK',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_MOMOTALK.png', file='./assets/share/base/page/MAIN_GO_TO_MOMOTALK.png',
area=(154, 134, 177, 158),
search=(134, 114, 197, 178),
color=(255, 219, 227),
button=(154, 134, 177, 158),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_MOMOTALK.png',
area=(154, 134, 177, 158), area=(154, 134, 177, 158),
search=(134, 114, 197, 178), search=(134, 114, 197, 178),
color=(255, 219, 227), color=(255, 219, 227),
@@ -294,15 +231,8 @@ MAIN_GO_TO_MOMOTALK = ButtonWrapper(
) )
MAIN_GO_TO_PURCHASE = ButtonWrapper( MAIN_GO_TO_PURCHASE = ButtonWrapper(
name='MAIN_GO_TO_PURCHASE', name='MAIN_GO_TO_PURCHASE',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_PURCHASE.png', file='./assets/share/base/page/MAIN_GO_TO_PURCHASE.png',
area=(148, 204, 183, 253),
search=(128, 184, 203, 273),
color=(172, 214, 239),
button=(148, 204, 183, 253),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_PURCHASE.png',
area=(148, 204, 183, 253), area=(148, 204, 183, 253),
search=(128, 184, 203, 273), search=(128, 184, 203, 273),
color=(172, 214, 239), color=(172, 214, 239),
@@ -311,15 +241,8 @@ MAIN_GO_TO_PURCHASE = ButtonWrapper(
) )
MAIN_GO_TO_SCHEDULE = ButtonWrapper( MAIN_GO_TO_SCHEDULE = ButtonWrapper(
name='MAIN_GO_TO_SCHEDULE', name='MAIN_GO_TO_SCHEDULE',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_SCHEDULE.png', file='./assets/share/base/page/MAIN_GO_TO_SCHEDULE.png',
area=(194, 638, 216, 672),
search=(174, 618, 236, 692),
color=(149, 194, 222),
button=(194, 638, 216, 672),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_SCHEDULE.png',
area=(194, 638, 216, 672), area=(194, 638, 216, 672),
search=(174, 618, 236, 692), search=(174, 618, 236, 692),
color=(149, 194, 222), color=(149, 194, 222),
@@ -328,15 +251,8 @@ MAIN_GO_TO_SCHEDULE = ButtonWrapper(
) )
MAIN_GO_TO_SHOP = ButtonWrapper( MAIN_GO_TO_SHOP = ButtonWrapper(
name='MAIN_GO_TO_SHOP', name='MAIN_GO_TO_SHOP',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_SHOP.png', file='./assets/share/base/page/MAIN_GO_TO_SHOP.png',
area=(773, 630, 816, 667),
search=(753, 610, 836, 687),
color=(146, 208, 235),
button=(773, 630, 816, 667),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_SHOP.png',
area=(773, 630, 816, 667), area=(773, 630, 816, 667),
search=(753, 610, 836, 687), search=(753, 610, 836, 687),
color=(146, 208, 235), color=(146, 208, 235),
@@ -345,15 +261,8 @@ MAIN_GO_TO_SHOP = ButtonWrapper(
) )
MAIN_GO_TO_TASK = ButtonWrapper( MAIN_GO_TO_TASK = ButtonWrapper(
name='MAIN_GO_TO_TASK', name='MAIN_GO_TO_TASK',
jp=Button( share=Button(
file='./assets/jp/base/page/MAIN_GO_TO_TASK.png', file='./assets/share/base/page/MAIN_GO_TO_TASK.png',
area=(52, 220, 78, 248),
search=(32, 200, 98, 268),
color=(226, 207, 203),
button=(52, 220, 78, 248),
),
en=Button(
file='./assets/en/base/page/MAIN_GO_TO_TASK.png',
area=(52, 220, 78, 248), area=(52, 220, 78, 248),
search=(32, 200, 98, 268), search=(32, 200, 98, 268),
color=(226, 207, 203), color=(226, 207, 203),
@@ -396,15 +305,8 @@ MISSION_CHECK = ButtonWrapper(
) )
MOMOTALK_CHECK = ButtonWrapper( MOMOTALK_CHECK = ButtonWrapper(
name='MOMOTALK_CHECK', name='MOMOTALK_CHECK',
jp=Button( share=Button(
file='./assets/jp/base/page/MOMOTALK_CHECK.png', file='./assets/share/base/page/MOMOTALK_CHECK.png',
area=(144, 107, 169, 130),
search=(124, 87, 189, 150),
color=(253, 211, 219),
button=(144, 107, 169, 130),
),
en=Button(
file='./assets/en/base/page/MOMOTALK_CHECK.png',
area=(144, 107, 169, 130), area=(144, 107, 169, 130),
search=(124, 87, 189, 150), search=(124, 87, 189, 150),
color=(253, 211, 219), color=(253, 211, 219),
@@ -413,15 +315,8 @@ MOMOTALK_CHECK = ButtonWrapper(
) )
MOMOTALK_GO_TO_MAIN = ButtonWrapper( MOMOTALK_GO_TO_MAIN = ButtonWrapper(
name='MOMOTALK_GO_TO_MAIN', name='MOMOTALK_GO_TO_MAIN',
jp=Button( share=Button(
file='./assets/jp/base/page/MOMOTALK_GO_TO_MAIN.png', file='./assets/share/base/page/MOMOTALK_GO_TO_MAIN.png',
area=(1108, 105, 1134, 131),
search=(1088, 85, 1154, 151),
color=(252, 182, 194),
button=(1108, 105, 1134, 131),
),
en=Button(
file='./assets/en/base/page/MOMOTALK_GO_TO_MAIN.png',
area=(1108, 105, 1134, 131), area=(1108, 105, 1134, 131),
search=(1088, 85, 1154, 151), search=(1088, 85, 1154, 151),
color=(252, 182, 194), color=(252, 182, 194),
+6 -27
View File
@@ -39,15 +39,8 @@ AP_EXCEED = ButtonWrapper(
) )
DAILY_NEWS = ButtonWrapper( DAILY_NEWS = ButtonWrapper(
name='DAILY_NEWS', name='DAILY_NEWS',
jp=Button( share=Button(
file='./assets/jp/base/popup/DAILY_NEWS.png', file='./assets/share/base/popup/DAILY_NEWS.png',
area=(120, 89, 326, 113),
search=(100, 69, 346, 133),
color=(150, 204, 253),
button=(1128, 89, 1156, 117),
),
en=Button(
file='./assets/en/base/popup/DAILY_NEWS.png',
area=(120, 89, 326, 113), area=(120, 89, 326, 113),
search=(100, 69, 346, 133), search=(100, 69, 346, 133),
color=(150, 204, 253), color=(150, 204, 253),
@@ -56,15 +49,8 @@ DAILY_NEWS = ButtonWrapper(
) )
DAILY_REWARD = ButtonWrapper( DAILY_REWARD = ButtonWrapper(
name='DAILY_REWARD', name='DAILY_REWARD',
jp=Button( share=Button(
file='./assets/jp/base/popup/DAILY_REWARD.png', file='./assets/share/base/popup/DAILY_REWARD.png',
area=(416, 165, 434, 216),
search=(396, 145, 454, 236),
color=(203, 227, 237),
button=(920, 632, 1140, 712),
),
en=Button(
file='./assets/en/base/popup/DAILY_REWARD.png',
area=(416, 165, 434, 216), area=(416, 165, 434, 216),
search=(396, 145, 454, 236), search=(396, 145, 454, 236),
color=(203, 227, 237), color=(203, 227, 237),
@@ -73,15 +59,8 @@ DAILY_REWARD = ButtonWrapper(
) )
GET_NEW_STUDENT = ButtonWrapper( GET_NEW_STUDENT = ButtonWrapper(
name='GET_NEW_STUDENT', name='GET_NEW_STUDENT',
jp=Button( share=Button(
file='./assets/jp/base/popup/GET_NEW_STUDENT.png', file='./assets/share/base/popup/GET_NEW_STUDENT.png',
area=(32, 93, 158, 114),
search=(12, 73, 178, 134),
color=(125, 132, 92),
button=(934, 643, 1263, 714),
),
en=Button(
file='./assets/en/base/popup/GET_NEW_STUDENT.png',
area=(32, 93, 158, 114), area=(32, 93, 158, 114),
search=(12, 73, 178, 134), search=(12, 73, 178, 134),
color=(125, 132, 92), color=(125, 132, 92),
+56 -8
View File
@@ -12,7 +12,13 @@ CHECK_BOUNTY = ButtonWrapper(
color=(88, 113, 139), color=(88, 113, 139),
button=(654, 87, 889, 129), button=(654, 87, 889, 129),
), ),
en=None, en=Button(
file='./assets/en/bounty/CHECK_BOUNTY.png',
area=(654, 87, 891, 126),
search=(634, 67, 911, 146),
color=(92, 116, 141),
button=(654, 87, 891, 126),
),
) )
CHECK_DESERT_RAILROAD = ButtonWrapper( CHECK_DESERT_RAILROAD = ButtonWrapper(
name='CHECK_DESERT_RAILROAD', name='CHECK_DESERT_RAILROAD',
@@ -23,7 +29,13 @@ CHECK_DESERT_RAILROAD = ButtonWrapper(
color=(172, 179, 183), color=(172, 179, 183),
button=(106, 147, 401, 179), button=(106, 147, 401, 179),
), ),
en=None, en=Button(
file='./assets/en/bounty/CHECK_DESERT_RAILROAD.png',
area=(105, 144, 490, 183),
search=(85, 124, 510, 203),
color=(200, 207, 211),
button=(105, 144, 490, 183),
),
) )
CHECK_HIGHWAY = ButtonWrapper( CHECK_HIGHWAY = ButtonWrapper(
name='CHECK_HIGHWAY', name='CHECK_HIGHWAY',
@@ -34,7 +46,13 @@ CHECK_HIGHWAY = ButtonWrapper(
color=(191, 199, 203), color=(191, 199, 203),
button=(107, 147, 400, 179), button=(107, 147, 400, 179),
), ),
en=None, en=Button(
file='./assets/en/bounty/CHECK_HIGHWAY.png',
area=(104, 143, 391, 188),
search=(84, 123, 411, 208),
color=(206, 213, 217),
button=(104, 143, 391, 188),
),
) )
CHECK_SCHOOLHOUSE = ButtonWrapper( CHECK_SCHOOLHOUSE = ButtonWrapper(
name='CHECK_SCHOOLHOUSE', name='CHECK_SCHOOLHOUSE',
@@ -45,7 +63,13 @@ CHECK_SCHOOLHOUSE = ButtonWrapper(
color=(176, 183, 187), color=(176, 183, 187),
button=(106, 147, 314, 179), button=(106, 147, 314, 179),
), ),
en=None, en=Button(
file='./assets/en/bounty/CHECK_SCHOOLHOUSE.png',
area=(102, 144, 408, 185),
search=(82, 124, 428, 205),
color=(203, 210, 214),
button=(102, 144, 408, 185),
),
) )
OCR_TICKET = ButtonWrapper( OCR_TICKET = ButtonWrapper(
name='OCR_TICKET', name='OCR_TICKET',
@@ -56,7 +80,13 @@ OCR_TICKET = ButtonWrapper(
color=(197, 206, 213), color=(197, 206, 213),
button=(195, 85, 237, 113), button=(195, 85, 237, 113),
), ),
en=None, en=Button(
file='./assets/en/bounty/OCR_TICKET.png',
area=(225, 85, 267, 114),
search=(205, 65, 287, 134),
color=(197, 206, 213),
button=(225, 85, 267, 114),
),
) )
SELECT_DESERT_RAILROAD = ButtonWrapper( SELECT_DESERT_RAILROAD = ButtonWrapper(
name='SELECT_DESERT_RAILROAD', name='SELECT_DESERT_RAILROAD',
@@ -67,7 +97,13 @@ SELECT_DESERT_RAILROAD = ButtonWrapper(
color=(178, 188, 199), color=(178, 188, 199),
button=(1066, 271, 1224, 311), button=(1066, 271, 1224, 311),
), ),
en=None, en=Button(
file='./assets/en/bounty/SELECT_DESERT_RAILROAD.png',
area=(989, 270, 1223, 308),
search=(969, 250, 1243, 328),
color=(196, 203, 212),
button=(989, 270, 1223, 308),
),
) )
SELECT_HIGHWAY = ButtonWrapper( SELECT_HIGHWAY = ButtonWrapper(
name='SELECT_HIGHWAY', name='SELECT_HIGHWAY',
@@ -78,7 +114,13 @@ SELECT_HIGHWAY = ButtonWrapper(
color=(214, 221, 228), color=(214, 221, 228),
button=(1065, 165, 1223, 203), button=(1065, 165, 1223, 203),
), ),
en=None, en=Button(
file='./assets/en/bounty/SELECT_HIGHWAY.png',
area=(1073, 167, 1223, 202),
search=(1053, 147, 1243, 222),
color=(192, 201, 211),
button=(1073, 167, 1223, 202),
),
) )
SELECT_SCHOOLHOUSE = ButtonWrapper( SELECT_SCHOOLHOUSE = ButtonWrapper(
name='SELECT_SCHOOLHOUSE', name='SELECT_SCHOOLHOUSE',
@@ -89,5 +131,11 @@ SELECT_SCHOOLHOUSE = ButtonWrapper(
color=(173, 185, 198), color=(173, 185, 198),
button=(1154, 381, 1223, 417), button=(1154, 381, 1223, 417),
), ),
en=None, en=Button(
file='./assets/en/bounty/SELECT_SCHOOLHOUSE.png',
area=(1055, 378, 1226, 415),
search=(1035, 358, 1246, 435),
color=(198, 206, 215),
button=(1055, 378, 1226, 415),
),
) )
+13 -17
View File
@@ -5,19 +5,22 @@ from module.base.button import Button, ButtonWrapper
BOX_CAFE = ButtonWrapper( BOX_CAFE = ButtonWrapper(
name='BOX_CAFE', name='BOX_CAFE',
jp=Button( share=Button(
file='./assets/jp/cafe/BOX_CAFE.png', file='./assets/share/cafe/BOX_CAFE.png',
area=(33, 130, 1247, 569), area=(33, 130, 1247, 569),
search=(13, 110, 1267, 589), search=(13, 110, 1267, 589),
color=(175, 181, 186), color=(175, 181, 186),
button=(33, 130, 1247, 569), button=(33, 130, 1247, 569),
), ),
en=Button( )
file='./assets/en/cafe/BOX_CAFE.png', BOX_SEARCH = ButtonWrapper(
area=(33, 130, 1247, 569), name='BOX_SEARCH',
search=(13, 110, 1267, 589), share=Button(
color=(175, 181, 186), file='./assets/share/cafe/BOX_SEARCH.png',
button=(33, 130, 1247, 569), area=(12, 71, 1176, 654),
search=(0, 51, 1196, 674),
color=(175, 183, 190),
button=(12, 71, 1176, 654),
), ),
) )
CAFE_FIRST = ButtonWrapper( CAFE_FIRST = ButtonWrapper(
@@ -107,15 +110,8 @@ CHECK_REWARD = ButtonWrapper(
) )
CLICKABLE_TEMPLATE = ButtonWrapper( CLICKABLE_TEMPLATE = ButtonWrapper(
name='CLICKABLE_TEMPLATE', name='CLICKABLE_TEMPLATE',
jp=Button( share=Button(
file='./assets/jp/cafe/CLICKABLE_TEMPLATE.png', file='./assets/share/cafe/CLICKABLE_TEMPLATE.png',
area=(619, 332, 660, 387),
search=(599, 312, 680, 407),
color=(79, 65, 1),
button=(619, 332, 660, 387),
),
en=Button(
file='./assets/en/cafe/CLICKABLE_TEMPLATE.png',
area=(619, 332, 660, 387), area=(619, 332, 660, 387),
search=(599, 312, 680, 407), search=(599, 312, 680, 407),
color=(79, 65, 1), color=(79, 65, 1),
+20 -122
View File
@@ -1,18 +1,12 @@
import cv2
import numpy as np
from enum import Enum from enum import Enum
from module.logger import logger
from module.base.timer import Timer
from module.base.button import ClickButton
from module.base.decorator import Config from module.base.decorator import Config
from module.base.utils.utils import area_offset from module.base.timer import Timer
from module.ocr.ocr import Digit from module.logger import logger
from module.ui.switch import Switch from module.ui.switch import Switch
from tasks.base.page import page_cafe from tasks.base.page import page_cafe
from tasks.base.ui import UI
from tasks.cafe.assets.assets_cafe import * from tasks.cafe.assets.assets_cafe import *
from tasks.cafe.ui import CafeUI
SWITCH_CAFE = Switch('Cafe_switch') SWITCH_CAFE = Switch('Cafe_switch')
SWITCH_CAFE.add_state('off', CHANGE_CAFE_NOT_SELECTED) SWITCH_CAFE.add_state('off', CHANGE_CAFE_NOT_SELECTED)
@@ -33,103 +27,17 @@ class CafeStatus(Enum):
FINISHED = -1 FINISHED = -1
class Cafe(UI): class Cafe(CafeUI):
template = CLICKABLE_TEMPLATE @Config.when(Emulator_GameLanguage='jp')
def _is_second_cafe_on(self):
return self.config.Cafe_SecondCafe
@staticmethod @Config.when(Emulator_GameLanguage=None)
def merge_points(points, threshold=3): def _is_second_cafe_on(self):
if len(points) <= 1:
return points
result = []
for point in points:
if not result:
result.append(point)
continue
if point[0] - result[-1][0] < threshold and point[1] - result[-1][1] < threshold:
result[-1] = ((point[0] + result[-1][0]) // 2, (point[1] + result[-1][1]) // 2)
continue
result.append(point)
return result
@staticmethod
def _extract_clickable_from_image(image):
# convert to hsv for better color matching
hsv = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
# set color range
lower_hsv = np.array([18, 200, 220])
upper_hsv = np.array([30, 255, 255])
# get mask
mask = cv2.inRange(hsv, lower_hsv, upper_hsv)
# generate result
return cv2.bitwise_and(image, image, mask=mask)
def _match_clickable_points(self, image, threshold=0.8):
image = cv2.cvtColor(image, cv2.COLOR_RGB2GRAY)
template = cv2.cvtColor(self.template.matched_button.image, cv2.COLOR_RGB2GRAY)
res = cv2.matchTemplate(image, template, cv2.TM_CCOEFF_NORMED)
loc = np.where(res >= threshold)
return [point for point in zip(*loc[::-1])]
def _get_clickable_buttons(self, threshold=0.8, offset=(0, 0)):
image = self.device.image
h, w = image.shape[:2]
image = cv2.rectangle(image, (0, 10), (w - 25, h - 10), (0, 0, 0), 50)
image = self._extract_clickable_from_image(image)
points = self._match_clickable_points(image, threshold)
points = self.merge_points(points)
if not points:
return []
area = area_offset((0, 0, self.template.width, self.template.height), offset)
return [
ClickButton(
button=area_offset(area, offset=point),
name=self.template.name
)
for point in points
]
def _reset_cafe_position(self, direction: str):
width = BOX_CAFE.width
height = BOX_CAFE.height
r = np.random.uniform(0.6, 0.8)
vector_down = (width * r, height * r)
vector_up = (width * r, -height * r)
vector_left = (-width * r, 0)
vector_right = (width * r, 0)
random_r = (-5, -5, 5, 5)
match direction:
case 'init':
self.device.pinch()
self.device.swipe_vector(vector_down, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'left':
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'right':
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
# solve too much swipe causing restart
self.device.click_record_clear()
def _get_reward_num(self):
ocr = Digit(OCR_CAFE)
num = ocr.detect_and_ocr(self.device.image)
if len(num) != 1:
logger.warning(f'Invalid reward num: {num}')
num = float(num[0].ocr_text.rstrip('%'))
logger.attr('Reward', num)
return num
def _cafe_additional(self) -> bool:
if self.appear_then_click(INVENTORY):
return True
if self.appear_then_click(MOMOTALK_CLOSE):
return True
return False return False
is_second_cafe_on = property(_is_second_cafe_on)
def _handle_cafe(self, status): def _handle_cafe(self, status):
match status: match status:
case CafeStatus.STUDENT_LIST: case CafeStatus.STUDENT_LIST:
@@ -137,7 +45,7 @@ class Cafe(UI):
if not self.appear(STUDENT_LIST): if not self.appear(STUDENT_LIST):
return CafeStatus.OCR return CafeStatus.OCR
case CafeStatus.OCR: case CafeStatus.OCR:
reward = self._get_reward_num() reward = self.get_reward_num()
if reward == 0: if reward == 0:
return CafeStatus.GOT return CafeStatus.GOT
if self.appear_then_click(CHECK_REWARD): if self.appear_then_click(CHECK_REWARD):
@@ -157,14 +65,14 @@ class Cafe(UI):
if not self.appear(GET_REWARD_CLOSE): if not self.appear(GET_REWARD_CLOSE):
return CafeStatus.CLICK return CafeStatus.CLICK
case CafeStatus.CLICK: case CafeStatus.CLICK:
buttons = self._get_clickable_buttons(offset=(45, 10)) buttons = self.get_clickable_buttons(offset=(45, 10))
self.click = len(buttons) self.click = len(buttons)
logger.attr('Clickable', self.click) logger.attr('Clickable', self.click)
if not buttons: if not buttons:
return CafeStatus.CHECK return CafeStatus.CHECK
self.click_with_interval(buttons[0], interval=1) self.click_with_interval(buttons[0], interval=1)
case CafeStatus.CHECK: case CafeStatus.CHECK:
buttons = self._get_clickable_buttons() buttons = self.get_clickable_buttons()
if not self.is_adjust_on: if not self.is_adjust_on:
if not buttons: if not buttons:
return CafeStatus.FINISHED return CafeStatus.FINISHED
@@ -177,11 +85,11 @@ class Cafe(UI):
return CafeStatus.CLICK return CafeStatus.CLICK
match self.check: match self.check:
case 1: case 1:
self._reset_cafe_position('left') self.reset_cafe_position('left')
case 2: case 2:
self._reset_cafe_position('right') self.reset_cafe_position('right')
case 3: case 3:
self._reset_cafe_position('init') self.reset_cafe_position('init')
case 4: case 4:
return CafeStatus.FINISHED return CafeStatus.FINISHED
case CafeStatus.FINISHED: case CafeStatus.FINISHED:
@@ -190,16 +98,6 @@ class Cafe(UI):
logger.warning(f'Invalid status: {status}') logger.warning(f'Invalid status: {status}')
return status return status
@Config.when(Emulator_GameLanguage='jp')
def is_second_cafe_on(self):
return self.config.Cafe_SecondCafe
@Config.when(Emulator_GameLanguage=None)
def is_second_cafe_on(self):
return False
is_second_cafe_on = property(is_second_cafe_on)
def run(self): def run(self):
self.click = 0 self.click = 0
self.check = 0 self.check = 0
@@ -212,7 +110,7 @@ class Cafe(UI):
status = CafeStatus.STUDENT_LIST status = CafeStatus.STUDENT_LIST
loading_timer = Timer(2).start() loading_timer = Timer(2).start()
action_timer = Timer(1, count=1) # cant be too fast action_timer = Timer(1, count=1)
is_list = False is_list = False
is_reset = False is_reset = False
is_second = False is_second = False
@@ -224,7 +122,7 @@ class Cafe(UI):
self.device.screenshot() self.device.screenshot()
if self.ui_additional() or self._cafe_additional(): if self.ui_additional() or self.cafe_additional():
continue continue
if not loading_timer.reached(): if not loading_timer.reached():
@@ -246,7 +144,7 @@ class Cafe(UI):
continue continue
if is_touch_on and not is_reset and status == CafeStatus.CLICK: if is_touch_on and not is_reset and status == CafeStatus.CLICK:
self._reset_cafe_position('init') self.reset_cafe_position('init')
is_reset = True is_reset = True
continue continue
+72
View File
@@ -0,0 +1,72 @@
import cv2
import numpy as np
from module.logger import logger
from module.ocr.ocr import Digit
from tasks.base.ui import UI
from tasks.cafe.assets.assets_cafe import *
class CafeUI(UI):
template = CLICKABLE_TEMPLATE
def get_reward_num(self):
ocr = Digit(OCR_CAFE)
num = ocr.detect_and_ocr(self.device.image)
if len(num) != 1:
logger.warning(f'Invalid reward num: {num}')
num = float(num[0].ocr_text.rstrip('%'))
logger.attr('Reward', num)
return num
@staticmethod
def extract_clickable_from_image(image):
# convert to hsv for better color matching
hsv = cv2.cvtColor(image, cv2.COLOR_RGB2HSV)
# set color range
lower_hsv = np.array([18, 200, 220])
upper_hsv = np.array([30, 255, 255])
# get mask
mask = cv2.inRange(hsv, lower_hsv, upper_hsv)
# generate result
return cv2.bitwise_and(image, image, mask=mask)
def get_clickable_buttons(self, similarity=0.8, offset=(45, 10)):
image = self.extract_clickable_from_image(self.device.image)
self.template.matched_button._button_offset = offset
self.template.load_offset(self.template)
self.template.load_search(BOX_SEARCH.area)
points = self.template.match_multi_template(image, similarity)
return points
def reset_cafe_position(self, direction: str):
width = BOX_CAFE.width
height = BOX_CAFE.height
r = np.random.uniform(0.6, 0.8)
vector_down = (width * r, height * r)
vector_up = (width * r, -height * r)
vector_left = (-width * r, 0)
vector_right = (width * r, 0)
random_r = (-5, -5, 5, 5)
match direction:
case 'init':
self.device.pinch()
self.device.swipe_vector(vector_down, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_up, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'left':
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_left, box=BOX_CAFE.area, random_range=random_r, padding=5)
case 'right':
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
self.device.swipe_vector(vector_right, box=BOX_CAFE.area, random_range=random_r, padding=5)
# solve too much swipe causing restart
self.device.click_record_clear()
def cafe_additional(self) -> bool:
if self.appear_then_click(INVENTORY):
return True
if self.appear_then_click(MOMOTALK_CLOSE):
return True
return False
+56 -8
View File
@@ -12,7 +12,13 @@ CHECK_GEHENNA = ButtonWrapper(
color=(201, 205, 206), color=(201, 205, 206),
button=(109, 149, 195, 177), button=(109, 149, 195, 177),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/CHECK_GEHENNA.png',
area=(103, 145, 252, 182),
search=(83, 125, 272, 202),
color=(202, 206, 208),
button=(103, 145, 252, 182),
),
) )
CHECK_MILLENNIUM = ButtonWrapper( CHECK_MILLENNIUM = ButtonWrapper(
name='CHECK_MILLENNIUM', name='CHECK_MILLENNIUM',
@@ -23,7 +29,13 @@ CHECK_MILLENNIUM = ButtonWrapper(
color=(202, 206, 208), color=(202, 206, 208),
button=(108, 148, 254, 178), button=(108, 148, 254, 178),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/CHECK_MILLENNIUM.png',
area=(104, 145, 283, 182),
search=(84, 125, 303, 202),
color=(199, 202, 204),
button=(104, 145, 283, 182),
),
) )
CHECK_SCRIMMAGE = ButtonWrapper( CHECK_SCRIMMAGE = ButtonWrapper(
name='CHECK_SCRIMMAGE', name='CHECK_SCRIMMAGE',
@@ -34,7 +46,13 @@ CHECK_SCRIMMAGE = ButtonWrapper(
color=(96, 119, 144), color=(96, 119, 144),
button=(651, 90, 889, 130), button=(651, 90, 889, 130),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/CHECK_SCRIMMAGE.png',
area=(651, 88, 891, 130),
search=(631, 68, 911, 150),
color=(92, 116, 141),
button=(651, 88, 891, 130),
),
) )
CHECK_TRINITY = ButtonWrapper( CHECK_TRINITY = ButtonWrapper(
name='CHECK_TRINITY', name='CHECK_TRINITY',
@@ -45,7 +63,13 @@ CHECK_TRINITY = ButtonWrapper(
color=(204, 208, 210), color=(204, 208, 210),
button=(115, 148, 250, 178), button=(115, 148, 250, 178),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/CHECK_TRINITY.png',
area=(100, 143, 219, 187),
search=(80, 123, 239, 207),
color=(212, 216, 217),
button=(100, 143, 219, 187),
),
) )
OCR_TICKET = ButtonWrapper( OCR_TICKET = ButtonWrapper(
name='OCR_TICKET', name='OCR_TICKET',
@@ -56,7 +80,13 @@ OCR_TICKET = ButtonWrapper(
color=(206, 211, 215), color=(206, 211, 215),
button=(195, 85, 235, 113), button=(195, 85, 235, 113),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/OCR_TICKET.png',
area=(227, 84, 265, 115),
search=(207, 64, 285, 135),
color=(207, 212, 216),
button=(227, 84, 265, 115),
),
) )
SELECT_GEHENNA = ButtonWrapper( SELECT_GEHENNA = ButtonWrapper(
name='SELECT_GEHENNA', name='SELECT_GEHENNA',
@@ -67,7 +97,13 @@ SELECT_GEHENNA = ButtonWrapper(
color=(207, 217, 225), color=(207, 217, 225),
button=(1125, 275, 1224, 310), button=(1125, 275, 1224, 310),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/SELECT_GEHENNA.png',
area=(1076, 273, 1223, 313),
search=(1056, 253, 1243, 333),
color=(199, 208, 216),
button=(1076, 273, 1223, 313),
),
) )
SELECT_MILLENNIUM = ButtonWrapper( SELECT_MILLENNIUM = ButtonWrapper(
name='SELECT_MILLENNIUM', name='SELECT_MILLENNIUM',
@@ -78,7 +114,13 @@ SELECT_MILLENNIUM = ButtonWrapper(
color=(206, 214, 222), color=(206, 214, 222),
button=(1069, 381, 1217, 417), button=(1069, 381, 1217, 417),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/SELECT_MILLENNIUM.png',
area=(1045, 380, 1224, 417),
search=(1025, 360, 1244, 437),
color=(193, 202, 211),
button=(1045, 380, 1224, 417),
),
) )
SELECT_TRINITY = ButtonWrapper( SELECT_TRINITY = ButtonWrapper(
name='SELECT_TRINITY', name='SELECT_TRINITY',
@@ -89,5 +131,11 @@ SELECT_TRINITY = ButtonWrapper(
color=(213, 221, 228), color=(213, 221, 228),
button=(1074, 165, 1221, 204), button=(1074, 165, 1221, 204),
), ),
en=None, en=Button(
file='./assets/en/scrimmage/SELECT_TRINITY.png',
area=(1118, 164, 1224, 205),
search=(1098, 144, 1244, 225),
color=(200, 209, 218),
button=(1118, 164, 1224, 205),
),
) )
+4 -4
View File
@@ -21,12 +21,12 @@ class ScrimmageStatus(Enum):
class Scrimmage(ScrimmageUI): class Scrimmage(ScrimmageUI):
@property @property
def scrimmage_info(self): def scrimmage_info(self):
bounty = (SELECT_TRINITY, SELECT_GEHENNA, SELECT_MILLENNIUM) scrimmage = (SELECT_TRINITY, SELECT_GEHENNA, SELECT_MILLENNIUM)
check = (CHECK_TRINITY, CHECK_GEHENNA, CHECK_MILLENNIUM) check = (CHECK_TRINITY, CHECK_GEHENNA, CHECK_MILLENNIUM)
stage = (self.config.Trinity_Stage, self.config.Gehenna_Stage, self.config.Millennium_Stage) stage = (self.config.Trinity_Stage, self.config.Gehenna_Stage, self.config.Millennium_Stage)
count = (self.config.Trinity_Count, self.config.Gehenna_Count, self.config.Millennium_Count) count = (self.config.Trinity_Count, self.config.Gehenna_Count, self.config.Millennium_Count)
ap = (10 if stage == 1 else 15 for stage in stage) ap = (10 if stage == 1 else 15 for stage in stage)
info = zip(bounty, check, stage, count, ap) info = zip(scrimmage, check, stage, count, ap)
return filter(lambda x: x[3] > 0, info) return filter(lambda x: x[3] > 0, info)
@property @property
@@ -38,7 +38,7 @@ class Scrimmage(ScrimmageUI):
return task return task
def error_handler(self): def error_handler(self):
action = self.config.Bounty_OnError action = self.config.Scrimmage_OnError
if action == 'stop': if action == 'stop':
raise RequestHumanTakeover raise RequestHumanTakeover
elif action == 'skip': elif action == 'skip':
@@ -67,7 +67,7 @@ class Scrimmage(ScrimmageUI):
@property @property
def current_task_ap(self): def current_task_ap(self):
return self.task[0][4] return self.task[0][4] * self.current_count
@property @property
def current_ticket(self): def current_ticket(self):
+35 -5
View File
@@ -12,7 +12,13 @@ OCR_INDEX = ButtonWrapper(
color=(195, 196, 193), color=(195, 196, 193),
button=(701, 149, 740, 656), button=(701, 149, 740, 656),
), ),
en=None, en=Button(
file='./assets/en/stage/list/OCR_INDEX.png',
area=(701, 149, 740, 656),
search=(681, 129, 760, 676),
color=(195, 196, 193),
button=(701, 149, 740, 656),
),
) )
STAGE_ENTER = ButtonWrapper( STAGE_ENTER = ButtonWrapper(
name='STAGE_ENTER', name='STAGE_ENTER',
@@ -23,7 +29,13 @@ STAGE_ENTER = ButtonWrapper(
color=(106, 171, 200), color=(106, 171, 200),
button=(1093, 173, 1142, 199), button=(1093, 173, 1142, 199),
), ),
en=None, en=Button(
file='./assets/en/stage/list/STAGE_ENTER.png',
area=(1080, 168, 1156, 204),
search=(1060, 148, 1176, 224),
color=(118, 195, 226),
button=(1080, 168, 1156, 204),
),
) )
STAGE_ITEM = ButtonWrapper( STAGE_ITEM = ButtonWrapper(
name='STAGE_ITEM', name='STAGE_ITEM',
@@ -34,7 +46,13 @@ STAGE_ITEM = ButtonWrapper(
color=(212, 228, 233), color=(212, 228, 233),
button=(687, 148, 1181, 227), button=(687, 148, 1181, 227),
), ),
en=None, en=Button(
file='./assets/en/stage/list/STAGE_ITEM.png',
area=(687, 148, 1181, 227),
search=(667, 128, 1201, 247),
color=(212, 228, 233),
button=(687, 148, 1181, 227),
),
) )
STAGE_LIST = ButtonWrapper( STAGE_LIST = ButtonWrapper(
name='STAGE_LIST', name='STAGE_LIST',
@@ -45,7 +63,13 @@ STAGE_LIST = ButtonWrapper(
color=(194, 204, 209), color=(194, 204, 209),
button=(675, 136, 1190, 676), button=(675, 136, 1190, 676),
), ),
en=None, en=Button(
file='./assets/en/stage/list/STAGE_LIST.png',
area=(675, 136, 1190, 676),
search=(655, 116, 1210, 696),
color=(194, 204, 209),
button=(675, 136, 1190, 676),
),
) )
STAGE_STARS = ButtonWrapper( STAGE_STARS = ButtonWrapper(
name='STAGE_STARS', name='STAGE_STARS',
@@ -56,5 +80,11 @@ STAGE_STARS = ButtonWrapper(
color=(225, 214, 166), color=(225, 214, 166),
button=(693, 192, 746, 212), button=(693, 192, 746, 212),
), ),
en=None, en=Button(
file='./assets/en/stage/list/STAGE_STARS.png',
area=(693, 192, 746, 212),
search=(673, 172, 766, 232),
color=(225, 214, 166),
button=(693, 192, 746, 212),
),
) )
+91 -13
View File
@@ -12,7 +12,13 @@ CHECK_SWEEP = ButtonWrapper(
color=(174, 184, 197), color=(174, 184, 197),
button=(638, 188, 722, 212), button=(638, 188, 722, 212),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/CHECK_SWEEP.png',
area=(654, 187, 706, 215),
search=(634, 167, 726, 235),
color=(169, 180, 194),
button=(654, 187, 706, 215),
),
) )
ENTER = ButtonWrapper( ENTER = ButtonWrapper(
name='ENTER', name='ENTER',
@@ -23,7 +29,13 @@ ENTER = ButtonWrapper(
color=(223, 207, 68), color=(223, 207, 68),
button=(791, 514, 1080, 568), button=(791, 514, 1080, 568),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/ENTER.png',
area=(781, 508, 1085, 572),
search=(761, 488, 1105, 592),
color=(226, 211, 69),
button=(781, 508, 1085, 572),
),
) )
EXIT = ButtonWrapper( EXIT = ButtonWrapper(
name='EXIT', name='EXIT',
@@ -34,7 +46,13 @@ EXIT = ButtonWrapper(
color=(185, 193, 203), color=(185, 193, 203),
button=(1114, 127, 1141, 154), button=(1114, 127, 1141, 154),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/EXIT.png',
area=(1114, 127, 1141, 154),
search=(1094, 107, 1161, 174),
color=(185, 193, 203),
button=(1114, 127, 1141, 154),
),
) )
MAX = ButtonWrapper( MAX = ButtonWrapper(
name='MAX', name='MAX',
@@ -45,7 +63,13 @@ MAX = ButtonWrapper(
color=(216, 222, 228), color=(216, 222, 228),
button=(1054, 279, 1111, 321), button=(1054, 279, 1111, 321),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/MAX.png',
area=(1054, 279, 1111, 321),
search=(1034, 259, 1131, 341),
color=(216, 222, 228),
button=(1054, 279, 1111, 321),
),
) )
MIN = ButtonWrapper( MIN = ButtonWrapper(
name='MIN', name='MIN',
@@ -56,7 +80,13 @@ MIN = ButtonWrapper(
color=(194, 194, 194), color=(194, 194, 194),
button=(760, 278, 816, 322), button=(760, 278, 816, 322),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/MIN.png',
area=(760, 278, 816, 322),
search=(740, 258, 836, 342),
color=(194, 194, 194),
button=(760, 278, 816, 322),
),
) )
MINUS = ButtonWrapper( MINUS = ButtonWrapper(
name='MINUS', name='MINUS',
@@ -67,7 +97,13 @@ MINUS = ButtonWrapper(
color=(221, 222, 222), color=(221, 222, 222),
button=(838, 279, 876, 320), button=(838, 279, 876, 320),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/MINUS.png',
area=(838, 279, 876, 320),
search=(818, 259, 896, 340),
color=(221, 222, 222),
button=(838, 279, 876, 320),
),
) )
OCR_NUM = ButtonWrapper( OCR_NUM = ButtonWrapper(
name='OCR_NUM', name='OCR_NUM',
@@ -78,7 +114,13 @@ OCR_NUM = ButtonWrapper(
color=(81, 94, 113), color=(81, 94, 113),
button=(896, 281, 975, 323), button=(896, 281, 975, 323),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/OCR_NUM.png',
area=(896, 281, 975, 323),
search=(876, 261, 995, 343),
color=(81, 94, 113),
button=(896, 281, 975, 323),
),
) )
PLUS = ButtonWrapper( PLUS = ButtonWrapper(
name='PLUS', name='PLUS',
@@ -89,7 +131,13 @@ PLUS = ButtonWrapper(
color=(233, 243, 246), color=(233, 243, 246),
button=(995, 278, 1034, 322), button=(995, 278, 1034, 322),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/PLUS.png',
area=(995, 278, 1034, 322),
search=(975, 258, 1054, 342),
color=(233, 243, 246),
button=(995, 278, 1034, 322),
),
) )
SKIP_OK_LOWER = ButtonWrapper( SKIP_OK_LOWER = ButtonWrapper(
name='SKIP_OK_LOWER', name='SKIP_OK_LOWER',
@@ -100,7 +148,13 @@ SKIP_OK_LOWER = ButtonWrapper(
color=(112, 212, 247), color=(112, 212, 247),
button=(541, 551, 740, 616), button=(541, 551, 740, 616),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/SKIP_OK_LOWER.png',
area=(540, 548, 741, 619),
search=(520, 528, 761, 639),
color=(108, 204, 240),
button=(540, 548, 741, 619),
),
) )
SKIP_OK_UPPER = ButtonWrapper( SKIP_OK_UPPER = ButtonWrapper(
name='SKIP_OK_UPPER', name='SKIP_OK_UPPER',
@@ -111,7 +165,13 @@ SKIP_OK_UPPER = ButtonWrapper(
color=(112, 212, 248), color=(112, 212, 248),
button=(542, 474, 738, 545), button=(542, 474, 738, 545),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/SKIP_OK_UPPER.png',
area=(541, 476, 741, 542),
search=(521, 456, 761, 562),
color=(107, 203, 239),
button=(541, 476, 741, 542),
),
) )
SKIP_SKIP = ButtonWrapper( SKIP_SKIP = ButtonWrapper(
name='SKIP_SKIP', name='SKIP_SKIP',
@@ -122,7 +182,13 @@ SKIP_SKIP = ButtonWrapper(
color=(110, 207, 243), color=(110, 207, 243),
button=(545, 475, 736, 540), button=(545, 475, 736, 540),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/SKIP_SKIP.png',
area=(543, 477, 739, 542),
search=(523, 457, 759, 562),
color=(110, 209, 244),
button=(543, 477, 739, 542),
),
) )
SWEEP = ButtonWrapper( SWEEP = ButtonWrapper(
name='SWEEP', name='SWEEP',
@@ -133,7 +199,13 @@ SWEEP = ButtonWrapper(
color=(109, 202, 235), color=(109, 202, 235),
button=(796, 385, 1067, 427), button=(796, 385, 1067, 427),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/SWEEP.png',
area=(795, 382, 1066, 431),
search=(775, 362, 1086, 451),
color=(108, 202, 236),
button=(795, 382, 1066, 431),
),
) )
SWEEP_CONFIRM = ButtonWrapper( SWEEP_CONFIRM = ButtonWrapper(
name='SWEEP_CONFIRM', name='SWEEP_CONFIRM',
@@ -144,5 +216,11 @@ SWEEP_CONFIRM = ButtonWrapper(
color=(143, 156, 170), color=(143, 156, 170),
button=(664, 470, 871, 534), button=(664, 470, 871, 534),
), ),
en=None, en=Button(
file='./assets/en/stage/sweep/SWEEP_CONFIRM.png',
area=(587, 143, 695, 182),
search=(567, 123, 715, 202),
color=(196, 203, 211),
button=(665, 471, 871, 535),
),
) )

Some files were not shown because too many files have changed in this diff Show More