Skip to content

Commit a49e149

Browse files
authored
Merge pull request #3389 from LmeSzinc/dev
Bug fix
2 parents a37a0cb + 94348e7 commit a49e149

10 files changed

Lines changed: 58 additions & 47 deletions

File tree

assets/en/ui/ACADEMY_CHECK.png

-1.34 KB
Loading

deploy/AidLux/0.92/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ av==10.0.0
55
cnocr==1.2.2
66
imageio==2.27.0
77
inflection
8-
jellyfish
8+
jellyfish==0.11.2
99
lz4
1010
mxnet==1.6.0
1111
numpy

deploy/docker/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ av==10.0.0
55
cnocr==1.2.2
66
imageio==2.27.0
77
inflection
8-
jellyfish
8+
jellyfish==0.11.2
99
lz4
1010
mxnet==1.6.0
1111
numpy==1.16.6

deploy/docker/requirements_generator.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def docker_requirements_generate(requirements_in='requirements-in.txt'):
3636
requirements = read_file(requirements_in)
3737

3838
logger.info(f'Generate requirements for Docker image')
39-
39+
lock = {}
4040
new = {}
4141
logger.info(requirements)
4242
for name, version in requirements.items():
@@ -46,8 +46,9 @@ def docker_requirements_generate(requirements_in='requirements-in.txt'):
4646
if name == 'opencv-python':
4747
name = 'opencv-python-headless'
4848
version = None
49-
# if name == 'numpy':
50-
# version = None
49+
if name in lock:
50+
version = lock[name] if not isinstance(lock[name], dict) else lock[name]['version']
51+
name = name if not isinstance(lock[name], dict) else lock[name]['name']
5152
new[name] = version
5253

5354
write_file(os.path.join(BASE_FOLDER, f'./requirements.txt'), data=new)

deploy/headless/requirements_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def headless_requirements_generate(requirements_in='requirements-in.txt'):
3939
lock = {
4040
'aiofiles': '23.1.0',
4141
'inflection': '0.5.1',
42-
'jellyfish': '0.11.2',
4342
'lz4': '4.3.2',
4443
'numpy': '1.17.4',
4544
'onepush': '1.2.0',
@@ -55,6 +54,7 @@ def headless_requirements_generate(requirements_in='requirements-in.txt'):
5554
'wrapt': '1.15.0'
5655
}
5756
new = {}
57+
logger.info(requirements)
5858
for name, version in requirements.items():
5959
if name == 'alas-webapp':
6060
continue

module/config/config.py

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -123,33 +123,42 @@ def load(self):
123123
for path, value in self.modified.items():
124124
deep_set(self.data, keys=path, value=value)
125125

126-
def bind(self, func, func_set=None):
126+
def bind(self, func, func_list=None):
127127
"""
128128
Args:
129129
func (str, Function): Function to run
130-
func_set (set): Set of tasks to be bound
130+
func_list (list[str]): List of tasks to be bound
131131
"""
132-
if func_set is None:
133-
func_set = {"General", "Alas"}
134132
if isinstance(func, Function):
135133
func = func.command
136-
func_set.add(func)
134+
# func_list: ["General", "Alas", <task_general>, <task>, *func_list]
135+
if func_list is None:
136+
func_list = []
137+
if func not in func_list:
138+
func_list.insert(0, func)
137139
if func.startswith("Opsi"):
138-
func_set.add("OpsiGeneral")
140+
if "OpsiGeneral" not in func_list:
141+
func_list.insert(0, "OpsiGeneral")
139142
if (
140143
func.startswith("Event")
141144
or func.startswith("Raid")
142145
or func.startswith("Coalition")
143146
or func in ["MaritimeEscort", "GemsFarming"]
144147
):
145-
func_set.add("EventGeneral")
146-
func_set.add("TaskBalancer")
147-
logger.info(f"Bind task {func_set}")
148+
if "EventGeneral" not in func_list:
149+
func_list.insert(0, "EventGeneral")
150+
if "TaskBalancer" not in func_list:
151+
func_list.insert(0, "TaskBalancer")
152+
if "Alas" not in func_list:
153+
func_list.insert(0, "Alas")
154+
if "General" not in func_list:
155+
func_list.insert(0, "General")
156+
logger.info(f"Bind task {func_list}")
148157

149158
# Bind arguments
150159
visited = set()
151160
self.bound.clear()
152-
for func in func_set:
161+
for func in func_list:
153162
func_data = self.data.get(func, {})
154163
for group, group_data in func_data.items():
155164
for arg, value in group_data.items():

