mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-09 01:09:40 +08:00
oops pycharm formatting differ
This commit is contained in:
parent
976cf18247
commit
19591e128b
@ -78,9 +78,9 @@ class Campaign:
|
||||
for level in self._levels:
|
||||
if level.name == name:
|
||||
return level
|
||||
raise _error.NotFoundError(
|
||||
"Level '" + name + "' not found in campaign '" +
|
||||
self.name + "'")
|
||||
raise _error.NotFoundError("Level '" + name +
|
||||
"' not found in campaign '" + self.name +
|
||||
"'")
|
||||
|
||||
def reset(self) -> None:
|
||||
"""Reset state for the Campaign."""
|
||||
|
||||
@ -326,7 +326,8 @@ def get_scan_results() -> ScanResults:
|
||||
while app.metascan is None:
|
||||
time.sleep(0.05)
|
||||
if time.time() - starttime > 10.0:
|
||||
raise TimeoutError('timeout waiting for meta scan to complete.')
|
||||
raise TimeoutError(
|
||||
'timeout waiting for meta scan to complete.')
|
||||
return app.metascan
|
||||
|
||||
|
||||
|
||||
@ -387,8 +387,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
|
||||
label=ba.Lstr(resource='tournamentStandingsText')
|
||||
if self.session.tournament_id is not None else ba.Lstr(
|
||||
resource='worldsBestScoresText') if self._score_type
|
||||
== 'points' else ba.Lstr(
|
||||
resource='worldsBestTimesText'),
|
||||
== 'points' else ba.Lstr(resource='worldsBestTimesText'),
|
||||
autoselect=True,
|
||||
on_activate_call=ba.WeakCall(self._ui_worlds_best),
|
||||
transition_delay=delay + 1.9,
|
||||
@ -729,8 +728,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
|
||||
txt = Text(ba.Lstr(resource='tournamentStandingsText')
|
||||
if self.session.tournament_id is not None else ba.Lstr(
|
||||
resource='worldsBestScoresText') if self._score_type
|
||||
== 'points' else ba.Lstr(
|
||||
resource='worldsBestTimesText'),
|
||||
== 'points' else ba.Lstr(resource='worldsBestTimesText'),
|
||||
maxwidth=210,
|
||||
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
|
||||
transition=Text.Transition.IN_LEFT,
|
||||
@ -766,8 +764,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
|
||||
ts_h_offs = -480
|
||||
v_offs = 40
|
||||
Text(ba.Lstr(resource='yourBestScoresText') if self._score_type
|
||||
== 'points' else ba.Lstr(
|
||||
resource='yourBestTimesText'),
|
||||
== 'points' else ba.Lstr(resource='yourBestTimesText'),
|
||||
maxwidth=210,
|
||||
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
|
||||
transition=Text.Transition.IN_RIGHT,
|
||||
|
||||
@ -627,8 +627,8 @@ class AccountSettingsWindow(ba.Window):
|
||||
elif account_type == 'Game Circle':
|
||||
account_type_name = ba.Lstr(resource='gameCircleText')
|
||||
else:
|
||||
raise ValueError("unknown account type: '" + str(account_type) +
|
||||
"'")
|
||||
raise ValueError("unknown account type: '" +
|
||||
str(account_type) + "'")
|
||||
self._game_service_button = btn = ba.buttonwidget(
|
||||
parent=self._subcontainer,
|
||||
position=((self._sub_width - button_width) * 0.5, v),
|
||||
|
||||
@ -321,6 +321,7 @@ class MainMenuWindow(ba.Window):
|
||||
# we want back presses to quit our activity.
|
||||
if (not self._in_game and not self._have_quit_button
|
||||
and ba.app.platform == 'android'):
|
||||
|
||||
def _do_quit() -> None:
|
||||
confirm.QuitWindow(swish=True, back=True)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user