mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-05 06:53:18 +08:00
More internal return type fixes.
This commit is contained in:
parent
5d9e854eb8
commit
2ea4873726
@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand.
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
# (hash we can use to see if this file is out of date)
|
# (hash we can use to see if this file is out of date)
|
||||||
# SOURCES_HASH=19018950468850503638731149460882909299
|
# SOURCES_HASH=13501269283550798144571003636886602232
|
||||||
|
|
||||||
# I'm sorry Pylint. I know this file saddens you. Be strong.
|
# I'm sorry Pylint. I know this file saddens you. Be strong.
|
||||||
# pylint: disable=useless-suppression
|
# pylint: disable=useless-suppression
|
||||||
@ -1998,7 +1998,7 @@ def get_display_resolution() -> Tuple[int, int]:
|
|||||||
return (0, 0)
|
return (0, 0)
|
||||||
|
|
||||||
|
|
||||||
def get_foreground_host_activity() -> ba.Activity:
|
def get_foreground_host_activity() -> Optional[ba.Activity]:
|
||||||
"""get_foreground_host_activity() -> Optional[ba.Activity]
|
"""get_foreground_host_activity() -> Optional[ba.Activity]
|
||||||
|
|
||||||
(internal)
|
(internal)
|
||||||
@ -2010,7 +2010,7 @@ def get_foreground_host_activity() -> ba.Activity:
|
|||||||
return ba.Activity({})
|
return ba.Activity({})
|
||||||
|
|
||||||
|
|
||||||
def get_foreground_host_session() -> ba.Session:
|
def get_foreground_host_session() -> Optional[ba.Session]:
|
||||||
"""get_foreground_host_session() -> Optional[ba.Session]
|
"""get_foreground_host_session() -> Optional[ba.Session]
|
||||||
|
|
||||||
(internal)
|
(internal)
|
||||||
|
|||||||
@ -321,8 +321,9 @@ def call_after_ad(call: Callable[[], Any]) -> None:
|
|||||||
if have_pro():
|
if have_pro():
|
||||||
show = False # Pro disables interstitials.
|
show = False # Pro disables interstitials.
|
||||||
try:
|
try:
|
||||||
is_tournament = (_ba.get_foreground_host_session().tournament_id is
|
session = _ba.get_foreground_host_session()
|
||||||
not None)
|
assert session is not None
|
||||||
|
is_tournament = session.tournament_id is not None
|
||||||
except Exception:
|
except Exception:
|
||||||
is_tournament = False
|
is_tournament = False
|
||||||
if is_tournament:
|
if is_tournament:
|
||||||
|
|||||||
@ -147,7 +147,9 @@ def _reset_stress_test(args: Dict[str, Any]) -> None:
|
|||||||
from ba._enums import TimeType
|
from ba._enums import TimeType
|
||||||
_ba.set_stress_testing(False, args['player_count'])
|
_ba.set_stress_testing(False, args['player_count'])
|
||||||
_ba.screenmessage('Resetting stress test...')
|
_ba.screenmessage('Resetting stress test...')
|
||||||
_ba.get_foreground_host_session().end()
|
session = _ba.get_foreground_host_session()
|
||||||
|
assert session is not None
|
||||||
|
session.end()
|
||||||
_ba.timer(1.0, Call(start_stress_test, args), timetype=TimeType.REAL)
|
_ba.timer(1.0, Call(start_stress_test, args), timetype=TimeType.REAL)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user