module/config/config_updater.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -547,33 +547,33 @@ class ConfigUpdater:
547547
# ('SupplyPack.SupplyPack.WeeklyFreeSupplyPack', 'Freebies.SupplyPack.Collect'),
548548
# ('Commission.Commission.CommissionFilter', 'Commission.Commission.CustomFilter'),
549549
# 2023.02.17
550-
('OpsiAshBeacon.OpsiDossierBeacon.Enable', 'OpsiAshBeacon.OpsiAshBeacon.AttackMode', dossier_redirect),
551-
('General.Retirement.EnhanceFavourite', 'General.Enhance.ShipToEnhance', enhance_favourite_redirect),
552-
('General.Retirement.EnhanceFilter', 'General.Enhance.Filter'),
553-
('General.Retirement.EnhanceCheckPerCategory', 'General.Enhance.CheckPerCategory', enhance_check_redirect),
554-
('General.Retirement.OldRetireN', 'General.OldRetire.N'),
555-
('General.Retirement.OldRetireR', 'General.OldRetire.R'),
556-
('General.Retirement.OldRetireSR', 'General.OldRetire.SR'),
557-
('General.Retirement.OldRetireSSR', 'General.OldRetire.SSR'),
558-
(('GemsFarming.GemsFarming.FlagshipChange', 'GemsFarming.GemsFarming.FlagshipEquipChange'),
559-
'GemsFarming.GemsFarming.ChangeFlagship',
560-
change_ship_redirect),
561-
(('GemsFarming.GemsFarming.VanguardChange', 'GemsFarming.GemsFarming.VanguardEquipChange'),
562-
'GemsFarming.GemsFarming.ChangeVanguard',
563-
change_ship_redirect),
564-
('Alas.DropRecord.API', 'Alas.DropRecord.API', api_redirect2)
565-
]
566-
redirection += [
567-
(
568-
(f'{task}.Emotion.CalculateEmotion', f'{task}.Emotion.IgnoreLowEmotionWarn'),
569-
f'{task}.Emotion.Mode',
570-
emotion_mode_redirect
571-
) for task in [
572-
'Main', 'Main2', 'Main3', 'GemsFarming',
573-
'Event', 'Event2', 'EventA', 'EventB', 'EventC', 'EventD', 'EventSp', 'Raid', 'RaidDaily',
574-
'Sos', 'WarArchives',
575-
]
550+
# ('OpsiAshBeacon.OpsiDossierBeacon.Enable', 'OpsiAshBeacon.OpsiAshBeacon.AttackMode', dossier_redirect),
551+
# ('General.Retirement.EnhanceFavourite', 'General.Enhance.ShipToEnhance', enhance_favourite_redirect),
552+
# ('General.Retirement.EnhanceFilter', 'General.Enhance.Filter'),
553+
# ('General.Retirement.EnhanceCheckPerCategory', 'General.Enhance.CheckPerCategory', enhance_check_redirect),
554+
# ('General.Retirement.OldRetireN', 'General.OldRetire.N'),
555+
# ('General.Retirement.OldRetireR', 'General.OldRetire.R'),
556+
# ('General.Retirement.OldRetireSR', 'General.OldRetire.SR'),
557+
# ('General.Retirement.OldRetireSSR', 'General.OldRetire.SSR'),
558+
# (('GemsFarming.GemsFarming.FlagshipChange', 'GemsFarming.GemsFarming.FlagshipEquipChange'),
559+
# 'GemsFarming.GemsFarming.ChangeFlagship',
560+
# change_ship_redirect),
561+
# (('GemsFarming.GemsFarming.VanguardChange', 'GemsFarming.GemsFarming.VanguardEquipChange'),
562+
# 'GemsFarming.GemsFarming.ChangeVanguard',
563+
# change_ship_redirect),
564+
# ('Alas.DropRecord.API', 'Alas.DropRecord.API', api_redirect2)
576565
]
566+
# redirection += [
567+
# (
568+
# (f'{task}.Emotion.CalculateEmotion', f'{task}.Emotion.IgnoreLowEmotionWarn'),
569+
# f'{task}.Emotion.Mode',
570+
# emotion_mode_redirect
571+
# ) for task in [
572+
# 'Main', 'Main2', 'Main3', 'GemsFarming',
573+
# 'Event', 'Event2', 'EventA', 'EventB', 'EventC', 'EventD', 'EventSp', 'Raid', 'RaidDaily',
574+
# 'Sos', 'WarArchives',
575+
# ]
576+
# ]
577577

578578
@cached_property
579579
def args(self):

module/ui/assets.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# This file was automatically generated by dev_tools/button_extract.py.
55
# Don't modify it manually.
66

