mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-03 22:14:45 +08:00
added standalone store purchases for infinite onslaught and runaround
This commit is contained in:
parent
d92a665398
commit
ba5b2bb8a6
32
.efrocachemap
generated
32
.efrocachemap
generated
@ -4174,22 +4174,22 @@
|
|||||||
"build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1",
|
"build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1",
|
||||||
"build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718",
|
"build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718",
|
||||||
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
||||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "58555279ef155ef08469b947dedff151",
|
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "cbc3b41cdc03a5ea477ca025087951f3",
|
||||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "81c0cd7183ff6ef61eb9e905b4a4ad1b",
|
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "c04260638a82ecc1a1c24308de1447a6",
|
||||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "5cd672a5ac7f36dd081dc31855599240",
|
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "e2a148fd04337c64310bff6bf458e4d5",
|
||||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "0e6477355f829cecf1a11cdc5ea03c36",
|
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "ae85400edb0f4ed74e4ff984594df42e",
|
||||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "493143b41303596b01d8408eb5f5abd8",
|
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "813cdf1e5773fc376bb0a275a9dd3584",
|
||||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "4de9ba79e3ee63cbc4ade231aad47436",
|
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "4fd874c5c3102c84f2ea951829be2b31",
|
||||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "57e3b03e8b2d8e554a5ccf344e3a0346",
|
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b0a75cc7b7941e23254c42de6b1c68ef",
|
||||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "db9a19303a7488fd9567e9afa82d9b32",
|
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "e98954ee8676031983d30e12ec800a01",
|
||||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "6be26eac367f64772b3e25d01b5186a7",
|
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "4718e53a8e831c7f1f55bd828b747e8e",
|
||||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "f0d23e8ad6070abfc817f368439c1504",
|
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "1789ce6e59d6e15c7e8ba857a3ad6d7e",
|
||||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "1df1651f4ee70a1c13a541ff339a4e84",
|
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "348e2cb791e5e5a76a536d53dfe1a09b",
|
||||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "32ae2768e445c302d492ea7a82ed675a",
|
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "1bfecc981df6fe4f9780a31c45049096",
|
||||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "a2ebb1c973f4053f61b53b5e0d168941",
|
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "8581b9f97a2e4c4c4c64a5dd2db59f20",
|
||||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "c9d7937a16b5796134878744d2d97817",
|
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "88f5af63ea44c416a3e7c5da5cab8a57",
|
||||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "40073949b69d00dbb4cabcc19912de91",
|
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "099f0e4d327dcf301fbb6c016913dec5",
|
||||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "6680c4cedd8b8fe7afacf04d99cbb7dc",
|
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "ce37d95901baf24c70d12a283b8f5b04",
|
||||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "b261c8140179fdaa56deeaff30b12e04",
|
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "b261c8140179fdaa56deeaff30b12e04",
|
||||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "72f521386bbf1ddfdd22b77b75a177fa",
|
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "72f521386bbf1ddfdd22b77b75a177fa",
|
||||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "b261c8140179fdaa56deeaff30b12e04",
|
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "b261c8140179fdaa56deeaff30b12e04",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
### 1.7.37 (build 22197, api 9, 2025-01-17)
|
### 1.7.37 (build 22198, api 9, 2025-01-17)
|
||||||
- Bumping api version to 9. As you'll see below, there's some UI changes that
|
- 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
|
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.
|
touch UI stuff at all you can simply bump your api version and call it a day.
|
||||||
|
|||||||
@ -26,6 +26,7 @@ class StoreSubsystem:
|
|||||||
def get_store_item_name_translated(self, item_name: str) -> babase.Lstr:
|
def get_store_item_name_translated(self, item_name: str) -> babase.Lstr:
|
||||||
"""Return a babase.Lstr for a store item name."""
|
"""Return a babase.Lstr for a store item name."""
|
||||||
# pylint: disable=cyclic-import
|
# pylint: disable=cyclic-import
|
||||||
|
# pylint: disable=too-many-return-statements
|
||||||
item_info = self.get_store_item(item_name)
|
item_info = self.get_store_item(item_name)
|
||||||
if item_name.startswith('characters.'):
|
if item_name.startswith('characters.'):
|
||||||
return babase.Lstr(
|
return babase.Lstr(
|
||||||
@ -46,6 +47,14 @@ class StoreSubsystem:
|
|||||||
return gametype.get_display_string()
|
return gametype.get_display_string()
|
||||||
if item_name.startswith('icons.'):
|
if item_name.startswith('icons.'):
|
||||||
return babase.Lstr(resource='editProfileWindow.iconText')
|
return babase.Lstr(resource='editProfileWindow.iconText')
|
||||||
|
if item_name == 'upgrades.infinite_runaround':
|
||||||
|
return babase.Lstr(
|
||||||
|
translate=('coopLevelNames', 'Infinite Runaround')
|
||||||
|
)
|
||||||
|
if item_name == 'upgrades.infinite_onslaught':
|
||||||
|
return babase.Lstr(
|
||||||
|
translate=('coopLevelNames', 'Infinite Onslaught')
|
||||||
|
)
|
||||||
raise ValueError('unrecognized item: ' + item_name)
|
raise ValueError('unrecognized item: ' + item_name)
|
||||||
|
|
||||||
def get_store_item_display_size(
|
def get_store_item_display_size(
|
||||||
@ -89,6 +98,8 @@ class StoreSubsystem:
|
|||||||
# IMPORTANT - need to keep this synced with the master server.
|
# IMPORTANT - need to keep this synced with the master server.
|
||||||
# (doing so manually for now)
|
# (doing so manually for now)
|
||||||
babase.app.classic.store_items = {
|
babase.app.classic.store_items = {
|
||||||
|
'upgrades.infinite_runaround': {},
|
||||||
|
'upgrades.infinite_onslaught': {},
|
||||||
'characters.kronk': {'character': 'Kronk'},
|
'characters.kronk': {'character': 'Kronk'},
|
||||||
'characters.zoe': {'character': 'Zoe'},
|
'characters.zoe': {'character': 'Zoe'},
|
||||||
'characters.jackmorgan': {'character': 'Jack Morgan'},
|
'characters.jackmorgan': {'character': 'Jack Morgan'},
|
||||||
@ -119,6 +130,10 @@ class StoreSubsystem:
|
|||||||
'gametype': meteorshower.MeteorShowerGame,
|
'gametype': meteorshower.MeteorShowerGame,
|
||||||
'previewTex': 'rampagePreview',
|
'previewTex': 'rampagePreview',
|
||||||
},
|
},
|
||||||
|
'games.infinite_onslaught': {
|
||||||
|
'gametype': meteorshower.MeteorShowerGame,
|
||||||
|
'previewTex': 'rampagePreview',
|
||||||
|
},
|
||||||
'games.target_practice': {
|
'games.target_practice': {
|
||||||
'gametype': targetpractice.TargetPracticeGame,
|
'gametype': targetpractice.TargetPracticeGame,
|
||||||
'previewTex': 'doomShroomPreview',
|
'previewTex': 'doomShroomPreview',
|
||||||
@ -368,6 +383,8 @@ class StoreSubsystem:
|
|||||||
'games.ninja_fight',
|
'games.ninja_fight',
|
||||||
'games.meteor_shower',
|
'games.meteor_shower',
|
||||||
'games.target_practice',
|
'games.target_practice',
|
||||||
|
'upgrades.infinite_onslaught',
|
||||||
|
'upgrades.infinite_runaround',
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
@ -567,6 +584,10 @@ class StoreSubsystem:
|
|||||||
if babase.app.env.gui:
|
if babase.app.env.gui:
|
||||||
for section in self.get_store_layout()['minigames']:
|
for section in self.get_store_layout()['minigames']:
|
||||||
for mname in section['items']:
|
for mname in section['items']:
|
||||||
|
if mname.startswith('upgrades.'):
|
||||||
|
# Ignore things like infinite onslaught which
|
||||||
|
# aren't actually game types.
|
||||||
|
continue
|
||||||
if (
|
if (
|
||||||
plus is None
|
plus is None
|
||||||
or not plus.get_v1_account_product_purchased(mname)
|
or not plus.get_v1_account_product_purchased(mname)
|
||||||
|
|||||||
@ -53,7 +53,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
# Build number and version of the ballistica binary we expect to be
|
# Build number and version of the ballistica binary we expect to be
|
||||||
# using.
|
# using.
|
||||||
TARGET_BALLISTICA_BUILD = 22197
|
TARGET_BALLISTICA_BUILD = 22198
|
||||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -153,70 +153,6 @@ class CoopBrowserWindow(bui.MainWindow):
|
|||||||
edit=self._root_widget, cancel_button=self._back_button
|
edit=self._root_widget, cancel_button=self._back_button
|
||||||
)
|
)
|
||||||
|
|
||||||
# self._league_rank_button: LeagueRankButton | None
|
|
||||||
# self._store_button: StoreButton | None
|
|
||||||
# self._store_button_widget: bui.Widget | None
|
|
||||||
# self._league_rank_button_widget: bui.Widget | None
|
|
||||||
|
|
||||||
# if not app.ui_v1.use_toolbars:
|
|
||||||
# prb = self._league_rank_button = LeagueRankButton(
|
|
||||||
# parent=self._root_widget,
|
|
||||||
# position=(
|
|
||||||
# self._width - (282 + x_inset),
|
|
||||||
# self._height
|
|
||||||
# - 85
|
|
||||||
# - (4 if uiscale is bui.UIScale.SMALL else 0),
|
|
||||||
# ),
|
|
||||||
# size=(100, 60),
|
|
||||||
# color=(0.4, 0.4, 0.9),
|
|
||||||
# textcolor=(0.9, 0.9, 2.0),
|
|
||||||
# scale=1.05,
|
|
||||||
# on_activate_call=bui.WeakCall(
|
|
||||||
# self._switch_to_league_rankings),
|
|
||||||
# )
|
|
||||||
# self._league_rank_button_widget = prb.get_button()
|
|
||||||
|
|
||||||
# sbtn = self._store_button = StoreButton(
|
|
||||||
# parent=self._root_widget,
|
|
||||||
# position=(
|
|
||||||
# self._width - (170 + x_inset),
|
|
||||||
# self._height
|
|
||||||
# - 85
|
|
||||||
# - (4 if uiscale is bui.UIScale.SMALL else 0),
|
|
||||||
# ),
|
|
||||||
# size=(100, 60),
|
|
||||||
# color=(0.6, 0.4, 0.7),
|
|
||||||
# show_tickets=True,
|
|
||||||
# button_type='square',
|
|
||||||
# sale_scale=0.85,
|
|
||||||
# textcolor=(0.9, 0.7, 1.0),
|
|
||||||
# scale=1.05,
|
|
||||||
# on_activate_call=bui.WeakCall(self._switch_to_score, None),
|
|
||||||
# )
|
|
||||||
# self._store_button_widget = sbtn.get_button()
|
|
||||||
# assert self._back_button is not None
|
|
||||||
# bui.widget(
|
|
||||||
# edit=self._back_button,
|
|
||||||
# right_widget=self._league_rank_button_widget,
|
|
||||||
# )
|
|
||||||
# bui.widget(
|
|
||||||
# edit=self._league_rank_button_widget,
|
|
||||||
# left_widget=self._back_button,
|
|
||||||
# )
|
|
||||||
# else:
|
|
||||||
# self._league_rank_button = None
|
|
||||||
# self._store_button = None
|
|
||||||
# self._store_button_widget = None
|
|
||||||
# self._league_rank_button_widget = None
|
|
||||||
|
|
||||||
# Move our corner buttons dynamically to keep them out of the way of
|
|
||||||
# the party icon :-(
|
|
||||||
# self._update_corner_button_positions()
|
|
||||||
# self._update_corner_button_positions_timer = bui.AppTimer(
|
|
||||||
# 1.0, bui.WeakCall(
|
|
||||||
# self._update_corner_button_positions), repeat=True
|
|
||||||
# )
|
|
||||||
|
|
||||||
self._last_tournament_query_time: float | None = None
|
self._last_tournament_query_time: float | None = None
|
||||||
self._last_tournament_query_response_time: float | None = None
|
self._last_tournament_query_response_time: float | None = None
|
||||||
self._doing_tournament_query = False
|
self._doing_tournament_query = False
|
||||||
@ -1076,24 +1012,21 @@ class CoopBrowserWindow(bui.MainWindow):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
# Infinite onslaught/runaround require pro; bring up a store link
|
required_purchase: str | None
|
||||||
# if need be.
|
|
||||||
|
# Infinite onslaught requires pro or the newer standalone
|
||||||
|
# upgrade.
|
||||||
if (
|
if (
|
||||||
game
|
game in ['Challenges:Infinite Runaround']
|
||||||
in (
|
|
||||||
'Challenges:Infinite Runaround',
|
|
||||||
'Challenges:Infinite Onslaught',
|
|
||||||
)
|
|
||||||
and not bui.app.classic.accounts.have_pro()
|
and not bui.app.classic.accounts.have_pro()
|
||||||
):
|
):
|
||||||
if plus.get_v1_account_state() != 'signed_in':
|
required_purchase = 'upgrades.infinite_runaround'
|
||||||
show_sign_in_prompt()
|
elif (
|
||||||
else:
|
game in ['Challenges:Infinite Onslaught']
|
||||||
PurchaseWindow(items=['pro'])
|
and not bui.app.classic.accounts.have_pro()
|
||||||
return
|
):
|
||||||
|
required_purchase = 'upgrades.infinite_onslaught'
|
||||||
required_purchase: str | None
|
elif game in ['Challenges:Meteor Shower']:
|
||||||
if game in ['Challenges:Meteor Shower']:
|
|
||||||
required_purchase = 'games.meteor_shower'
|
required_purchase = 'games.meteor_shower'
|
||||||
elif game in [
|
elif game in [
|
||||||
'Challenges:Target Practice',
|
'Challenges:Target Practice',
|
||||||
|
|||||||
@ -234,12 +234,22 @@ class GameButton:
|
|||||||
assert bui.app.classic is not None
|
assert bui.app.classic is not None
|
||||||
if (
|
if (
|
||||||
(
|
(
|
||||||
game
|
game in ('Challenges:Infinite Runaround',)
|
||||||
in (
|
and not (
|
||||||
'Challenges:Infinite Runaround',
|
bui.app.classic.accounts.have_pro()
|
||||||
'Challenges:Infinite Onslaught',
|
or plus.get_v1_account_product_purchased(
|
||||||
|
'upgrades.infinite_runaround'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
or (
|
||||||
|
game in ('Challenges:Infinite Onslaught',)
|
||||||
|
and not (
|
||||||
|
bui.app.classic.accounts.have_pro()
|
||||||
|
or plus.get_v1_account_product_purchased(
|
||||||
|
'upgrades.infinite_onslaught'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
and not bui.app.classic.accounts.have_pro()
|
|
||||||
)
|
)
|
||||||
or (
|
or (
|
||||||
game in ('Challenges:Meteor Shower',)
|
game in ('Challenges:Meteor Shower',)
|
||||||
|
|||||||
@ -26,7 +26,7 @@ class ResourceTypeInfoWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 0.7
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 570
|
self._width = 570
|
||||||
|
|||||||
@ -76,7 +76,7 @@ def instantiate_store_item_display(
|
|||||||
tint_color = None
|
tint_color = None
|
||||||
tint2_color = None
|
tint2_color = None
|
||||||
tex_name: str | None = None
|
tex_name: str | None = None
|
||||||
desc: str | None = None
|
desc: bui.Lstr | None = None
|
||||||
modes: bui.Lstr | None = None
|
modes: bui.Lstr | None = None
|
||||||
|
|
||||||
if item_name.startswith('characters.'):
|
if item_name.startswith('characters.'):
|
||||||
@ -151,6 +151,30 @@ def instantiate_store_item_display(
|
|||||||
base_text_scale = 0.8
|
base_text_scale = 0.8
|
||||||
title_v = 0.48
|
title_v = 0.48
|
||||||
price_v = 0.17
|
price_v = 0.17
|
||||||
|
elif item_name == 'upgrades.infinite_runaround':
|
||||||
|
base_text_scale = 0.8
|
||||||
|
desc = bui.Lstr(
|
||||||
|
translate=(
|
||||||
|
'gameDescriptions',
|
||||||
|
'Prevent enemies from reaching the exit.',
|
||||||
|
)
|
||||||
|
)
|
||||||
|
modes = bui.Lstr(resource='playModes.coopText')
|
||||||
|
tex_name = 'towerDPreview'
|
||||||
|
title_v = 0.48
|
||||||
|
price_v = 0.17
|
||||||
|
elif item_name == 'upgrades.infinite_onslaught':
|
||||||
|
base_text_scale = 0.8
|
||||||
|
desc = bui.Lstr(
|
||||||
|
translate=(
|
||||||
|
'gameDescriptions',
|
||||||
|
'Defeat all enemies.',
|
||||||
|
)
|
||||||
|
)
|
||||||
|
modes = bui.Lstr(resource='playModes.coopText')
|
||||||
|
tex_name = 'doomShroomPreview'
|
||||||
|
title_v = 0.48
|
||||||
|
price_v = 0.17
|
||||||
|
|
||||||
elif item_name.startswith('icons.'):
|
elif item_name.startswith('icons.'):
|
||||||
base_text_scale = 1.5
|
base_text_scale = 1.5
|
||||||
@ -512,7 +536,10 @@ def instantiate_store_item_display(
|
|||||||
texture=bui.gettexture(tex_name),
|
texture=bui.gettexture(tex_name),
|
||||||
)
|
)
|
||||||
|
|
||||||
if item_name.startswith('games.'):
|
if item_name.startswith('games.') or item_name in (
|
||||||
|
'upgrades.infinite_runaround',
|
||||||
|
'upgrades.infinite_onslaught',
|
||||||
|
):
|
||||||
frame_size = b_width * 0.8
|
frame_size = b_width * 0.8
|
||||||
im_dim = frame_size * (100.0 / 113.0)
|
im_dim = frame_size * (100.0 / 113.0)
|
||||||
im_pos = (
|
im_pos = (
|
||||||
|
|||||||
@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
|
|||||||
namespace ballistica {
|
namespace ballistica {
|
||||||
|
|
||||||
// These are set automatically via script; don't modify them here.
|
// These are set automatically via script; don't modify them here.
|
||||||
const int kEngineBuildNumber = 22197;
|
const int kEngineBuildNumber = 22198;
|
||||||
const char* kEngineVersion = "1.7.37";
|
const char* kEngineVersion = "1.7.37";
|
||||||
const int kEngineApiVersion = 9;
|
const int kEngineApiVersion = 9;
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user