Skip to content

Commit

Permalink
added warning that chests may be lost if playing with no chest slots …
Browse files Browse the repository at this point in the history
…open.
  • Loading branch information
efroemling committed Feb 1, 2025
1 parent 6a2eedc commit 8e9e756
Show file tree
Hide file tree
Showing 7 changed files with 60 additions and 42 deletions.
48 changes: 24 additions & 24 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.37 (build 22261, api 9, 2025-01-31)
### 1.7.37 (build 22262, api 9, 2025-01-31)
- Bumping api version to 9. As you'll see below, there's some UI changes that
will require a bit of work for any UI mods to adapt to. If your mods don't
touch UI stuff at all you can simply bump your api version and call it a day.
Expand Down
7 changes: 7 additions & 0 deletions src/assets/ba_data/python/baclassic/_appmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,7 @@ def _update_for_primary_account(

if account is None:
classic.gold_pass = False
classic.chest_dock_full = False
classic.remove_ads = False
self._account_data_sub = None
_baclassic.set_root_ui_account_values(
Expand Down Expand Up @@ -274,6 +275,12 @@ def _on_classic_account_data_change(
assert classic is not None
classic.remove_ads = val.remove_ads
classic.gold_pass = val.gold_pass
classic.chest_dock_full = (
chest0 is not None
and chest1 is not None
and chest2 is not None
and chest3 is not None
)

_baclassic.set_root_ui_account_values(
tickets=val.tickets,
Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/baclassic/_appsubsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ def __init__(self) -> None:
# Classic-specific account state.
self.remove_ads = False
self.gold_pass = False
self.chest_dock_full = False

# Main Menu.
self.main_menu_did_initial_transition = False
Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 22261
TARGET_BALLISTICA_BUILD = 22262
TARGET_BALLISTICA_VERSION = '1.7.37'


Expand Down
40 changes: 25 additions & 15 deletions src/assets/ba_data/python/bauiv1lib/coop/browser.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import logging
from typing import TYPE_CHECKING, override


import bauiv1 as bui

if TYPE_CHECKING:
Expand Down Expand Up @@ -1001,6 +1002,30 @@ def is_tourney_data_up_to_date(self) -> bool:

def run_game(
self, game: str, origin_widget: bui.Widget | None = None
) -> None:
"""Run the provided game."""
from efro.util import strict_partial
from bauiv1lib.confirm import ConfirmWindow

classic = bui.app.classic
assert classic is not None

if classic.chest_dock_full:
ConfirmWindow(
bui.Lstr(resource='chests.slotsFullWarningText'),
width=550,
height=140,
ok_text=bui.Lstr(resource='continueText'),
origin_widget=origin_widget,
action=strict_partial(
self._run_game, game=game, origin_widget=origin_widget
),
)
else:
self._run_game(game=game, origin_widget=origin_widget)

def _run_game(
self, game: str, origin_widget: bui.Widget | None = None
) -> None:
"""Run the provided game."""
# pylint: disable=cyclic-import
Expand Down Expand Up @@ -1040,21 +1065,6 @@ def run_game(
)
return

# if required_purchases and not all(
# plus.get_v1_account_product_purchased(p)
# for p in required_purchases
# ):
# if plus.get_v1_account_state() != 'signed_in':
# show_sign_in_prompt()
# else:
# # Hmm just ask about the first I guess.. They can pop
# # this window back up to the next if they purchase the
# # first.
# PurchaseWindow(
# items=[required_purchases[0]], origin_widget=origin_widget
# )
# return

self._save_state()

if bui.app.classic.launch_coop_game(game, args=args):
Expand Down
2 changes: 1 addition & 1 deletion src/ballistica/shared/ballistica.cc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {

// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 22261;
const int kEngineBuildNumber = 22262;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9;

Expand Down

0 comments on commit 8e9e756

Please sign in to comment.