7-
ACADEMY_CHECK = Button(area={'cn': (121, 14, 175, 39), 'en': (117, 14, 180, 35), 'jp': (121, 14, 174, 40), 'tw': (119, 12, 178, 44)}, color={'cn': (147, 163, 200), 'en': (112, 128, 169), 'jp': (159, 174, 208), 'tw': (125, 139, 176)}, button={'cn': (121, 14, 175, 39), 'en': (117, 14, 180, 35), 'jp': (121, 14, 174, 40), 'tw': (119, 12, 178, 44)}, file={'cn': './assets/cn/ui/ACADEMY_CHECK.png', 'en': './assets/en/ui/ACADEMY_CHECK.png', 'jp': './assets/jp/ui/ACADEMY_CHECK.png', 'tw': './assets/tw/ui/ACADEMY_CHECK.png'})
7+
ACADEMY_CHECK = Button(area={'cn': (121, 14, 175, 39), 'en': (122, 19, 260, 35), 'jp': (121, 14, 174, 40), 'tw': (119, 12, 178, 44)}, color={'cn': (147, 163, 200), 'en': (133, 150, 191), 'jp': (159, 174, 208), 'tw': (125, 139, 176)}, button={'cn': (121, 14, 175, 39), 'en': (122, 19, 260, 35), 'jp': (121, 14, 174, 40), 'tw': (119, 12, 178, 44)}, file={'cn': './assets/cn/ui/ACADEMY_CHECK.png', 'en': './assets/en/ui/ACADEMY_CHECK.png', 'jp': './assets/jp/ui/ACADEMY_CHECK.png', 'tw': './assets/tw/ui/ACADEMY_CHECK.png'})
88
ACADEMY_GOTO_GAME_ROOM = Button(area={'cn': (1074, 340, 1103, 374), 'en': (1074, 340, 1103, 374), 'jp': (1074, 340, 1103, 374), 'tw': (1074, 340, 1103, 374)}, color={'cn': (208, 185, 150), 'en': (208, 185, 150), 'jp': (208, 185, 150), 'tw': (208, 185, 150)}, button={'cn': (1074, 340, 1103, 374), 'en': (1074, 340, 1103, 374), 'jp': (1074, 340, 1103, 374), 'tw': (1074, 340, 1103, 374)}, file={'cn': './assets/cn/ui/ACADEMY_GOTO_GAME_ROOM.png', 'en': './assets/en/ui/ACADEMY_GOTO_GAME_ROOM.png', 'jp': './assets/jp/ui/ACADEMY_GOTO_GAME_ROOM.png', 'tw': './assets/tw/ui/ACADEMY_GOTO_GAME_ROOM.png'})
99
ACADEMY_GOTO_MUNITIONS = Button(area={'cn': (1046, 188, 1137, 210), 'en': (1039, 185, 1145, 209), 'jp': (1057, 188, 1126, 210), 'tw': (1044, 184, 1139, 213)}, color={'cn': (133, 135, 165), 'en': (115, 120, 153), 'jp': (129, 133, 162), 'tw': (113, 119, 149)}, button={'cn': (1046, 188, 1137, 210), 'en': (1039, 185, 1145, 209), 'jp': (1057, 188, 1126, 210), 'tw': (1044, 184, 1139, 213)}, file={'cn': './assets/cn/ui/ACADEMY_GOTO_MUNITIONS.png', 'en': './assets/en/ui/ACADEMY_GOTO_MUNITIONS.png', 'jp': './assets/jp/ui/ACADEMY_GOTO_MUNITIONS.png', 'tw': './assets/tw/ui/ACADEMY_GOTO_MUNITIONS.png'})
1010
BACK_ARROW = Button(area={'cn': (33, 44, 47, 64), 'en': (33, 44, 47, 64), 'jp': (33, 44, 47, 64), 'tw': (33, 44, 47, 64)}, color={'cn': (112, 118, 152), 'en': (112, 118, 152), 'jp': (112, 118, 152), 'tw': (112, 118, 152)}, button={'cn': (33, 31, 81, 78), 'en': (33, 31, 81, 78), 'jp': (33, 31, 81, 78), 'tw': (33, 31, 81, 78)}, file={'cn': './assets/cn/ui/BACK_ARROW.png', 'en': './assets/en/ui/BACK_ARROW.png', 'jp': './assets/jp/ui/BACK_ARROW.png', 'tw': './assets/tw/ui/BACK_ARROW.png'})

requirements-in.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ av==10.0.0
66
cnocr==1.2.2
77
imageio==2.27.0
88
inflection
9-
jellyfish
9+
jellyfish==0.11.2
1010
lz4
1111
mxnet==1.6.0
1212
numpy==1.16.6

requirements.txt

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#
2-
# This file is autogenerated by pip-compile with python 3.7
3-
# To update, run:
2+
# This file is autogenerated by pip-compile with Python 3.7
3+
# by the following command:
44
#
55
# pip-compile --annotation-style=line --output-file=requirements.txt requirements-in.txt
66
#
7+
78
adbutils==0.11.0 # via -r requirements-in.txt, uiautomator2
89
aiofiles==0.7.0 # via -r requirements-in.txt
910
alas-webapp==0.3.7 # via -r requirements-in.txt
@@ -37,7 +38,7 @@ idna==2.6 # via requests
3738
imageio==2.27.0 # via -r requirements-in.txt
3839
importlib-metadata==4.8.1 # via click, prettytable
3940
inflection==0.5.1 # via -r requirements-in.txt
40-
jellyfish==0.8.8 # via -r requirements-in.txt
41+
jellyfish==0.11.2 # via -r requirements-in.txt
4142
kiwisolver==1.3.2 # via matplotlib
4243
logzero==1.7.0 # via uiautomator2
4344
lxml==4.6.3 # via uiautomator2

0 commit comments

Comments
 (0)