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