Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click CONTINUE on hardware not supported unity screen #1384

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions mapadroid/ocr/screenPath.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,6 +277,9 @@ async def __handle_screentype(self, screentype: ScreenType,
screentype = await self.__handle_adventure_sync_screen(screentype)
elif screentype == ScreenType.WILLOWGO:
screentype = await self.__handle_tutorial_end()
elif screentype == ScreenType.HARDWARE_UNITY_UNSUPPORTED:
logger.warning('Detected unsupported hardware screen, PD could not handle that?')
screentype = await self.__handle_hardware_unsupported_unity_screen(diff, global_dict)
elif screentype == ScreenType.SN:
self._nextscreen = ScreenType.UNDEFINED
elif screentype == ScreenType.UPDATE:
Expand Down Expand Up @@ -1014,6 +1017,11 @@ async def __handle_login_timeout(self, diff, global_dict) -> None:
self._nextscreen = ScreenType.UNDEFINED
click_text = 'SIGNOUT,SIGN,ABMELDEN,_DECONNECTER'
await self.__click_center_button_text(click_text, diff, global_dict)

async def __handle_hardware_unsupported_unity_screen(self, diff, global_dict) -> None:
self._nextscreen = ScreenType.UNDEFINED
click_text = 'CONTINUE' # no idea if this gets translated to different lang?
await self.__click_center_button_text(click_text, diff, global_dict)

async def _take_and_analyze_screenshot(self, delay_after=0.0, delay_before=0.0, errorscreen: bool = False) -> \
Optional[Tuple[ScreenType,
Expand Down
1 change: 1 addition & 0 deletions mapadroid/ocr/screen_type.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ class ScreenType(Enum):
RETRY = 6 # Failed to log in. Green button on top: RETRY - no background button below: TRY A DIFFERENT ACCOUNT
WRONG = 7 # incorrect credentials?
GAMEDATA = 8 # game data could not be fetched from server
HARDWARE_UNITY_UNSUPPORTED = 9 # Your device does not match hardware requirements for this application CONTINUE
GGL = 10 # Google account picker
PERMISSION = 11 # permission grant overlay (Android)
MARKETING = 12 # marketing notification request (pogo)
Expand Down
3 changes: 2 additions & 1 deletion mapadroid/ocr/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,10 @@
'AUTRE', 'AUTORISER'],
7: ['incorrect.', 'attempts', 'falsch.', 'gesperrt'],
8: ['Spieldaten', 'abgerufen', 'lecture', 'depuis', 'server', 'data'],
9: ['hardware', 'requirements'],
12: ['Events,', 'Benachrichtigungen', 'Einstellungen', 'events,', 'offers,',
'notifications', 'évenements,', 'evenements,', 'offres'],
14: ['kompatibel', 'compatible', 'OS', 'software', 'device', 'Gerät',
14: ['kompatibel', 'compatible', 'OS', 'software', 'Gerät',
'Betriebssystem', 'logiciel'],
15: ['continuer...', 'aktualisieren?', 'now?', 'Aktualisieren', 'Aktualisieren,',
'aktualisieren', 'update', 'continue...', 'Veux-tu', 'Fais', 'continuer'],
Expand Down
Loading