Merge branch 'master' into dev

This commit is contained in:
LmeSzinc 2023-11-24 02:53:29 +08:00
commit fb80418348
9 changed files with 62 additions and 6 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 KiB

View File

@ -356,7 +356,8 @@ class KeywordExtract:
'Herta': ['观景车厢', '主控舱段', '基座舱段', '收容舱段', '支援舱段'], 'Herta': ['观景车厢', '主控舱段', '基座舱段', '收容舱段', '支援舱段'],
'Jarilo': ['行政区', '城郊雪原', '边缘通路', '铁卫禁区', '残响回廊', '永冬岭', 'Jarilo': ['行政区', '城郊雪原', '边缘通路', '铁卫禁区', '残响回廊', '永冬岭',
'造物之柱', '旧武器试验场', '磐岩镇', '大矿区', '铆钉镇', '机械聚落'], '造物之柱', '旧武器试验场', '磐岩镇', '大矿区', '铆钉镇', '机械聚落'],
'Luofu': ['星槎海中枢', '流云渡', '迴星港', '长乐天', '金人巷', '太卜司', '工造司', '丹鼎司', '鳞渊境'], 'Luofu': ['星槎海中枢', '流云渡', '迴星港', '长乐天', '金人巷', '太卜司',
'工造司', '绥园', '丹鼎司', '鳞渊境'],
} }
def text_convert(world_): def text_convert(world_):

View File

