@@ -346,9 +346,12 @@ async def __handle_screentype(self, screentype: ScreenType,
346
346
return screentype
347
347
348
348
async def __check_pogo_screen_ban_or_loading (self , screentype , y_offset : int = 0 ) -> ScreenType :
349
- backgroundcolor = await self ._worker_state .pogo_windows .most_frequent_colour (await self .get_screenshot_path (),
349
+ screenshot_path : str = await self .get_screenshot_path ()
350
+ backgroundcolor = await self ._worker_state .pogo_windows .most_frequent_colour (screenshot_path ,
350
351
self ._worker_state .origin ,
351
352
y_offset = y_offset )
353
+ globaldict = await self ._worker_state .pogo_windows .get_screen_text (screenshot_path , self ._worker_state .origin )
354
+ welcome_text = ['Willkommen' , 'Welcome' ]
352
355
if backgroundcolor is not None and (
353
356
backgroundcolor [0 ] == 0 and
354
357
backgroundcolor [1 ] == 0 and
@@ -362,9 +365,13 @@ async def __check_pogo_screen_ban_or_loading(self, screentype, y_offset: int = 0
362
365
# Got a strike warning
363
366
screentype = ScreenType .STRIKE
364
367
elif backgroundcolor is not None and (
368
+ any (text in welcome_text for text in globaldict ['text' ]) or (
365
369
backgroundcolor [0 ] == 18 and
366
370
backgroundcolor [1 ] == 46 and
367
- backgroundcolor [2 ] == 86 ):
371
+ backgroundcolor [2 ] == 86 ) or (
372
+ backgroundcolor [0 ] == 55 and
373
+ backgroundcolor [1 ] == 72 and
374
+ backgroundcolor [2 ] == 88 )):
368
375
screentype = ScreenType .WELCOME
369
376
return screentype
370
377
0 commit comments