Пример #1
0
 def _google_invites(self) -> None:
     ba.set_analytics_screen('App Invite UI')
     _ba.show_app_invite(
         ba.Lstr(resource='gatherWindow.appInviteTitleText',
                 subs=[('${APP_NAME}', ba.Lstr(resource='titleText'))
                       ]).evaluate(),
         ba.Lstr(resource='gatherWindow.appInviteMessageText',
                 subs=[('${COUNT}', str(self._data['tickets'])),
                       ('${NAME}', _ba.get_account_name().split()[0]),
                       ('${APP_NAME}', ba.Lstr(resource='titleText'))
                       ]).evaluate(), self._data['code'])
Пример #2
0
    def _google_invites(self) -> None:
        if self._data is None:
            ba.screenmessage(ba.Lstr(
                resource='getTicketsWindow.unavailableTemporarilyText'),
                             color=(1, 0, 0))
            ba.playsound(ba.getsound('error'))
            return

        if _ba.get_account_state() == 'signed_in':
            ba.set_analytics_screen('App Invite UI')
            _ba.show_app_invite(
                ba.Lstr(resource='gatherWindow.appInviteTitleText',
                        subs=[('${APP_NAME}', ba.Lstr(resource='titleText'))
                              ]).evaluate(),
                ba.Lstr(resource='gatherWindow.appInviteMessageText',
                        subs=[('${COUNT}', str(self._data['tickets'])),
                              ('${NAME}', _ba.get_account_name().split()[0]),
                              ('${APP_NAME}', ba.Lstr(resource='titleText'))
                              ]).evaluate(), self._data['code'])
        else:
            ba.playsound(ba.getsound('error'))