@ -93,6 +93,46 @@ OCR_STAGE = ButtonWrapper(
button=(0, 0, 1000, 100), button=(0, 0, 1000, 100),
), ),
) )
SEAT_1 = ButtonWrapper(
name='SEAT_1',
share=Button(
file='./assets/share/forgotten_hall/ui/SEAT_1.png',
area=(946, 518, 953, 533),
search=(926, 498, 973, 553),
color=(66, 68, 89),
button=(946, 518, 953, 533),
),
)
SEAT_2 = ButtonWrapper(
name='SEAT_2',
share=Button(
file='./assets/share/forgotten_hall/ui/SEAT_2.png',
area=(1026, 518, 1033, 533),
search=(1006, 498, 1053, 553),
color=(68, 70, 92),
button=(1026, 518, 1033, 533),
),
)
SEAT_3 = ButtonWrapper(
name='SEAT_3',
share=Button(
file='./assets/share/forgotten_hall/ui/SEAT_3.png',
area=(1106, 518, 1113, 532),
search=(1086, 498, 1133, 552),
color=(67, 69, 87),
button=(1106, 518, 1113, 532),
),
)
SEAT_4 = ButtonWrapper(
name='SEAT_4',
share=Button(
file='./assets/share/forgotten_hall/ui/SEAT_4.png',
area=(1186, 518, 1193, 532),
search=(1166, 498, 1213, 552),
color=(67, 69, 86),
button=(1186, 518, 1193, 532),
),
)
TELEPORT = ButtonWrapper( TELEPORT = ButtonWrapper(
name='TELEPORT', name='TELEPORT',
share=Button( share=Button(

View File

@ -6,7 +6,7 @@ from module.base.utils import color_similarity_2d, get_color
from module.logger import logger from module.logger import logger
from tasks.base.ui import UI from tasks.base.ui import UI
from tasks.forgotten_hall.assets.assets_forgotten_hall_team import * from tasks.forgotten_hall.assets.assets_forgotten_hall_team import *
from tasks.forgotten_hall.assets.assets_forgotten_hall_ui import ENTER_FORGOTTEN_HALL_DUNGEON, ENTRANCE_CHECKED from tasks.forgotten_hall.assets.assets_forgotten_hall_ui import ENTER_FORGOTTEN_HALL_DUNGEON, ENTRANCE_CHECKED, SEAT_1, SEAT_2, SEAT_3, SEAT_4
class ForgottenHallTeam(UI): class ForgottenHallTeam(UI):
@ -57,6 +57,7 @@ class ForgottenHallTeam(UI):
logger.info('Team choose first 4') logger.info('Team choose first 4')
self.interval_clear(ENTRANCE_CHECKED) self.interval_clear(ENTRANCE_CHECKED)
characters = [CHARACTER_1, CHARACTER_2, CHARACTER_3, CHARACTER_4] characters = [CHARACTER_1, CHARACTER_2, CHARACTER_3, CHARACTER_4]
seats = [SEAT_1, SEAT_2, SEAT_3, SEAT_4]
while 1: while 1:
if skip_first_screenshot: if skip_first_screenshot:
skip_first_screenshot = False skip_first_screenshot = False
@ -64,9 +65,13 @@ class ForgottenHallTeam(UI):
self.device.screenshot() self.device.screenshot()
chosen_list = [self.is_character_chosen(c) for c in characters] chosen_list = [self.is_character_chosen(c) for c in characters]
seat_list = [not self.appear(s) for s in seats]
if all(chosen_list): if all(chosen_list):
logger.info("First 4 characters are chosen") logger.info("First 4 characters are chosen")
break break
if all(seat_list):
logger.info("4 characters are chosen")
break
if self.appear(ENTRANCE_CHECKED, interval=2): if self.appear(ENTRANCE_CHECKED, interval=2):
for character, chosen in zip(characters, chosen_list): for character, chosen in zip(characters, chosen_list):
if not chosen: if not chosen:
@ -79,7 +84,7 @@ class ForgottenHallTeam(UI):
Pages: Pages:
in: ENTRANCE_CHECKED, ENTER_FORGOTTEN_HALL_DUNGEON in: ENTRANCE_CHECKED, ENTER_FORGOTTEN_HALL_DUNGEON
""" """
characters = [CHARACTER_1, CHARACTER_2, CHARACTER_3, CHARACTER_4] seats = [SEAT_1, SEAT_2, SEAT_3, SEAT_4]
timeout = Timer(1, count=5).start() timeout = Timer(1, count=5).start()
while 1: while 1:
if skip_first_screenshot: if skip_first_screenshot:
@ -90,7 +95,7 @@ class ForgottenHallTeam(UI):
if timeout.reached(): if timeout.reached():
logger.info('Team not prepared') logger.info('Team not prepared')
return False return False
chosen_list = [self.is_character_chosen(c) for c in characters] chosen_list = [not self.appear(s) for s in seats]
if all(chosen_list): if all(chosen_list):
logger.info("Team already prepared") logger.info("Team already prepared")
return True return True

View File

@ -22,5 +22,6 @@ KEYWORDS_MAP_PLANE.Luofu_StargazerNavalia.floors = ['F1', 'F2']
KEYWORDS_MAP_PLANE.Luofu_DivinationCommission.floors = ['F1', 'F2'] KEYWORDS_MAP_PLANE.Luofu_DivinationCommission.floors = ['F1', 'F2']
KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.floors = ['F1', 'F2'] KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.floors = ['F1', 'F2']
KEYWORDS_MAP_PLANE.Luofu_ArtisanshipCommission.page = 'bottom' KEYWORDS_MAP_PLANE.Luofu_ArtisanshipCommission.page = 'bottom'
KEYWORDS_MAP_PLANE.Luofu_FyxestrollGarden.page = 'bottom'
KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.page = 'bottom' KEYWORDS_MAP_PLANE.Luofu_AlchemyCommission.page = 'bottom'
KEYWORDS_MAP_PLANE.Luofu_ScalegorgeWaterscape.page = 'bottom' KEYWORDS_MAP_PLANE.Luofu_ScalegorgeWaterscape.page = 'bottom'

View File

@ -300,8 +300,17 @@ Luofu_ArtisanshipCommission = MapPlane(
jp='工造司', jp='工造司',
es='Comisión de Artesanía', es='Comisión de Artesanía',
) )
Luofu_AlchemyCommission = MapPlane( Luofu_FyxestrollGarden = MapPlane(
id=34, id=34,
name='Luofu_FyxestrollGarden',
cn='绥园',
cht='綏園',
en='Fyxestroll Garden',
jp='綏園',
es='Jardín del Sosiego',
)
Luofu_AlchemyCommission = MapPlane(
id=35,
name='Luofu_AlchemyCommission', name='Luofu_AlchemyCommission',
cn='丹鼎司', cn='丹鼎司',
cht='丹鼎司', cht='丹鼎司',
@ -310,7 +319,7 @@ Luofu_AlchemyCommission = MapPlane(
es='Comisión de Alquimia', es='Comisión de Alquimia',
) )
Luofu_ScalegorgeWaterscape = MapPlane( Luofu_ScalegorgeWaterscape = MapPlane(
id=35, id=36,
name='Luofu_ScalegorgeWaterscape', name='Luofu_ScalegorgeWaterscape',
cn='鳞渊境', cn='鳞渊境',
cht='鱗淵境', cht='鱗淵境',