diff --git a/.efrocachemap b/.efrocachemap index 20a0a3d2..189b810b 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4114,10 +4114,10 @@ "assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb", "assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe", - "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c4/9e/3939cebb867e877d90e0cf7d145e", - "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f2/54/9c026e7b1274e72dd51774faff64", - "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7b/c1/d8ab89a15840be9f627924f2f2a3", - "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/21/22/643093c7ea9435f57eb02a14fae7", - "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3f/49/b581b216a3b51ddb13d094897130", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c0/bf/fc98b7d1da0b9eec8b5a56308875" + "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ff/6b/d0873927a179b2a85a3dea2da18a", + "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ac/48/72f261d7884a21cb79feef2d0a02", + "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e7/e8/6cb5ba8c688986b322dd998c0320", + "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/76/6037c47265319bcbf4e448307a57", + "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/43/23/d3e915b7c5222535ea723538d778", + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ce/98/72177f47655d61fedb069cb2e279" } \ No newline at end of file diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index dbdae18c..8ad46bfd 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -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) -# SOURCES_HASH=19018950468850503638731149460882909299 +# SOURCES_HASH=13501269283550798144571003636886602232 # I'm sorry Pylint. I know this file saddens you. Be strong. # pylint: disable=useless-suppression @@ -1998,7 +1998,7 @@ def get_display_resolution() -> Tuple[int, int]: 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] (internal) @@ -2010,7 +2010,7 @@ def get_foreground_host_activity() -> 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] (internal) diff --git a/assets/src/ba_data/python/ba/_apputils.py b/assets/src/ba_data/python/ba/_apputils.py index 91307be2..25a77d7d 100644 --- a/assets/src/ba_data/python/ba/_apputils.py +++ b/assets/src/ba_data/python/ba/_apputils.py @@ -320,8 +320,9 @@ def call_after_ad(call: Callable[[], Any]) -> None: if have_pro(): show = False # Pro disables interstitials. try: - is_tournament = (_ba.get_foreground_host_session().tournament_id is - not None) + session = _ba.get_foreground_host_session() + assert session is not None + is_tournament = session.tournament_id is not None except Exception: is_tournament = False if is_tournament: diff --git a/assets/src/ba_data/python/ba/_benchmark.py b/assets/src/ba_data/python/ba/_benchmark.py index 0a0c915e..c5a5aa08 100644 --- a/assets/src/ba_data/python/ba/_benchmark.py +++ b/assets/src/ba_data/python/ba/_benchmark.py @@ -147,7 +147,9 @@ def _reset_stress_test(args: Dict[str, Any]) -> None: from ba._enums import TimeType _ba.set_stress_testing(False, args['player_count']) _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)