mirror of
https://github.com/LmeSzinc/StarRailCopilot.git
synced 2024-11-26 18:20:42 +00:00
Fix: dev_tools import error
- Use `python -m dev_tools.button_extract` to run
This commit is contained in:
parent
83674b7a37
commit
56992b1d7f
@ -3,8 +3,6 @@ import os
|
||||
import numpy as np
|
||||
from PIL import Image
|
||||
|
||||
os.chdir('../')
|
||||
|
||||
from module.base.button import get_color
|
||||
from module.config.config import AzurLaneConfig
|
||||
from module.logger import logger
|
||||
@ -179,5 +177,5 @@ class AssetExtractor:
|
||||
me = ModuleExtractor(name=module, config=config)
|
||||
me.write()
|
||||
|
||||
|
||||
ae = AssetExtractor(AzurLaneConfig())
|
||||
if __name__ == '__main__':
|
||||
ae = AssetExtractor(AzurLaneConfig('template'))
|
||||
|
@ -1,6 +1,9 @@
|
||||
import time
|
||||
|
||||
import numpy as np
|
||||
import module.config.server as server
|
||||
|
||||
server.server = 'cn' # Don't need to edit, it's used to avoid error.
|
||||
|
||||
from module.config.config import AzurLaneConfig
|
||||
from module.device.device import Device
|
||||
@ -33,5 +36,5 @@ class Config:
|
||||
USE_ADB_SCREENSHOT = False
|
||||
|
||||
|
||||
az = EmulatorChecker(AzurLaneConfig().merge(Config()))
|
||||
az = EmulatorChecker(AzurLaneConfig('template').merge(Config()))
|
||||
az.stress_test()
|
||||
|
@ -78,6 +78,10 @@ BATTLE_PREPARATION = Button(area=(1043, 607, 1241, 667), color=(234, 179, 97), b
|
||||
|
||||
button_extract.py会自动提取按钮的属性, 免去了人工输入的烦恼
|
||||
|
||||
```
|
||||
python -m dev_tools.button_extract
|
||||
```
|
||||
|
||||
8. **使用按钮**
|
||||
|
||||
继承 module.base.base 下的 ModuleBase 类, 可以调用以下方法:
|
||||
|
Loading…
Reference in New Issue
Block a user