bug fixes and removing pro reqs

This commit is contained in:
Eric 2024-08-30 13:25:23 -07:00
parent 648d90e971
commit c5809af376
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
33 changed files with 126 additions and 63 deletions

56
.efrocachemap generated
View File

@ -4096,26 +4096,26 @@
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "0a166c970637de5e318e4f07e8c0aeae",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "71fee3398234820d038235f02ea7ed6a",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "682d622e82fbdf7d41f170146ae8cf6f",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "ed9a7e820ab3a59d6326b898973d5cff",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "4efa411d0d43debb7c8db1db1d9a4658",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "8892f774f2d079604d77241adaf3e529",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "c479f3ab633f0b19f3e733943b3c1c3b",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "2797e7b22388c68b2e41a1eb7c820a62",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "f58b978d2978fdf6e2f7f0cc13fbb2c7",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "1ad711461c2a65ecb1fbab1aac2aacae",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "ec90ed3ec92a6db3f8b9651f2464d8d4",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "12cc0539e86a408b01ac3b3a74cff98a",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "1f59835f71e01827f056f503302c45c4",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "c747103d9fe3206f94b54ed9ae5d4aa4",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "603f77208cb0df9161b84387631b8778",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "00a72972b6b0531b176406ad0e8d243f",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "af0063f60bb84a65ca71df83d00b9507",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "817b90e953f655e83cd8e69d1feb5526",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "c132d48c3b560ac0dcf090a3bce8ba26",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "b3c44cd6282d4100b730e997baa3f28e",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "6ca46255d87047834e9bceed2a572492",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "773786e74f514fc457797cf7c614cf23",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "45bbfb410e7b7913b7018984eb148cfd",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "8bd52a87787a7919f9380b9cb123025d",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "deee48c7d81d0cf451e5d38a4d5c1b52",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "2d9db97047c544f2f18cba20e5132b4f",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "eb1e5c208f95e89344729ca6d0d13d69",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "f3e81698bc42154c9a311ccdaa19502f",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e6e76cea88f2dbd268197e26cebeec4d",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "93a91bb8c65b30288cb02c932108bbfb",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "517bad06f8f6761d7cd5c66a332e4796",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "df7fbf1c5e2d3485425d1061c09cc454",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "fe4463737ea11236062a9d73445e1d04",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "a4b2333e35a640793aad1a58d4a7da99",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "46ae66faca5b5dcedd8c45fab1de2d40",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "8e4b07dcffe24fd40245bfb141f21a33",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "2542ddef05c44ef98e8ce013d9d9d893",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "e742017f9a7163ce5c926dbabb0c1b2c",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "189eb8e10c5ce9304340ab3ca6ca1eb5",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "88427878171caad3f31c08c9c0f38422",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "fa659b5d6119acba6570c92ce4d35ae2",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c",
@ -4132,14 +4132,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "3e5c5fd0a09f55ba7b05ce1e2ec7171e",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "1659535e95e3047fda529543e265ac97",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "3e5c5fd0a09f55ba7b05ce1e2ec7171e",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "d4aca724c3184c6c2c82e7b11c1a352a",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "f4fbab89e11f52329d65a9afcabc2e5e",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "09733e1291806ece13f108ad6fb72b68",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "099e20f57cfa2c36bf7b44e389d01d9a",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "aae5ce60761c700d23a480cac83a2df5",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "1fdc6ee85373af9df3a0b5eb601990af",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "809e62f1d2ac54c239a3a13c2d2c8ee7",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "68b49b66a76b9ab0d1b17de2bab19c04",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "db87ff147063b23294144fa0ca838255",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "d70137eb08f7426fded9b0648b52cc42",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "852afacdebd25751185ce74d0e55c761",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "7f59022c28a769dc850285e76ffd0b1b",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "c700e22237f9f385645e8cb3993e43b2",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "e92d8ce8707096f99d87e3579a18aaf6",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "cbbb6e764b847817a662f14404338bf2",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "d2c5ad26fcc7699c53214a67c6a66a2a",
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
"src/assets/ba_data/python/babase/_mgen/enums.py": "cb299985623bbcc86015cb103a424ae6",
"src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d",

View File

