From 0ed6cd3507bb7452009e795952e18fe07588ad02 Mon Sep 17 00:00:00 2001 From: Eric Date: Mon, 5 Sep 2022 10:12:13 -0700 Subject: [PATCH] fixed some incorrect _bainternal usage --- .efrocachemap | 40 ++++++++++----------- CHANGELOG.md | 2 +- assets/src/ba_data/python/ba/_accountv1.py | 42 +++++++++++----------- assets/src/ba_data/python/ba/_bootstrap.py | 2 +- src/ballistica/ballistica.cc | 2 +- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/.efrocachemap b/.efrocachemap index 5c5d182f..a4e9efe3 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -3995,26 +3995,26 @@ "assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e", "assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34", "ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a", - "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4a/65/aa134181fbb13ae08ff05eff51a6", - "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e5/13/42861d778b7dab4e0b0d56817230", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b4/36/1f138fd4163c0276729549429105", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6b/2e/a0d0e3c98ca3c3806c7a7d3074fb", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/fa/f9/ef2842b5457c7a994fc170dc3edc", - "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a0/3a/c9217802c76546641c151551d953", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d4/79/f6804fa5950505a19520ea2f956e", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e7/ec/73a0da3473b6ffcc52b71e11e5e2", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/00/3c/fb865b3edb50c2d1c511694a34ac", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/41/08/559adae2b272e52bb42eb258d7f3", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4c/dd/d8c58dc8ded053cea4fdf3139262", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/de/19/93bc139d9e023355435849d185fe", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1a/4a/f6a0535be3c8a552e77f80bc0ddc", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ef/92/3d779f1bd77d21cca9050232b6c4", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/76/12/771bb6585a8a9d6d77d92f23fc2a", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ca/f6/f9c54a0a8f3b162d294dc209b8f8", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/0c/0c/09cfb789a4c9989bc6e51b24a757", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b7/4d/64f0bce4e344fddf2971a04aca8f", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/a7/a1/5cef8056a52a7264178c384c1ca7", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/77/03/0fe9d664c9e3910cd72ef719ae95", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/83/1c/5b492d0f9d2ad73887287eb3ce18", + "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cb/25/5082ea171654343932a94a613252", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6f/7a/7af61719efae62a6e5c758823724", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/94/6a/79f741a7253af8982365b6e5d92d", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/97/d93b22b5738c67f6966fd2f56564", + "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/41/d9/5a8e639c4d9b869ca18048aefce9", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/82/b3/29379f201976389fff07bac1de54", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3e/bd/70819bad9894a71715e69df4308c", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/ce/ce90df8da3fdf8dc744436e39890", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/58/9e/33d22d708ba003d431ac4d81355d", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a7/7b/908f38a8135b6a16ec703044301f", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8e/03/3704286bd7f4a3f96726ad8ab88a", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/61/4b/114567b371495e6f2fac36aa8a57", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c5/b6/2c238196bf53a31d64f148b9f63c", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/95/aa/860829cbc654b4a9f308ae9670b3", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/47/86/65012d1424073bb1b2168acfa2f5", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/ea/11/a0afdd0de0416542040a2d40e86e", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/88/05/b849ff473ca46fc4d487eb2421a6", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ad/dc/9ce2d3ad3967034a85724701d94d", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/45/ef/0ac2b4d12fa352bd736b76f8595a", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/ee/113076d5d2e088cc90230cf6ab51", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/e4/38a2a67908a08aa068c4927d3122", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/75/fd/6250319a816a7b312051bfc2a63f", diff --git a/CHANGELOG.md b/CHANGELOG.md index 1935ea55..03959694 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.7 (build 20766, api 7, 2022-09-05) +### 1.7.7 (build 20768, api 7, 2022-09-05) - Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread. - Improved logging of missing playlist game types. - Some ba.Lstr functionality can now be used in background threads. diff --git a/assets/src/ba_data/python/ba/_accountv1.py b/assets/src/ba_data/python/ba/_accountv1.py index 4d24ad2c..d6cf47d0 100644 --- a/assets/src/ba_data/python/ba/_accountv1.py +++ b/assets/src/ba_data/python/ba/_accountv1.py @@ -9,7 +9,7 @@ import time from typing import TYPE_CHECKING import _ba -import _bainternal +from ba import _internal if TYPE_CHECKING: from typing import Any @@ -42,7 +42,7 @@ class AccountV1Subsystem: def do_auto_sign_in() -> None: if _ba.app.headless_mode or _ba.app.config.get( 'Auto Account State') == 'Local': - _bainternal.sign_in_v1('Local') + _internal.sign_in_v1('Local') _ba.pushcall(do_auto_sign_in) @@ -109,8 +109,8 @@ class AccountV1Subsystem: if data['p']: pro_mult = 1.0 + float( - _bainternal.get_v1_account_misc_read_val( - 'proPowerRankingBoost', 0.0)) * 0.01 + _internal.get_v1_account_misc_read_val('proPowerRankingBoost', + 0.0)) * 0.01 else: pro_mult = 1.0 @@ -136,12 +136,12 @@ class AccountV1Subsystem: """(internal)""" # pylint: disable=cyclic-import from ba import _store - if _bainternal.get_v1_account_state() != 'signed_in': + if _internal.get_v1_account_state() != 'signed_in': return [] icons = [] store_items = _store.get_store_items() for item_name, item in list(store_items.items()): - if item_name.startswith('icons.') and _bainternal.get_purchased( + if item_name.startswith('icons.') and _internal.get_purchased( item_name): icons.append(item['icon']) return icons @@ -154,13 +154,13 @@ class AccountV1Subsystem: (internal) """ # This only applies when we're signed in. - if _bainternal.get_v1_account_state() != 'signed_in': + if _internal.get_v1_account_state() != 'signed_in': return # If the short version of our account name currently cant be # displayed by the game, cancel. if not _ba.have_chars( - _bainternal.get_v1_account_display_string(full=False)): + _internal.get_v1_account_display_string(full=False)): return config = _ba.app.config @@ -168,7 +168,7 @@ class AccountV1Subsystem: or '__account__' not in config['Player Profiles']): # Create a spaz with a nice default purply color. - _bainternal.add_transaction({ + _internal.add_transaction({ 'type': 'ADD_PLAYER_PROFILE', 'name': '__account__', 'profile': { @@ -177,7 +177,7 @@ class AccountV1Subsystem: 'highlight': [0.5, 0.25, 1.0] } }) - _bainternal.run_transactions() + _internal.run_transactions() def have_pro(self) -> bool: """Return whether pro is currently unlocked.""" @@ -185,9 +185,9 @@ class AccountV1Subsystem: # Check our tickets-based pro upgrade and our two real-IAP based # upgrades. Also always unlock this stuff in ballistica-core builds. return bool( - _bainternal.get_purchased('upgrades.pro') - or _bainternal.get_purchased('static.pro') - or _bainternal.get_purchased('static.pro_sale') + _internal.get_purchased('upgrades.pro') + or _internal.get_purchased('static.pro') + or _internal.get_purchased('static.pro_sale') or 'ballistica' + 'core' == _ba.appname()) def have_pro_options(self) -> bool: @@ -202,8 +202,8 @@ class AccountV1Subsystem: # or also if we've been grandfathered in or are using ballistica-core # builds. return self.have_pro() or bool( - _bainternal.get_v1_account_misc_read_val_2('proOptionsUnlocked', - False) + _internal.get_v1_account_misc_read_val_2('proOptionsUnlocked', + False) or _ba.app.config.get('lc14292', 0) > 1) def show_post_purchase_message(self) -> None: @@ -225,17 +225,17 @@ class AccountV1Subsystem: from ba._language import Lstr # Run any pending promo codes we had queued up while not signed in. - if _bainternal.get_v1_account_state( + if _internal.get_v1_account_state( ) == 'signed_in' and self.pending_promo_codes: for code in self.pending_promo_codes: _ba.screenmessage(Lstr(resource='submittingPromoCodeText'), color=(0, 1, 0)) - _bainternal.add_transaction({ + _internal.add_transaction({ 'type': 'PROMO_CODE', 'expire_time': time.time() + 5, 'code': code }) - _bainternal.run_transactions() + _internal.run_transactions() self.pending_promo_codes = [] def add_pending_promo_code(self, code: str) -> None: @@ -246,7 +246,7 @@ class AccountV1Subsystem: # If we're not signed in, queue up the code to run the next time we # are and issue a warning if we haven't signed in within the next # few seconds. - if _bainternal.get_v1_account_state() != 'signed_in': + if _internal.get_v1_account_state() != 'signed_in': def check_pending_codes() -> None: """(internal)""" @@ -263,9 +263,9 @@ class AccountV1Subsystem: return _ba.screenmessage(Lstr(resource='submittingPromoCodeText'), color=(0, 1, 0)) - _bainternal.add_transaction({ + _internal.add_transaction({ 'type': 'PROMO_CODE', 'expire_time': time.time() + 5, 'code': code }) - _bainternal.run_transactions() + _internal.run_transactions() diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py index ce7931ed..a941ff00 100644 --- a/assets/src/ba_data/python/ba/_bootstrap.py +++ b/assets/src/ba_data/python/ba/_bootstrap.py @@ -32,7 +32,7 @@ def bootstrap() -> None: # Give a soft warning if we're being used with a different binary # version than we expect. - expected_build = 20766 + expected_build = 20768 running_build: int = env['build_number'] if running_build != expected_build: print( diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc index 5e176860..224a4933 100644 --- a/src/ballistica/ballistica.cc +++ b/src/ballistica/ballistica.cc @@ -22,7 +22,7 @@ namespace ballistica { // These are set automatically via script; don't modify them here. -const int kAppBuildNumber = 20766; +const int kAppBuildNumber = 20768; const char* kAppVersion = "1.7.7"; // Our standalone globals.