diff --git a/.efrocachemap b/.efrocachemap index e07d058e..5cf26acb 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4072,26 +4072,26 @@ "build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/18/4b/787a9267e17be3c49966072581a5", "build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/20/f6/4ce9bc3c1f3732f6adf8237fbe9b", "build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/a5/30/9058181df0b1255bf6950cbc7813", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/0f/96/2c1115507d811a9700c9a189d0ff", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/10/bc/042bcd64c7c25812495f32ffe676", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7c/4a/3ebed71b2d5ec2426d410d349d90", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/1a/62/201368775081eacc28f2e9b01f9a", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/8f/38/acfc4a64d6b5bf22ef6fe4178c5e", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/c9/46/e9e737f0b53afc1dc4210c32109c", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/89/21/242947b6f7473e6c4086650e7ab3", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/f1/f1/60763fedeabfb36963d1f04c4992", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/5c/40/a6477683bc54386dd4f55f0a3dc3", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/43/5a/4821729b6acff1e5c9b966773d51", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/29/90/a9e78e8dc092013bacad27224d31", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/4b/87/0cb2824755db706d9a70db93aff1", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/80/7c/944dbaaadd92e156673e05189c65", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/9d/dd/359445178c190356c0c44ed3205f", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a9/a6/3c1cad0e6e1d73b05f20032f740f", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/b1/3b/afbdc71a34c16199751dacbf733c", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/a1/52/deaef111e5a2c310ea588d670043", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/53/2e/ab897b1d065a3f0fc45e02513a34", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/13/08/8cbaefd2b09209559ccb98570253", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/87/ce/b99cff2d428e327c64e4bdf8b0c3", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/0a/46/91ca508cbeed208a843051e2dd44", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/9d/6d/5c29c1daa7f8d012165cc5850970", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/98/15/6d112a76c2621270eebfa0d41d41", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/b0/29/ffc80f727678230bbf0c423e7297", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/bf/b5/f7463f466d56d60a03f48bd265b5", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/e1/d3/d89d132668d5cbe05125301ef38c", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/bc/c6/461acc367ed90d2b403e1b673b7b", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/58/2c/b047879f403817194bc6f79a0fce", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/bb/ba/c1eeae83b120a59ce9312eda9733", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/de/12/ea3cc82b1e5960772f87dbe4621f", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/13/d9/b7d57e64e638b6b52075a66348e1", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/42/e5/fe64bd83c2faea45f5ab381a877e", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/e6/69/62730a6181364505dd99d1d5ba35", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/23/4e/81d431d0fcdbb00d15929cb320de", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/15/b8/40e1bf4a69526deda598244ad076", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/06/a8/f647caceb86742fc9c3aa792461b", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/62/b7/bfc41a4dacc93efc06cd66a79a9e", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/2e/1e/71014a4afbb0a51b31f1fe32a7ea", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/06/e7/6a2bc824b3d0779bc6a44b35c385", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/84/f9/7325eb081c11855279a7325f2887", "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/29/dc/e5b08aae2dbe3222082aaa1e90e7", "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ce/bb/5796a83ce9d1c9cf58e08f3ff351", "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/31/65/014221e46f7974f40aa84c8922dc", @@ -4108,14 +4108,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/14/4b/68a0ece3c1f191183b695cf45a4d", "build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/1f/3f/d899a46cc0dc8bc4f1b38f9318a5", "build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/de/99/95fdcb3f614a7b83ada148bca38d", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/ef/d4/f49c526f2344ce7618c41a441287", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/0f/ec/2f13d6e6c702e18622bdfe931072", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/02/a9/4a4121ab7aa9c9855b047c00f6ab", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/59/41/f357e7726c85efd014597d2c36a9", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/a5/50/10ccb7ec0caca05a8151bf1da3c4", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/fd/c1/a5372ecd9a97190391425a061278", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/10/dd/5b6e16ab1252afaf1b317af27124", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/dd/2c/9c4760956a5d62bbee8f6921d0fa", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/4d/7d/3ac86a57c057bc1bcbab947efe8f", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/60/ff/74b3448ddc7d6eef59636bcdc9cf", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/8e/11/0351c34c7802b117a64b1259b803", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/dd/fb/29dac3b226278bda83a0307da6c5", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/ea/0e/d94c51c5073046744f60f97676f0", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/22/99/afc81733059e2a279dcdd7aa1028", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/a8/ff/96cf25517f8dbf517e3307e5cd94", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/ab/12/871570dfcf52950fe64a071fb008", "src/assets/ba_data/python/babase/_mgen/__init__.py": "https://files.ballistica.net/cache/ba1/52/c6/c11130af7b10d6c0321add5518fa", "src/assets/ba_data/python/babase/_mgen/enums.py": "https://files.ballistica.net/cache/ba1/38/c3/1dedd5e74f2508efc5974c8815a1", "src/ballistica/base/mgen/pyembed/binding_base.inc": "https://files.ballistica.net/cache/ba1/ea/6a/6a4721b144e5e297b542d2a0eea2", diff --git a/CHANGELOG.md b/CHANGELOG.md index 006898b2..dcc326f0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.20 (build 21102, api 8, 2023-06-14) +### 1.7.20 (build 21104, api 8, 2023-06-14) - This seems like a good time for a `refactoring` release in anticipation of changes coming in 1.8. Basically this means that a lot of things will be diff --git a/config/spinoffconfig.py b/config/spinoffconfig.py index f85e290f..4e22a1dc 100644 --- a/config/spinoffconfig.py +++ b/config/spinoffconfig.py @@ -97,6 +97,8 @@ ctx.src_unchecked_paths = { 'ballisticakit-android/BallisticaKit/src/*/assets', 'ballisticakit-android/local.properties', 'ballisticakit-android/.gradle', + 'ballisticakit-android/build', + 'ballisticakit-android/BallisticaKit/build', } # Paths/names/suffixes we consider 'project' files. diff --git a/src/assets/ba_data/python/babase/__init__.py b/src/assets/ba_data/python/babase/__init__.py index 716059da..79f54ca0 100644 --- a/src/assets/ba_data/python/babase/__init__.py +++ b/src/assets/ba_data/python/babase/__init__.py @@ -1,103 +1,104 @@ # Released under the MIT License. See LICENSE for details. # -"""The public face of Ballistica. +"""Common shared ballistica components. -This top level module is a collection of most commonly used functionality. -For many modding purposes, the bits exposed here are all you'll need. -In some specific cases you may need to pull in individual submodules instead. +Often this package does not need to be used directly. Instead one can +use versioned packages such as bascenev1 or bauiv1 which reexpose a more +focused set of the stuff contained here. """ # pylint: disable=redefined-builtin +# 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 +# things from this package's submodules directly to reduce the chance of +# dependency loops. The exception is TYPE_CHECKING blocks and +# annotations since those aren't evaluated at runtime. + from efro.util import set_canonical_module_names import _babase from _babase import ( - have_chars, - android_get_external_files_dir, - is_os_playing_music, - getsimplesound, - music_player_set_volume, - music_player_play, - music_player_stop, - music_player_shutdown, - mac_music_app_init, - mac_music_app_get_volume, - mac_music_app_get_library_source, - mac_music_app_stop, - mac_music_app_set_volume, - mac_music_app_get_playlists, - mac_music_app_play_playlist, - set_thread_name, - show_progress_bar, - print_load_info, - reload_media, - set_stress_testing, - get_max_graphics_quality, add_clean_frame_callback, - has_gamma_control, - get_string_width, - get_string_height, - get_low_level_config_value, - set_low_level_config_value, - request_permission, - have_permission, - increment_analytics_count, - fade_screen, - env, - SimpleSound, - ContextRef, - ContextCall, + android_get_external_files_dir, + appname, + appnameupper, apptime, apptimer, AppTimer, + charstr, + clipboard_get_text, + clipboard_has_text, + clipboard_is_supported, + clipboard_set_text, + ContextCall, + ContextRef, displaytime, displaytimer, DisplayTimer, - Vec3, do_once, - screenmessage, + env, + fade_screen, + get_display_resolution, + get_low_level_config_value, + get_max_graphics_quality, + get_replays_dir, + get_string_height, + get_string_width, + getsimplesound, + has_gamma_control, + have_chars, + have_permission, + in_logic_thread, + increment_analytics_count, + is_os_playing_music, + is_running_on_fire_tv, + is_xcode_build, + lock_all_input, + mac_music_app_get_library_source, + mac_music_app_get_playlists, + mac_music_app_get_volume, + mac_music_app_init, + mac_music_app_play_playlist, + mac_music_app_set_volume, + mac_music_app_stop, + music_player_play, + music_player_set_volume, + music_player_shutdown, + music_player_stop, + native_stack_trace, + print_load_info, pushcall, quit, + reload_media, + request_permission, safecolor, + screenmessage, set_analytics_screen, - charstr, - clipboard_is_supported, - clipboard_has_text, - clipboard_get_text, - clipboard_set_text, - in_logic_thread, - native_stack_trace, - lock_all_input, - unlock_all_input, - appname, - appnameupper, + set_low_level_config_value, + set_stress_testing, + set_thread_name, set_ui_input_device, - is_running_on_fire_tv, - get_replays_dir, + show_progress_bar, + SimpleSound, + unlock_all_input, + Vec3, workspaces_in_use, - is_xcode_build, - get_display_resolution, ) -from babase._login import LoginAdapter +from babase._accountv2 import AccountV2Handle, AccountV2Subsystem +from babase._app import App from babase._appconfig import commit_app_config from babase._appintent import AppIntent, AppIntentDefault, AppIntentExec from babase._appmode import AppMode from babase._appsubsystem import AppSubsystem -from babase._accountv2 import AccountV2Handle, AccountV2Subsystem -from babase._plugin import PotentialPlugin, Plugin, PluginSubsystem -from babase._app import App -from babase._cloud import CloudSubsystem -from babase._net import get_ip_address_type - -# noinspection PyProtectedMember -# (PyCharm inspection bug?) -from babase._mgen.enums import ( - Permission, - SpecialChar, - InputType, - UIScale, +from babase._appconfig import AppConfig +from babase._apputils import ( + handle_leftover_v1_cloud_log_file, + is_browser_likely_available, + garbage_collect, + get_remote_app_name, ) +from babase._cloud import CloudSubsystem from babase._error import ( print_exception, print_error, @@ -116,15 +117,6 @@ from babase._error import ( SessionNotFoundError, DelegateNotFoundError, ) - -from babase._language import Lstr, LanguageSubsystem -from babase._appconfig import AppConfig -from babase._apputils import ( - handle_leftover_v1_cloud_log_file, - is_browser_likely_available, - garbage_collect, - get_remote_app_name, -) from babase._general import ( utf8_all, DisplayTime, @@ -140,48 +132,116 @@ from babase._general import ( json_prep, ) from babase._keyboard import Keyboard +from babase._language import Lstr, LanguageSubsystem +from babase._login import LoginAdapter + +# noinspection PyProtectedMember +# (PyCharm inspection bug?) +from babase._mgen.enums import ( + Permission, + SpecialChar, + InputType, + UIScale, +) from babase._math import normalized_color, is_point_in_box, vec3validate from babase._meta import MetadataSubsystem +from babase._net import get_ip_address_type +from babase._plugin import PotentialPlugin, Plugin, PluginSubsystem from babase._text import timestring _babase.app = app = App() app.postinit() __all__ = [ - 'set_thread_name', - 'app', 'AccountV2Handle', 'AccountV2Subsystem', 'ActivityNotFoundError', 'ActorNotFoundError', + 'add_clean_frame_callback', + 'android_get_external_files_dir', + 'app', 'app', 'App', 'AppConfig', + 'AppIntent', + 'AppIntentDefault', + 'AppIntentExec', + 'AppMode', + 'appname', + 'appnameupper', + 'AppSubsystem', + 'apptime', + 'AppTime', + 'apptime', + 'apptimer', + 'AppTimer', 'Call', 'charstr', 'clipboard_get_text', 'clipboard_has_text', 'clipboard_is_supported', 'clipboard_set_text', + 'CloudSubsystem', + 'commit_app_config', 'ContextCall', 'ContextError', - 'CloudSubsystem', + 'ContextRef', 'DelegateNotFoundError', + 'DisplayTime', + 'displaytime', + 'displaytimer', + 'DisplayTimer', 'do_once', + 'env', 'Existable', 'existing', + 'fade_screen', 'garbage_collect', + 'get_display_resolution', + 'get_ip_address_type', + 'get_low_level_config_value', + 'get_max_graphics_quality', + 'get_remote_app_name', + 'get_replays_dir', + 'get_string_height', + 'get_string_width', + 'get_type_name', 'getclass', + 'getsimplesound', + 'handle_leftover_v1_cloud_log_file', + 'has_gamma_control', + 'have_chars', + 'have_permission', 'in_logic_thread', + 'increment_analytics_count', 'InputDeviceNotFoundError', 'InputType', 'is_browser_likely_available', + 'is_browser_likely_available', + 'is_os_playing_music', 'is_point_in_box', + 'is_running_on_fire_tv', + 'is_xcode_build', + 'json_prep', 'Keyboard', 'LanguageSubsystem', + 'lock_all_input', + 'LoginAdapter', 'Lstr', + 'mac_music_app_get_library_source', + 'mac_music_app_get_playlists', + 'mac_music_app_get_volume', + 'mac_music_app_init', + 'mac_music_app_play_playlist', + 'mac_music_app_set_volume', + 'mac_music_app_stop', 'MapNotFoundError', 'MetadataSubsystem', + 'music_player_play', + 'music_player_set_volume', + 'music_player_shutdown', + 'music_player_stop', + 'native_stack_trace', 'NodeNotFoundError', 'normalized_color', 'NotFoundError', @@ -192,91 +252,36 @@ __all__ = [ 'PotentialPlugin', 'print_error', 'print_exception', + 'print_load_info', 'pushcall', 'quit', + 'reload_media', + 'request_permission', 'safecolor', + 'screenmessage', 'SessionNotFoundError', 'SessionPlayerNotFoundError', 'SessionTeamNotFoundError', 'set_analytics_screen', + 'set_low_level_config_value', + 'set_stress_testing', + 'set_thread_name', + 'set_ui_input_device', + 'show_progress_bar', + 'SimpleSound', 'SpecialChar', 'storagename', 'TeamNotFoundError', - 'apptime', 'timestring', 'UIScale', + 'unlock_all_input', + 'utf8_all', 'Vec3', 'vec3validate', 'verify_object_death', 'WeakCall', 'WidgetNotFoundError', - 'AppTime', - 'apptime', - 'apptimer', - 'AppTimer', - 'SimpleSound', - 'ContextRef', - 'DisplayTime', - 'displaytimer', - 'displaytime', - 'DisplayTimer', - 'AppIntent', - 'AppIntentDefault', - 'AppIntentExec', - 'AppMode', - 'AppSubsystem', - 'screenmessage', - 'native_stack_trace', - 'env', - 'lock_all_input', - 'unlock_all_input', - 'appname', - 'appnameupper', - 'commit_app_config', - 'get_ip_address_type', - 'get_type_name', - 'fade_screen', - 'set_ui_input_device', - 'is_running_on_fire_tv', - 'get_replays_dir', - 'increment_analytics_count', 'workspaces_in_use', - 'request_permission', - 'have_permission', - 'get_low_level_config_value', - 'set_low_level_config_value', - 'is_xcode_build', - 'get_string_width', - 'get_string_height', - 'has_gamma_control', - 'add_clean_frame_callback', - 'get_max_graphics_quality', - 'get_display_resolution', - 'LoginAdapter', - 'get_remote_app_name', - 'is_browser_likely_available', - 'json_prep', - 'set_stress_testing', - 'reload_media', - 'print_load_info', - 'show_progress_bar', - 'handle_leftover_v1_cloud_log_file', - 'music_player_set_volume', - 'music_player_play', - 'music_player_stop', - 'music_player_shutdown', - 'mac_music_app_init', - 'mac_music_app_get_volume', - 'mac_music_app_get_library_source', - 'mac_music_app_stop', - 'mac_music_app_set_volume', - 'mac_music_app_get_playlists', - 'mac_music_app_play_playlist', - 'utf8_all', - 'getsimplesound', - 'is_os_playing_music', - 'android_get_external_files_dir', - 'have_chars', ] # We want stuff to show up as babase.Foo instead of babase._sub.Foo. diff --git a/src/assets/ba_data/python/baclassic/__init__.py b/src/assets/ba_data/python/baclassic/__init__.py index 23f4393b..51f50da5 100644 --- a/src/assets/ba_data/python/baclassic/__init__.py +++ b/src/assets/ba_data/python/baclassic/__init__.py @@ -2,18 +2,18 @@ # """Classic ballistica components. -This stuff is mostly used in the classic app-mode, old UIs, etc. -The app should be able to function cleanly without this package present -(just lacking classic mode functionality). +This package is used as a 'dumping ground' for functionality that is +necessary to keep legacy parts of the app working, but which may no +longer be the best way to do things going forward. -New code should try to avoid using code here if it wants to be usable -with newer more modern app-modes/etc. +New code should try to avoid using code from here when possible. -Functionality in this package should be exposed through the ClassicSubsystem -class instance whenever possible. This will allow type-checked code to -go through babase.app.classic which will force it to properly handle the case -where babase.app.classic is None. When code instead imports classic submodules -directly, it will most likely not work without classic present. +Functionality in this package should be exposed through the +ClassicSubsystem. This allows type-checked code to go through the +babase.app.classic singleton which forces it to explicitly handle the +possibility of babase.app.classic being None. When code instead imports +classic submodules directly, it is much harder to make it cleanly handle +classic not being present. """ # ba_meta require api 8 diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 3eaea64e..491c73b9 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -28,7 +28,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21102 +TARGET_BALLISTICA_BUILD = 21104 TARGET_BALLISTICA_VERSION = '1.7.20' _g_env_config: EnvConfig | None = None diff --git a/src/assets/ba_data/python/baplus/__init__.py b/src/assets/ba_data/python/baplus/__init__.py index e2ff4250..dd2e4cb3 100644 --- a/src/assets/ba_data/python/baplus/__init__.py +++ b/src/assets/ba_data/python/baplus/__init__.py @@ -1,6 +1,13 @@ # Released under the MIT License. See LICENSE for details. # -"""Closed-source bits of ballistica.""" +"""Closed-source bits of ballistica. + +This code concerns sensitive things like accounts and master-server +communication so the native C++ parts of it remain closed. Native +precompiled static libraries of this portion are provided for those who +want to compile the rest of the engine, and a fully open-source engine +can also be built by removing this 'plus' feature-set. +""" from __future__ import annotations diff --git a/src/assets/ba_data/python/bascenev1/__init__.py b/src/assets/ba_data/python/bascenev1/__init__.py index 447579ed..57be130b 100644 --- a/src/assets/ba_data/python/bascenev1/__init__.py +++ b/src/assets/ba_data/python/bascenev1/__init__.py @@ -4,13 +4,11 @@ # ba_meta require api 8 -# 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 -# from 'if TYPE_CHECKING' blocks (which will not exec at runtime). -# Code within our package should import things directly from their -# submodules. - -from __future__ import annotations +# 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 +# things from this package's submodules directly to reduce the chance of +# dependency loops. The exception is TYPE_CHECKING blocks and +# annotations since those aren't evaluated at runtime. import logging @@ -60,358 +58,356 @@ from babase import ( ) from _bascenev1 import ( - set_internal_music, - set_master_server_source, - get_foreground_host_session, - get_foreground_host_activity, - get_game_roster, - set_debug_speed_exponent, - get_replay_speed_exponent, - set_replay_speed_exponent, - reset_random_player_names, - get_random_names, - screenmessage, - set_public_party_stats_url, - set_admins, - set_enable_default_kick_voting, - have_connected_clients, - is_in_replay, - client_info_query_response, - disconnect_from_host, - set_public_party_queue_enabled, - set_public_party_max_size, - set_authenticate_clients, - set_public_party_enabled, - get_game_port, - set_public_party_name, - get_public_party_enabled, - get_public_party_max_size, - connect_to_party, - host_scan_cycle, - end_host_scanning, - set_touchscreen_editing, - get_ui_input_device, - get_local_active_input_devices_count, - have_touchscreen_input, - capture_keyboard_input, - release_keyboard_input, - capture_gamepad_input, - release_gamepad_input, - newactivity, - set_map_bounds, - get_connection_to_host_info, - newnode, - new_replay_session, - new_host_session, - getsession, - InputDevice, - SessionPlayer, - Material, ActivityData, - camerashake, - emitfx, - ls_objects, - ls_input_devices, - CollisionMesh, - getcollisionmesh, - Data, - getdata, - Mesh, - getmesh, - SessionData, - Sound, - getsound, - getnodes, - printnodes, - getactivity, - time, - timer, - Node, - Texture, - Timer, - gettexture, - getinputdevice, - disconnect_client, - chatmessage, - get_chat_messages, basetime, basetimer, BaseTimer, + camerashake, + capture_gamepad_input, + capture_keyboard_input, + chatmessage, + client_info_query_response, + CollisionMesh, + connect_to_party, + Data, + disconnect_client, + disconnect_from_host, + emitfx, + end_host_scanning, + get_chat_messages, + get_connection_to_host_info, + get_foreground_host_activity, + get_foreground_host_session, + get_game_port, + get_game_roster, + get_local_active_input_devices_count, + get_public_party_enabled, + get_public_party_max_size, + get_random_names, + get_replay_speed_exponent, + get_ui_input_device, + getactivity, + getcollisionmesh, + getdata, + getinputdevice, + getmesh, + getnodes, + getsession, + getsound, + gettexture, + have_connected_clients, + have_touchscreen_input, + host_scan_cycle, + InputDevice, + is_in_replay, + ls_input_devices, + ls_objects, + Material, + Mesh, + new_host_session, + new_replay_session, + newactivity, + newnode, + Node, + printnodes, + release_gamepad_input, + release_keyboard_input, + reset_random_player_names, + screenmessage, + SessionData, + SessionPlayer, + set_admins, + set_authenticate_clients, + set_debug_speed_exponent, + set_enable_default_kick_voting, + set_internal_music, + set_map_bounds, + set_master_server_source, + set_public_party_enabled, + set_public_party_max_size, + set_public_party_name, + set_public_party_queue_enabled, + set_public_party_stats_url, + set_replay_speed_exponent, + set_touchscreen_editing, + Sound, + Texture, + time, + timer, + Timer, ) -from bascenev1._profile import ( - get_player_colors, - get_player_profile_icon, - get_player_profile_colors, -) -from bascenev1._map import get_map_display_string -from bascenev1._campaign import init_campaigns +from bascenev1._activity import Activity +from bascenev1._activitytypes import JoinActivity, ScoreScreenActivity +from bascenev1._actor import Actor from bascenev1._appmode import SceneV1AppMode -from bascenev1._session import Session -from bascenev1._map import Map, register_map +from bascenev1._campaign import init_campaigns, Campaign +from bascenev1._collision import Collision, getcollision +from bascenev1._coopgame import CoopGameActivity from bascenev1._coopsession import CoopSession from bascenev1._debug import print_live_object_warnings -from bascenev1._multiteamsession import MultiTeamSession -from bascenev1._coopgame import CoopGameActivity -from bascenev1._freeforallsession import FreeForAllSession -from bascenev1._gameactivity import GameActivity -from bascenev1._score import ScoreType, ScoreConfig -from bascenev1._dualteamsession import DualTeamSession -from bascenev1._lobby import Lobby, Chooser -from bascenev1._campaign import Campaign -from bascenev1._level import Level -from bascenev1._messages import ( - UNHANDLED, - OutOfBoundsMessage, - DeathType, - DieMessage, - PlayerDiedMessage, - StandMessage, - PickUpMessage, - DropMessage, - PickedUpMessage, - DroppedMessage, - ShouldShatterMessage, - ImpactDamageMessage, - FreezeMessage, - ThawMessage, - HitMessage, - CelebrateMessage, -) -from bascenev1._player import PlayerInfo, Player, EmptyPlayer, StandLocation -from bascenev1._activity import Activity -from bascenev1._actor import Actor -from bascenev1._gameresults import GameResults -from bascenev1._nodeactor import NodeActor -from bascenev1._collision import Collision, getcollision -from bascenev1._powerup import PowerupMessage, PowerupAcceptMessage -from bascenev1._team import SessionTeam, Team, EmptyTeam -from bascenev1._gameutils import ( - Time, - BaseTime, - GameTip, - animate, - animate_array, - show_damage_count, - cameraflash, -) -from bascenev1._teamgame import TeamGameActivity -from bascenev1._stats import PlayerScoredMessage, PlayerRecord, Stats -from bascenev1._settings import ( - Setting, - IntSetting, - FloatSetting, - ChoiceSetting, - BoolSetting, - IntChoiceSetting, - FloatChoiceSetting, -) -from bascenev1._activitytypes import JoinActivity, ScoreScreenActivity -from bascenev1._music import MusicType, setmusic from bascenev1._dependency import ( Dependency, DependencyComponent, DependencySet, AssetPackage, ) -from bascenev1._gameutils import get_trophy_string +from bascenev1._dualteamsession import DualTeamSession +from bascenev1._freeforallsession import FreeForAllSession +from bascenev1._gameactivity import GameActivity +from bascenev1._gameresults import GameResults +from bascenev1._gameutils import ( + animate, + animate_array, + BaseTime, + cameraflash, + GameTip, + get_trophy_string, + show_damage_count, + Time, +) +from bascenev1._level import Level +from bascenev1._lobby import Lobby, Chooser +from bascenev1._map import Map, register_map, get_map_display_string +from bascenev1._messages import ( + CelebrateMessage, + DeathType, + DieMessage, + DropMessage, + DroppedMessage, + FreezeMessage, + HitMessage, + ImpactDamageMessage, + OutOfBoundsMessage, + PickedUpMessage, + PickUpMessage, + PlayerDiedMessage, + ShouldShatterMessage, + StandMessage, + ThawMessage, + UNHANDLED, +) +from bascenev1._multiteamsession import MultiTeamSession +from bascenev1._music import MusicType, setmusic +from bascenev1._nodeactor import NodeActor +from bascenev1._profile import ( + get_player_colors, + get_player_profile_icon, + get_player_profile_colors, +) +from bascenev1._player import PlayerInfo, Player, EmptyPlayer, StandLocation +from bascenev1._powerup import PowerupMessage, PowerupAcceptMessage +from bascenev1._score import ScoreType, ScoreConfig +from bascenev1._settings import ( + BoolSetting, + ChoiceSetting, + FloatChoiceSetting, + FloatSetting, + IntChoiceSetting, + IntSetting, + Setting, +) +from bascenev1._session import Session +from bascenev1._stats import PlayerScoredMessage, PlayerRecord, Stats +from bascenev1._team import SessionTeam, Team, EmptyTeam +from bascenev1._teamgame import TeamGameActivity __all__ = [ - 'set_internal_music', - 'get_trophy_string', - 'app', - 'get_local_active_input_devices_count', - 'lock_all_input', - 'unlock_all_input', - 'getinputdevice', - 'Session', - 'Map', - 'CoopSession', - 'MultiTeamSession', - 'CoopGameActivity', - 'print_live_object_warnings', - 'FreeForAllSession', - 'GameActivity', - 'ScoreType', - 'ScoreConfig', - 'DualTeamSession', - 'UNHANDLED', - 'OutOfBoundsMessage', - 'DeathType', - 'DieMessage', - 'DropMessage', - 'DroppedMessage', - 'FreezeMessage', - 'HitMessage', - 'ImpactDamageMessage', - 'Node', - 'PickedUpMessage', - 'PickUpMessage', - 'PlayerDiedMessage', - 'ShouldShatterMessage', - 'StandMessage', - 'ThawMessage', - 'CelebrateMessage', - 'EmptyPlayer', - 'Player', - 'PlayerInfo', - 'StandLocation', 'Activity', + 'ActivityData', 'Actor', - 'GameResults', - 'NodeActor', - 'Collision', - 'getcollision', - 'PowerupMessage', - 'PowerupAcceptMessage', - 'SessionTeam', - 'Team', - 'EmptyTeam', - 'GameTip', 'animate', 'animate_array', - 'show_damage_count', - 'cameraflash', - 'TeamGameActivity', - 'PlayerScoredMessage', - 'PlayerRecord', - 'Stats', - 'Setting', - 'IntSetting', - 'FloatSetting', - 'ChoiceSetting', - 'BoolSetting', - 'IntChoiceSetting', - 'FloatChoiceSetting', - 'JoinActivity', - 'ScoreScreenActivity', - 'MusicType', - 'setmusic', - 'newnode', - 'new_host_session', - 'getsession', - 'get_foreground_host_session', - 'get_foreground_host_activity', - 'InputDevice', - 'SessionPlayer', - 'Material', - 'ActivityData', - 'camerashake', - 'emitfx', - 'ls_objects', - 'ls_input_devices', - 'CollisionMesh', - 'getcollisionmesh', - 'Dependency', - 'DependencyComponent', - 'AssetPackage', - 'DependencySet', - 'Data', - 'getdata', - 'Mesh', - 'getmesh', - 'SessionData', - 'Sound', - 'getsound', - 'getnodes', - 'printnodes', - 'getactivity', - 'time', - 'timer', - 'Texture', - 'Vec3', - 'NotFoundError', - 'NodeNotFoundError', - 'Timer', - 'Lstr', - 'gettexture', - 'WeakCall', - 'Call', - 'new_replay_session', - 'increment_analytics_count', - 'set_analytics_screen', - 'set_debug_speed_exponent', - 'screenmessage', - 'InputType', - 'UIScale', - 'pushcall', - 'is_point_in_box', - 'safecolor', - 'storagename', - 'timestring', - 'get_game_roster', - 'disconnect_client', - 'get_connection_to_host_info', - 'chatmessage', - 'get_chat_messages', - 'existing', - 'set_map_bounds', - 'normalized_color', - 'get_remote_app_name', - 'newactivity', - 'ContextError', - 'fade_screen', - 'capture_keyboard_input', - 'release_keyboard_input', - 'capture_gamepad_input', - 'release_gamepad_input', - 'have_touchscreen_input', - 'get_ui_input_device', - 'set_touchscreen_editing', - 'end_host_scanning', - 'host_scan_cycle', - 'connect_to_party', - 'get_public_party_enabled', - 'get_public_party_max_size', - 'set_public_party_name', - 'get_game_port', - 'set_public_party_enabled', - 'set_authenticate_clients', - 'set_public_party_max_size', - 'set_public_party_queue_enabled', - 'disconnect_from_host', - 'client_info_query_response', - 'is_in_replay', - 'have_connected_clients', - 'set_enable_default_kick_voting', - 'set_admins', - 'set_public_party_stats_url', - 'get_random_names', - 'reset_random_player_names', - 'get_replay_speed_exponent', - 'set_replay_speed_exponent', - 'set_debug_speed_exponent', - 'get_game_roster', - 'AppTime', - 'apptime', - 'apptimer', - 'AppTimer', - 'ContextRef', - 'basetime', - 'basetimer', - 'BaseTimer', - 'displaytime', - 'DisplayTime', - 'displaytimer', - 'DisplayTimer', - 'Time', - 'BaseTime', + 'app', 'AppIntent', 'AppIntentDefault', 'AppIntentExec', 'AppMode', - 'SceneV1AppMode', - 'Lobby', - 'Chooser', + 'AppTime', + 'apptime', + 'apptimer', + 'AppTimer', + 'AssetPackage', + 'basetime', + 'BaseTime', + 'basetimer', + 'BaseTimer', + 'BoolSetting', + 'Call', + 'cameraflash', + 'camerashake', 'Campaign', - 'Level', - 'Plugin', - 'get_player_colors', - 'get_player_profile_icon', - 'get_player_profile_colors', - 'set_master_server_source', - 'init_campaigns', - 'register_map', + 'capture_gamepad_input', + 'capture_keyboard_input', + 'CelebrateMessage', + 'chatmessage', + 'ChoiceSetting', + 'Chooser', + 'client_info_query_response', + 'Collision', + 'CollisionMesh', + 'connect_to_party', + 'ContextError', + 'ContextRef', + 'CoopGameActivity', + 'CoopSession', + 'Data', + 'DeathType', + 'Dependency', + 'DependencyComponent', + 'DependencySet', + 'DieMessage', + 'disconnect_client', + 'disconnect_from_host', + 'displaytime', + 'DisplayTime', + 'displaytimer', + 'DisplayTimer', + 'DropMessage', + 'DroppedMessage', + 'DualTeamSession', + 'emitfx', + 'EmptyPlayer', + 'EmptyTeam', + 'end_host_scanning', + 'existing', + 'fade_screen', + 'FloatChoiceSetting', + 'FloatSetting', + 'FreeForAllSession', + 'FreezeMessage', + 'GameActivity', + 'GameResults', + 'GameTip', + 'get_chat_messages', + 'get_connection_to_host_info', + 'get_foreground_host_activity', + 'get_foreground_host_session', + 'get_game_port', + 'get_game_roster', + 'get_game_roster', + 'get_local_active_input_devices_count', 'get_map_display_string', + 'get_player_colors', + 'get_player_profile_colors', + 'get_player_profile_icon', + 'get_public_party_enabled', + 'get_public_party_max_size', + 'get_random_names', + 'get_remote_app_name', + 'get_replay_speed_exponent', + 'get_trophy_string', + 'get_ui_input_device', + 'getactivity', + 'getcollision', + 'getcollisionmesh', + 'getdata', + 'getinputdevice', + 'getmesh', + 'getnodes', + 'getsession', + 'getsound', + 'gettexture', + 'have_connected_clients', + 'have_touchscreen_input', + 'HitMessage', + 'host_scan_cycle', + 'ImpactDamageMessage', + 'increment_analytics_count', + 'init_campaigns', + 'InputDevice', + 'InputType', + 'IntChoiceSetting', + 'IntSetting', + 'is_in_replay', + 'is_point_in_box', + 'JoinActivity', + 'Level', + 'Lobby', + 'lock_all_input', + 'ls_input_devices', + 'ls_objects', + 'Lstr', + 'Map', + 'Material', + 'Mesh', + 'MultiTeamSession', + 'MusicType', + 'new_host_session', + 'new_replay_session', + 'newactivity', + 'newnode', + 'Node', + 'NodeActor', + 'NodeNotFoundError', + 'normalized_color', + 'NotFoundError', + 'OutOfBoundsMessage', + 'PickedUpMessage', + 'PickUpMessage', + 'Player', + 'PlayerDiedMessage', + 'PlayerInfo', + 'PlayerRecord', + 'PlayerScoredMessage', + 'Plugin', + 'PowerupAcceptMessage', + 'PowerupMessage', + 'print_live_object_warnings', + 'printnodes', + 'pushcall', + 'register_map', + 'release_gamepad_input', + 'release_keyboard_input', + 'reset_random_player_names', + 'safecolor', + 'SceneV1AppMode', + 'ScoreConfig', + 'ScoreScreenActivity', + 'ScoreType', + 'screenmessage', + 'Session', + 'SessionData', + 'SessionPlayer', + 'SessionTeam', + 'set_admins', + 'set_analytics_screen', + 'set_authenticate_clients', + 'set_debug_speed_exponent', + 'set_debug_speed_exponent', + 'set_enable_default_kick_voting', + 'set_internal_music', + 'set_map_bounds', + 'set_master_server_source', + 'set_public_party_enabled', + 'set_public_party_max_size', + 'set_public_party_name', + 'set_public_party_queue_enabled', + 'set_public_party_stats_url', + 'set_replay_speed_exponent', + 'set_touchscreen_editing', + 'setmusic', + 'Setting', + 'ShouldShatterMessage', + 'show_damage_count', + 'Sound', + 'StandLocation', + 'StandMessage', + 'Stats', + 'storagename', + 'Team', + 'TeamGameActivity', + 'Texture', + 'ThawMessage', + 'time', + 'Time', + 'timer', + 'Timer', + 'timestring', + 'UIScale', + 'UNHANDLED', + 'unlock_all_input', + 'Vec3', + 'WeakCall', ] # We want stuff here to show up as bascenev1.Foo instead of diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index ff13ac5f..d85ab10d 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -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 = 21102; +const int kEngineBuildNumber = 21104; const char* kEngineVersion = "1.7.20"; auto MonolithicMain(const core::CoreConfig& core_config) -> int { diff --git a/tools/efrotools/pcommand2.py b/tools/efrotools/pcommand2.py index ecb99ff6..82dc2bd3 100644 --- a/tools/efrotools/pcommand2.py +++ b/tools/efrotools/pcommand2.py @@ -29,3 +29,14 @@ def with_build_lock() -> None: ) with BuildLock(args[0]): subprocess.run(' '.join(args[1:]), check=True, shell=True) + + +def sortlines() -> None: + """Sort provided lines. For tidying import lists, etc.""" + from efro.error import CleanError + + if len(sys.argv) != 3: + raise CleanError('Expected 1 arg.') + val = sys.argv[2] + lines = val.splitlines() + print('\n'.join(sorted(lines, key=lambda l: l.lower()))) diff --git a/tools/pcommand b/tools/pcommand index 1b19bf60..5307b4d9 100755 --- a/tools/pcommand +++ b/tools/pcommand @@ -53,6 +53,7 @@ from efrotools.pcommand import ( ) from efrotools.pcommand2 import ( with_build_lock, + sortlines, ) from batools.pcommand import ( resize_image,