@ -1,6 +1,13 @@
### 1.7.37 (build 21968, api 8, 2024-08-29)
### 1.7.37 (build 21972, api 9, 2024-08-30)
- 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.
I'm hopeful that api version won't need to be bumped again for along time (if
ever).
- Playlist customization no longer requires pro.
- Soundtrack customization no longer requires pro.
- Campaign hard mode no longer requires pro.
- Full player profile color customization no longer requires pro.
- Switching over to the new 'toolbar mode' UI that has been in the works for
several years. This includes a number of handy things such as consistent
buttons and widgets for league status, currencies, inventory, and the store.

View File

@ -16,7 +16,7 @@ classic submodules directly, it is much harder to make it cleanly handle
classic not being present.
"""
# ba_meta require api 8
# ba_meta require api 9
# Note: Code relying on classic should import things from here *only*
# for type-checking and use the versions in ba*.app.classic at runtime;

View File

@ -52,7 +52,7 @@ if TYPE_CHECKING:
# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 21968
TARGET_BALLISTICA_BUILD = 21972
TARGET_BALLISTICA_VERSION = '1.7.37'

View File

@ -2,7 +2,7 @@
#
"""Gameplay-centric api for classic BombSquad."""
# ba_meta require api 8
# ba_meta require api 9
# The stuff we expose here at the top level is our 'public' api for use
# from other modules/packages. Code *within* this package should import

View File

@ -4,6 +4,7 @@
from __future__ import annotations
import random
from dataclasses import dataclass
from typing import TYPE_CHECKING, NewType
@ -243,7 +244,6 @@ def cameraflash(duration: float = 999.0) -> None:
Duration is in seconds.
"""
# pylint: disable=too-many-locals
import random
from bascenev1._nodeactor import NodeActor
x_spread = 10

View File

@ -2,4 +2,4 @@
#
"""Library of stuff using the bascenev1 api: games, actors, etc."""
# ba_meta require api 8
# ba_meta require api 9

View File

@ -2,7 +2,7 @@
#
"""Defines assault minigame."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Defines a capture-the-flag game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Provides the chosen-one mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Provides the Conquest game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""DeathMatch game and support classes."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Provides an easter egg hunt game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Elimination mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -3,7 +3,7 @@
# pylint: disable=too-many-lines
"""Implements football games (both co-op and teams varieties)."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Hockey game and support classes."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Defines a keep-away game type."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Defines the King of the Hill game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Defines a bomb-dodging mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Provides Ninja Fight mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -5,7 +5,7 @@
# Yes this is a long one..
# pylint: disable=too-many-lines
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Defines Race mini-game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -5,7 +5,7 @@
# We wear the cone of shame.
# pylint: disable=too-many-lines
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Implements Target Practice game."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -2,7 +2,7 @@
#
"""Ballistica Template Feature Set - just an example."""
# ba_meta require api 8
# ba_meta require api 9
# Package up various private bits (including stuff from our native
# module) into a nice clean public API.

View File

@ -2,7 +2,7 @@
#
"""Ballistica user interface api version 1"""
# ba_meta require api 8
# ba_meta require api 9
# The stuff we expose here at the top level is our 'public' api.
# It should only be imported by code outside of this package or

View File

@ -2,4 +2,4 @@
#
"""Library of stuff using the bauiv1 api: windows, custom controls, etc."""
# ba_meta require api 8
# ba_meta require api 9

View File

@ -12,6 +12,8 @@ import bauiv1 as bui
if TYPE_CHECKING:
from typing import Any, Sequence
REQUIRE_PRO = False
class ColorPicker(PopupWindow):
"""A popup UI to select from a set of colors.
@ -105,9 +107,8 @@ class ColorPicker(PopupWindow):
on_activate_call=bui.WeakCall(self._select_other),
)
# Custom colors are limited to pro currently.
assert bui.app.classic is not None
if not bui.app.classic.accounts.have_pro():
if REQUIRE_PRO and not bui.app.classic.accounts.have_pro():
bui.imagewidget(
parent=self.root_widget,
position=(50, 12),
@ -137,7 +138,7 @@ class ColorPicker(PopupWindow):
# Requires pro.
assert bui.app.classic is not None
if not bui.app.classic.accounts.have_pro():
if REQUIRE_PRO and not bui.app.classic.accounts.have_pro():
purchase.PurchaseWindow(items=['pro'])
self._transition_out()
return

View File

@ -16,6 +16,8 @@ if TYPE_CHECKING:
from bauiv1lib.coop.tournamentbutton import TournamentButton
HARD_REQUIRES_PRO = False
class CoopBrowserWindow(bui.MainWindow):
"""Window for browsing co-op levels/games/etc."""
@ -90,6 +92,7 @@ class CoopBrowserWindow(bui.MainWindow):
if (
self._campaign_difficulty == 'hard'
and HARD_REQUIRES_PRO
and not classic.accounts.have_pro_options()
):
plus.add_v1_account_transaction(
@ -430,7 +433,12 @@ class CoopBrowserWindow(bui.MainWindow):
bui.imagewidget(
edit=self._hard_button_lock_image,
opacity=(
0.0 if bui.app.classic.accounts.have_pro_options() else 1.0
0.0
if (
(not HARD_REQUIRES_PRO)
or bui.app.classic.accounts.have_pro_options()
)
else 1.0
),
)
except Exception:
@ -490,6 +498,7 @@ class CoopBrowserWindow(bui.MainWindow):
if difficulty != self._campaign_difficulty:
if (
difficulty == 'hard'
and HARD_REQUIRES_PRO
and not bui.app.classic.accounts.have_pro_options()
):
PurchaseWindow(items=['pro'])

View File

@ -2,7 +2,7 @@
#
"""Defines a default keyboards."""
# ba_meta require api 8
# ba_meta require api 9
# (see https://ballistica.net/wiki/meta-tag-system)
from __future__ import annotations

View File

@ -153,6 +153,33 @@ class MainMenuWindow(bui.MainWindow):
app = bui.app
assert app.classic is not None
uiscale = app.ui_v1.uiscale
# Temp note about UI changes.
bui.textwidget(
parent=self._root_widget,
position=(
(-400, 400)
if uiscale is bui.UIScale.LARGE
else (
(-270, 320)
if uiscale is bui.UIScale.MEDIUM
else (-280, 280)
)
),
size=(0, 0),
scale=0.4,
flatness=1.0,
text=(
'WARNING: This build contains a revamped UI\n'
'which is still a work-in-progress. A number\n'
'of features are not currently functional or\n'
'contain bugs. To go back to the stable legacy UI,\n'
'grab version 1.7.36 from ballistica.net'
),
h_align='left',
v_align='top',
)
self._have_quit_button = app.classic.platform in (
'windows',
@ -183,7 +210,6 @@ class MainMenuWindow(bui.MainWindow):
side_button_2_y_offs = 10.0
side_button_2_scale = 0.5
uiscale = bui.app.ui_v1.uiscale
if uiscale is bui.UIScale.SMALL:
root_widget_scale = 1.3
button_y_offs = -20.0
@ -204,6 +230,24 @@ class MainMenuWindow(bui.MainWindow):
scale=root_widget_scale,
)
# Version/copyright info.
bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, button_y_offs - 10),
size=(0, 0),
scale=0.4,
flatness=1.0,
color=(1, 1, 1, 0.3),
text=(
f'{app.env.engine_version}'
f' build {app.env.engine_build_number}.'
f' Copyright 2024 Eric Froemling.'
),
h_align='center',
v_align='center',
transition_delay=self._t_delay_play,
)
# In kiosk mode, provide a button to get back to the kiosk menu.
if bui.app.env.demo or bui.app.env.arcade:
# h, v, scale = positions[self._p_index]

View File

@ -39,9 +39,9 @@ auto main(int argc, char** argv) -> int {
namespace ballistica {
// These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 21968;
const int kEngineBuildNumber = 21972;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 8;
const int kEngineApiVersion = 9;
#if BA_MONOLITHIC_BUILD

View File

@ -3,7 +3,9 @@
#include "ballistica/ui_v1/widget/root_widget.h"
#include "ballistica/base/app_mode/app_mode.h"
#include "ballistica/base/graphics/renderer/renderer.h"
#include "ballistica/base/assets/assets.h"
#include "ballistica/base/graphics/renderer/render_pass.h"
#include "ballistica/base/graphics/support/frame_def.h"
#include "ballistica/shared/foundation/inline.h"
#include "ballistica/ui_v1/python/ui_v1_python.h"
#include "ballistica/ui_v1/widget/button_widget.h"