cleanup for pycharm

This commit is contained in:
Eric 2023-06-10 18:40:26 -07:00
parent c09ada590e
commit 2035e8ee30
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
21 changed files with 231 additions and 200 deletions

94
.efrocachemap generated
View File

@ -4069,53 +4069,53 @@
"build/assets/windows/Win32/ucrtbased.dll": "https://files.ballistica.net/cache/ba1/cd/ea/b7fb7c2ffc222f289d10cea32600",
"build/assets/windows/Win32/vc_redist.x86.exe": "https://files.ballistica.net/cache/ba1/74/28/01d4092e952681f6e2717c277719",
"build/assets/windows/Win32/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/cc/ad/6d8f08f6ba82073e77b43b720073",
"build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/c5/09/4f10b8a21ba87aa5509cff7a164b",
"build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/ff/0a/a354984f9c074dab0676ac7e4877",
"build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/2a/1c/9ee5db6d1bceca7fa6638fb8abde",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/a2/ec/f02253df12dbec4c9be0de721a68",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/34/21/9bdc0614417141c34188a2274fab",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/67/e9/e9f68cf12d609a1a1e05dc2f5f32",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/8c/90/c01a18b0bb8afc9880866f4be1d3",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/b2/bb/40fc02afa45895359a0edecddee5",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/58/55/8451262689d989ea20afb41de14c",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/4f/52/dce0af89103a5a03d1bb5782e7d0",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/78/64/c34c3f8fb8bce1e08da4438b3350",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/d9/d3/f2534b750f825306be86e8a4e33c",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/14/fb/35f54fb4b97377263f6305bd45c1",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ac/2b/5674c57bbf90e1960a3d374fb259",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7b/7b/b41669c7b97755276ab1cbdcb92f",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/fe/2c/2b5c06695ec891ca8d0d8d7c45bc",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/f2/7b/7efa84c6410a671cf97586614669",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/62/83/cb684ce43b1107b2142c3a815c5a",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/f6/6e/657e14ff3c06d29ad2541647b191",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/38/59/94bc622dbb1266ef0beddae47960",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/3a/b9/d2b65f3a1144857a6d7876fe3c5d",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/d9/69/31178d0400435915eef3a57b7dc0",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/91/84/64a2941c8a465e32f78198b1af1b",
"build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/fd/89/44e2ebc1017c94053d3df1f6cb8a",
"build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/38/d7/7110069365b22bee424f36e1bf5a",
"build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/6c/89/1c44605fe89b5faa9b1061455838",
"build/prefab/lib/linux_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/89/84/f4afc7b4745ae09c4efd2d731cd7",
"build/prefab/lib/linux_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/c4/ca/312ba216df4da1b1b29ab4041d5a",
"build/prefab/lib/linux_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/8c/c8/c63b5b98b5d0f11b6c689ea8b420",
"build/prefab/lib/linux_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/b8/65/829c1106c7ff29cf8db20ba18e5b",
"build/prefab/lib/linux_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/21/0a/7c956a1d57f6542d002ac35a3922",
"build/prefab/lib/mac_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/90/2f/867b10179bca834b1a39f9ad5041",
"build/prefab/lib/mac_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/31/a6/ce57836fc8360de5eff69814727e",
"build/prefab/lib/mac_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/b0/ea/d546833a8a31a09232cc15ea6f41",
"build/prefab/lib/mac_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/67/0f/caff9022fb2248407b53d6176479",
"build/prefab/lib/mac_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/13/b9/362c96cee1b930ea451195ba8a2c",
"build/prefab/lib/mac_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/58/12/59092d28e6e8e1923dfff8d7e5de",
"build/prefab/lib/mac_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/2e/a0/a2a78934c1193505f3d62989a152",
"build/prefab/lib/mac_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/67/56/ea651dddf9502c0513f29fb1a8c0",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/2f/3d/64cb8a6a5cb2bcf78393a42ff099",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/f4/45/99242dbb1e89b39fd5a56ea981da",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/9f/81/6f38faaba336a4ec79d59e6b35eb",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/09/d1/8eca404f15f194fd1f63e69704e4",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/59/0b/242de4373174cfeb4f24e20c2349",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/16/33/3c0a9952f075e1285d8e641505dc",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/5d/51/ab816cc1673f3035a752535b6e9c",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/9a/d9/432c2b34912f7db690d2a1a07fd2",
"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/71/a6/af3d85ee30571b5d2ee6c1c983a6",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/ba/b4/7e053a33756878603ba00826826b",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7c/e6/db247f005814b452c76163e5fa06",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/6a/89/4c80d68f001d348ba69e5ea2b245",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/8d/02/0f1ed7d6c2872a1272c03d84f3fb",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/19/cd/abc6f64d139ef2cac9cd3344833b",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a9/94/288e0610137a9f7676f09476b7ac",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/1b/3b/116944511f23d262d27428540840",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/af/cc/7f2a36e5596761e202dd6d868b67",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/be/a8/1455e76a1225c5a8352b58551d8c",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7d/f0/52640f401e3718b7d5820739e664",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/63/7c/17a12487d65bbc814926a3fbd99f",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/cd/cc/2eedc7d8e4b6a16d53cb11a2a717",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/1f/32/e330133cc7fd61e2ceed1a58789a",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/ea/ee/55046a303844f5a9f23b071dbdaf",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/7b/e1/0f59080a901b541ba836b301ad5d",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/67/6c/0554265899eeb170f819b7181148",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/c6/e1/c6485774e2085bb0078a026bbc84",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/ff/5d/a0bb46538cd6a98893ebffab0504",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/88/ab/60e65a8a1078d5232e8ada256b88",
"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",
"build/prefab/lib/linux_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/0f/e4/1ffba67e98b34bb942579fd54399",
"build/prefab/lib/linux_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/c9/fe/8c2c9da1b65f170dc5166cfb0a57",
"build/prefab/lib/linux_x86_64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/76/39/44dbc143631c3fbe78cc69fe7189",
"build/prefab/lib/linux_x86_64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/48/3c/bd78b3fca0f075757d95e711b2a5",
"build/prefab/lib/linux_x86_64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/78/75/a5c82c3defb6cd85f009632be0a4",
"build/prefab/lib/mac_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/28/c4/08fe8799b513efcab22dcfb4229b",
"build/prefab/lib/mac_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/fc/ba/3dbbf48e9406cc20d62fe07c71c5",
"build/prefab/lib/mac_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/67/e4/c7a43443b97b84b30657bd87503c",
"build/prefab/lib/mac_arm64_server/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ff/d3/60c5152b89c1886e6eb3f255d91b",
"build/prefab/lib/mac_x86_64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/6b/5d/d71290f965a080df0503ed815d69",
"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/f5/47/9db7c01a8a19ea55583a909adf14",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/ad/20/3b72e7abc0d54e7b94780bc6edbe",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/38/61/f5eb3377a746196a6fcad3707926",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/59/6d/f02c05860b022da85fcd56b5f6a8",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "https://files.ballistica.net/cache/ba1/8e/6f/61887ab9d3bc3ddc1a411b78b625",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "https://files.ballistica.net/cache/ba1/2a/3e/9ef7f4d59cbbc8ce2b92913b3f6f",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "https://files.ballistica.net/cache/ba1/7d/1a/63e81c69d5fc9275932c15ca8fc1",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "https://files.ballistica.net/cache/ba1/2d/f1/fd7463cf926c19c5e7fe1232e997",
"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",

View File

@ -214,6 +214,7 @@
<w>backporting</w>
<w>backwin</w>
<w>baclassic</w>
<w>baclassicmeta</w>
<w>bacloud</w>
<w>bacloudcmd</w>
<w>bacommon</w>
@ -284,6 +285,7 @@
<w>bfiledir</w>
<w>bfiles</w>
<w>bgdynamics</w>
<w>bgmesh</w>
<w>bgmodel</w>
<w>bgrn</w>
<w>bgrp</w>
@ -519,6 +521,7 @@
<w>cmdspath</w>
<w>cmdsraw</w>
<w>cmembers</w>
<w>cmesh</w>
<w>cmodel</w>
<w>cmodule</w>
<w>cmodules</w>
@ -621,6 +624,7 @@
<w>cspre</w>
<w>cssclass</w>
<w>csspbt</w>
<w>cstore</w>
<w>cstr</w>
<w>csum</w>
<w>csval</w>
@ -708,6 +712,7 @@
<w>dictval</w>
<w>didn</w>
<w>diemessages</w>
<w>diesound</w>
<w>difflib</w>
<w>dilateerode</w>
<w>dincrease</w>
@ -1295,6 +1300,7 @@
<w>hmac</w>
<w>hmmm</w>
<w>hmmmm</w>
<w>hmmw</w>
<w>hmph</w>
<w>hoffs</w>
<w>holdingflag</w>
@ -1664,6 +1670,7 @@
<w>manprivpath</w>
<w>mantype</w>
<w>manualtab</w>
<w>mapclass</w>
<w>mapdata</w>
<w>mapdef</w>
<w>mapdefs</w>
@ -2107,6 +2114,7 @@
<w>plugstate</w>
<w>plugstates</w>
<w>plusbutton</w>
<w>plusnet</w>
<w>plvel</w>
<w>pmats</w>
<w>pname</w>
@ -2732,6 +2740,7 @@
<w>subprocesses</w>
<w>subrepos</w>
<w>subsel</w>
<w>subsys</w>
<w>subtypestr</w>
<w>subval</w>
<w>subvalue</w>

View File

@ -124,6 +124,7 @@
<w>backtraces</w>
<w>backwin</w>
<w>baclassic</w>
<w>baclassicmeta</w>
<w>bacoremeta</w>
<w>baenv</w>
<w>bafoobar</w>
@ -172,6 +173,7 @@
<w>benning</w>
<w>bezanson</w>
<w>bgdynamics</w>
<w>bgmesh</w>
<w>bgra</w>
<w>bgrp</w>
<w>bigendian</w>
@ -319,6 +321,7 @@
<w>cmdspath</w>
<w>cmdsraw</w>
<w>cmdvals</w>
<w>cmesh</w>
<w>cmodule</w>
<w>cmodules</w>
<w>cmplen</w>
@ -375,6 +378,7 @@
<w>csspbt</w>
<w>cstdint</w>
<w>cstdlib</w>
<w>cstore</w>
<w>cstring</w>
<w>csval</w>
<w>ctargetref</w>
@ -437,6 +441,7 @@
<w>dfmt</w>
<w>dictval</w>
<w>didn</w>
<w>diesound</w>
<w>diffbit</w>
<w>dinl</w>
<w>dirfilter</w>
@ -757,6 +762,7 @@
<w>hinst</w>
<w>hitchy</w>
<w>hmmm</w>
<w>hmmw</w>
<w>homebrew</w>
<w>hostactivity</w>
<w>hostcmd</w>
@ -956,6 +962,7 @@
<w>manprivpath</w>
<w>mantype</w>
<w>manualtab</w>
<w>mapclass</w>
<w>maskhigh</w>
<w>maskuv</w>
<w>masterver</w>
@ -1217,6 +1224,7 @@
<w>plen</w>
<w>pluginsettings</w>
<w>plugnames</w>
<w>plusnet</w>
<w>pname</w>
<w>pnamel</w>
<w>pnameu</w>
@ -1573,6 +1581,7 @@
<w>subplatform</w>
<w>subscale</w>
<w>subscr</w>
<w>subsys</w>
<w>subtypestr</w>
<w>successmsg</w>
<w>sval</w>

View File

@ -64,7 +64,7 @@ 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
from babase._accountv2 import AccountV2Handle, AccountV2Subsystem
from babase._plugin import PotentialPlugin, Plugin, PluginSubsystem
from babase._app import App
from babase._cloud import CloudSubsystem
@ -115,6 +115,7 @@ from babase._general import (
storagename,
getclass,
get_type_name,
json_prep,
)
from babase._keyboard import Keyboard
from babase._math import normalized_color, is_point_in_box, vec3validate
@ -127,6 +128,7 @@ app.postinit()
__all__ = [
'app',
'AccountV2Handle',
'AccountV2Subsystem',
'ActivityNotFoundError',
'ActorNotFoundError',
'app',
@ -230,6 +232,7 @@ __all__ = [
'LoginAdapter',
'get_remote_app_name',
'is_browser_likely_available',
'json_prep',
]
# We want stuff to show up as babase.Foo instead of babase._sub.Foo.

View File

@ -5,12 +5,11 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import _babase
import babase
if TYPE_CHECKING:
from typing import Callable
import babase
import bascenev1 as bs
import bascenev1
class AppDelegate:
@ -21,8 +20,8 @@ class AppDelegate:
def create_default_game_settings_ui(
self,
gameclass: type[bs.GameActivity],
sessiontype: type[bs.Session],
gameclass: type[bascenev1.GameActivity],
sessiontype: type[bascenev1.Session],
settings: dict | None,
completion_call: Callable[[dict | None], None],
) -> None:
@ -34,9 +33,9 @@ class AppDelegate:
# Replace the main window once we come up successfully.
from bauiv1lib.playlist.editgame import PlaylistEditGameWindow
assert _babase.app.classic is not None
_babase.app.ui_v1.clear_main_menu_window(transition='out_left')
_babase.app.ui_v1.set_main_menu_window(
assert babase.app.classic is not None
babase.app.ui_v1.clear_main_menu_window(transition='out_left')
babase.app.ui_v1.set_main_menu_window(
PlaylistEditGameWindow(
gameclass,
sessiontype,

View File

@ -9,8 +9,6 @@ import _babase
if TYPE_CHECKING:
from typing import Any
import babase
import bascenev1
def get_input_device_mapped_value(

View File

@ -15,9 +15,6 @@ from bascenev1._music import MusicType
if TYPE_CHECKING:
from typing import Callable, Any
import babase
import baclassic
class MusicPlayMode(Enum):
"""Influences behavior when playing music.

View File

@ -15,7 +15,6 @@ from babase.internal import DEFAULT_REQUEST_TIMEOUT_SECONDS
if TYPE_CHECKING:
from typing import Any, Callable
import socket
MasterServerCallback = Callable[[None | dict[str, Any]], None]

View File

@ -26,7 +26,6 @@ if TYPE_CHECKING:
from typing import Any
import babase
import baclassic
from bacommon.servermanager import ServerConfig

View File

@ -55,9 +55,9 @@ class ClassicSubsystem(AppSubsystem):
# baclassic/__init__.py. This way this version can be used for
# runtime via babase.app.classic which enforces handling of the
# package-not-present case.
from bascenev1._level import Level
from bascenev1._campaign import Campaign
from bascenev1._lobby import Lobby, Chooser
# from bascenev1._level import Level
# from bascenev1._campaign import Campaign
# from bascenev1._lobby import Lobby, Chooser
from baclassic._music import MusicPlayMode # FIXME move 2 subsys
def __init__(self) -> None:

View File

@ -6,13 +6,12 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import _baplus
from babase._appsubsystem import AppSubsystem
from babase import AppSubsystem
if TYPE_CHECKING:
from typing import Callable, Any
from babase import App, CloudSubsystem
from babase._accountv2 import AccountV2Subsystem
from babase import CloudSubsystem, AccountV2Subsystem
class PlusSubsystem(AppSubsystem):
@ -37,6 +36,7 @@ class PlusSubsystem(AppSubsystem):
_baplus.on_app_loading()
self.accounts.on_app_loading()
# noinspection PyUnresolvedReferences
@staticmethod
def add_v1_account_transaction(
transaction: dict, callback: Callable | None = None

View File

@ -20,6 +20,7 @@ import logging
from efro.util import set_canonical_module_names
from _babase import (
app,
ContextRef,
@ -38,6 +39,7 @@ from _babase import (
displaytimer,
DisplayTimer,
)
from babase import Plugin
from babase._appintent import AppIntent, AppIntentDefault, AppIntentExec
from babase._appmode import AppMode
from babase._error import NotFoundError, NodeNotFoundError, ContextError
@ -394,6 +396,7 @@ __all__ = [
'Chooser',
'Campaign',
'Level',
'Plugin',
]
# We want stuff here to show up as bascenev1.Foo instead of

View File

@ -5,18 +5,17 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import _babase
import babase
if TYPE_CHECKING:
from typing import Any
import babase
import bascenev1
def register_campaign(campaign: bascenev1.Campaign) -> None:
"""Register a new campaign."""
assert _babase.app.classic is not None
_babase.app.classic.campaigns[campaign.name] = campaign
assert babase.app.classic is not None
babase.app.classic.campaigns[campaign.name] = campaign
class Campaign:
@ -67,25 +66,24 @@ class Campaign:
def getlevel(self, name: str) -> bascenev1.Level:
"""Return a contained baclassic.Level by name."""
from babase import _error
for level in self._levels:
if level.name == name:
return level
raise _error.NotFoundError(
raise babase.NotFoundError(
"Level '" + name + "' not found in campaign '" + self.name + "'"
)
def reset(self) -> None:
"""Reset state for the Campaign."""
_babase.app.config.setdefault('Campaigns', {})[self._name] = {}
babase.app.config.setdefault('Campaigns', {})[self._name] = {}
# FIXME should these give/take baclsssic.Level instances instead
# FIXME should these give/take baclassic.Level instances instead
# of level names?..
def set_selected_level(self, levelname: str) -> None:
"""Set the Level currently selected in the UI (by name)."""
self.configdict['Selection'] = levelname
_babase.app.config.commit()
babase.app.config.commit()
def get_selected_level(self) -> str:
"""Return the name of the Level currently selected in the UI."""
@ -94,7 +92,7 @@ class Campaign:
@property
def configdict(self) -> dict[str, Any]:
"""Return the live config dict for this campaign."""
val: dict[str, Any] = _babase.app.config.setdefault(
val: dict[str, Any] = babase.app.config.setdefault(
'Campaigns', {}
).setdefault(self._name, {})
assert isinstance(val, dict)
@ -116,7 +114,7 @@ def init_campaigns() -> None:
from bascenev1lib.game.ninjafight import NinjaFightGame
# TODO: Campaigns should be load-on-demand; not all imported at launch
# like this.
# like this.
# FIXME: Once translations catch up, we can convert these to use the
# generic display-name '${GAME} Training' type stuff.

View File

@ -6,12 +6,10 @@ from __future__ import annotations
from typing import TYPE_CHECKING
import _babase
import babase
import _bascenev1
from babase._error import NodeNotFoundError
if TYPE_CHECKING:
import babase
import bascenev1
@ -24,7 +22,7 @@ class Collision:
@property
def position(self) -> bascenev1.Vec3:
"""The position of the current collision."""
return _babase.Vec3(_bascenev1.get_collision_info('position'))
return babase.Vec3(_bascenev1.get_collision_info('position'))
@property
def sourcenode(self) -> bascenev1.Node:
@ -37,7 +35,7 @@ class Collision:
node = _bascenev1.get_collision_info('sourcenode')
assert isinstance(node, (_bascenev1.Node, type(None)))
if not node:
raise NodeNotFoundError()
raise babase.NodeNotFoundError()
return node
@property
@ -51,7 +49,7 @@ class Collision:
node = _bascenev1.get_collision_info('opposingnode')
assert isinstance(node, (_bascenev1.Node, type(None)))
if not node:
raise NodeNotFoundError()
raise babase.NodeNotFoundError()
return node
@property

View File

@ -7,27 +7,24 @@ from __future__ import annotations
from dataclasses import dataclass
from typing import TYPE_CHECKING, NewType
import _babase
from babase._mgen.enums import SpecialChar, UIScale
from babase._error import ActivityNotFoundError
import babase
import _bascenev1
if TYPE_CHECKING:
from typing import Sequence
import babase
import bascenev1
Time = NewType('Time', float)
BaseTime = NewType('BaseTime', float)
TROPHY_CHARS = {
'1': SpecialChar.TROPHY1,
'2': SpecialChar.TROPHY2,
'3': SpecialChar.TROPHY3,
'0a': SpecialChar.TROPHY0A,
'0b': SpecialChar.TROPHY0B,
'4': SpecialChar.TROPHY4,
'1': babase.SpecialChar.TROPHY1,
'2': babase.SpecialChar.TROPHY2,
'3': babase.SpecialChar.TROPHY3,
'0a': babase.SpecialChar.TROPHY0A,
'0b': babase.SpecialChar.TROPHY0B,
'4': babase.SpecialChar.TROPHY4,
}
@ -46,7 +43,7 @@ class GameTip:
def get_trophy_string(trophy_id: str) -> str:
"""Given a trophy id, returns a string to visualize it."""
if trophy_id in TROPHY_CHARS:
return _babase.charstr(TROPHY_CHARS[trophy_id])
return babase.charstr(TROPHY_CHARS[trophy_id])
return '?'
@ -101,7 +98,7 @@ def animate(
# We operate in either activities or sessions..
try:
globalsnode = _bascenev1.getactivity().globalsnode
except ActivityNotFoundError:
except babase.ActivityNotFoundError:
globalsnode = _bascenev1.getsession().sessionglobalsnode
globalsnode.connectattr('time', curve, 'in')
@ -133,7 +130,7 @@ def animate_array(
# We operate in either activities or sessions..
try:
globalsnode = _bascenev1.getactivity().globalsnode
except ActivityNotFoundError:
except babase.ActivityNotFoundError:
globalsnode = _bascenev1.getsession().sessionglobalsnode
for i in range(size):
@ -182,13 +179,13 @@ def show_damage_count(
Category: **Gameplay Functions**
"""
lifespan = 1.0
app = _babase.app
app = babase.app
# FIXME: Should never vary game elements based on local config.
# (connected clients may have differing configs so they won't
# get the intended results).
assert app.classic is not None
do_big = app.ui_v1.uiscale is UIScale.SMALL or app.vr_mode
do_big = app.ui_v1.uiscale is babase.UIScale.SMALL or app.vr_mode
txtnode = _bascenev1.newnode(
'text',
attrs={

View File

@ -5,14 +5,12 @@
from __future__ import annotations
import logging
import weakref
from dataclasses import dataclass
from typing import TYPE_CHECKING
import _babase
from babase._error import print_exception, print_error, NotFoundError
from babase._language import Lstr
from babase._mgen.enums import SpecialChar, InputType
import babase
import _bascenev1
from bascenev1._profile import get_player_profile_colors
from bascenev1._gameutils import animate, animate_array
@ -33,20 +31,19 @@ class JoinInfo:
def __init__(self, lobby: bascenev1.Lobby):
from bascenev1._nodeactor import NodeActor
from babase._general import WeakCall
self._state = 0
self._press_to_punch: str | bascenev1.Lstr = (
'C'
if _babase.app.iircade_mode
else _babase.charstr(SpecialChar.LEFT_BUTTON)
if babase.app.iircade_mode
else babase.charstr(babase.SpecialChar.LEFT_BUTTON)
)
self._press_to_bomb: str | bascenev1.Lstr = (
'B'
if _babase.app.iircade_mode
else _babase.charstr(SpecialChar.RIGHT_BUTTON)
if babase.app.iircade_mode
else babase.charstr(babase.SpecialChar.RIGHT_BUTTON)
)
self._joinmsg = Lstr(resource='pressAnyButtonToJoinText')
self._joinmsg = babase.Lstr(resource='pressAnyButtonToJoinText')
can_switch_teams = len(lobby.sessionteams) > 1
# If we have a keyboard, grab keys for punch and pickup.
@ -56,7 +53,7 @@ class JoinInfo:
if keyboard is not None:
self._update_for_keyboard(keyboard)
flatness = 1.0 if _babase.app.vr_mode else 0.0
flatness = 1.0 if babase.app.vr_mode else 0.0
self._text = NodeActor(
_bascenev1.newnode(
'text',
@ -72,39 +69,43 @@ class JoinInfo:
)
)
if _babase.app.demo_mode or _babase.app.arcade_mode:
if babase.app.demo_mode or babase.app.arcade_mode:
self._messages = [self._joinmsg]
else:
msg1 = Lstr(
msg1 = babase.Lstr(
resource='pressToSelectProfileText',
subs=[
(
'${BUTTONS}',
_babase.charstr(SpecialChar.UP_ARROW)
babase.charstr(babase.SpecialChar.UP_ARROW)
+ ' '
+ _babase.charstr(SpecialChar.DOWN_ARROW),
+ babase.charstr(babase.SpecialChar.DOWN_ARROW),
)
],
)
msg2 = Lstr(
msg2 = babase.Lstr(
resource='pressToOverrideCharacterText',
subs=[('${BUTTONS}', Lstr(resource='bombBoldText'))],
subs=[('${BUTTONS}', babase.Lstr(resource='bombBoldText'))],
)
msg3 = Lstr(
msg3 = babase.Lstr(
value='${A} < ${B} >',
subs=[('${A}', msg2), ('${B}', self._press_to_bomb)],
)
self._messages = (
(
[
Lstr(
babase.Lstr(
resource='pressToSelectTeamText',
subs=[
(
'${BUTTONS}',
_babase.charstr(SpecialChar.LEFT_ARROW)
babase.charstr(
babase.SpecialChar.LEFT_ARROW
)
+ ' '
+ _babase.charstr(SpecialChar.RIGHT_ARROW),
+ babase.charstr(
babase.SpecialChar.RIGHT_ARROW
),
)
],
)
@ -117,36 +118,44 @@ class JoinInfo:
+ [self._joinmsg]
)
self._timer = _bascenev1.Timer(4.0, WeakCall(self._update), repeat=True)
self._timer = _bascenev1.Timer(
4.0, babase.WeakCall(self._update), repeat=True
)
def _update_for_keyboard(self, keyboard: bascenev1.InputDevice) -> None:
classic = _babase.app.classic
classic = babase.app.classic
assert classic is not None
punch_key = keyboard.get_button_name(
classic.get_input_device_mapped_value(keyboard, 'buttonPunch')
)
self._press_to_punch = Lstr(
self._press_to_punch = babase.Lstr(
resource='orText',
subs=[
('${A}', Lstr(value='\'${K}\'', subs=[('${K}', punch_key)])),
(
'${A}',
babase.Lstr(value='\'${K}\'', subs=[('${K}', punch_key)]),
),
('${B}', self._press_to_punch),
],
)
bomb_key = keyboard.get_button_name(
classic.get_input_device_mapped_value(keyboard, 'buttonBomb')
)
self._press_to_bomb = Lstr(
self._press_to_bomb = babase.Lstr(
resource='orText',
subs=[
('${A}', Lstr(value='\'${K}\'', subs=[('${K}', bomb_key)])),
(
'${A}',
babase.Lstr(value='\'${K}\'', subs=[('${K}', bomb_key)]),
),
('${B}', self._press_to_bomb),
],
)
self._joinmsg = Lstr(
self._joinmsg = babase.Lstr(
value='${A} < ${B} >',
subs=[
('${A}', Lstr(resource='pressPunchToJoinText')),
('${A}', babase.Lstr(resource='pressPunchToJoinText')),
('${B}', self._press_to_punch),
],
)
@ -208,7 +217,7 @@ class Chooser:
self._last_change: Sequence[float | int] = (0, 0)
self._profiles: dict[str, dict[str, Any]] = {}
app = _babase.app
app = babase.app
assert app.classic is not None
# Load available player profiles either from the local config or
@ -269,7 +278,7 @@ class Chooser:
# Set our initial name to '<choosing player>' in case anyone asks.
self._sessionplayer.setname(
Lstr(resource='choosingPlayerText').evaluate(), real=False
babase.Lstr(resource='choosingPlayerText').evaluate(), real=False
)
# Init these to our rando but they should get switched to the
@ -285,7 +294,7 @@ class Chooser:
self._set_ready(False)
def _select_initial_profile(self) -> int:
app = _babase.app
app = babase.app
assert app.classic is not None
profilenames = self._profilenames
inputdevice = self._sessionplayer.inputdevice
@ -385,7 +394,7 @@ class Chooser:
"""The chooser's baclassic.Lobby."""
lobby = self._lobby()
if lobby is None:
raise NotFoundError('Lobby does not exist.')
raise babase.NotFoundError('Lobby does not exist.')
return lobby
def get_lobby(self) -> bascenev1.Lobby | None:
@ -394,7 +403,7 @@ class Chooser:
def update_from_profile(self) -> None:
"""Set character/colors based on the current profile."""
assert _babase.app.classic is not None
assert babase.app.classic is not None
self._profilename = self._profilenames[self._profileindex]
if self._profilename == '_edit':
pass
@ -415,7 +424,7 @@ class Chooser:
# so no exploit opportunities)
if (
character not in self._character_names
and character in _babase.app.classic.spaz_appearances
and character in babase.app.classic.spaz_appearances
):
self._character_names.append(character)
self._character_index = self._character_names.index(character)
@ -427,9 +436,8 @@ class Chooser:
def reload_profiles(self) -> None:
"""Reload all player profiles."""
from babase._general import json_prep
app = _babase.app
app = babase.app
assert app.classic is not None
# Re-construct our profile index and other stuff since the profile
@ -457,7 +465,7 @@ class Chooser:
# (non-unicode/non-json) version.
# Make sure they conform to our standards
# (unicode strings, no tuples, etc)
self._profiles = json_prep(self._profiles)
self._profiles = babase.json_prep(self._profiles)
# Filter out any characters we're unaware of.
for profile in list(self._profiles.items()):
@ -535,20 +543,20 @@ class Chooser:
try:
name = self._sessionplayer.inputdevice.get_default_player_name()
except Exception:
print_exception('Error getting _random chooser name.')
logging.exception('Error getting _random chooser name.')
name = 'Invalid'
clamp = not full
elif name == '__account__':
try:
name = self._sessionplayer.inputdevice.get_v1_account_name(full)
except Exception:
print_exception('Error getting account name for chooser.')
logging.exception('Error getting account name for chooser.')
name = 'Invalid'
clamp = not full
elif name == '_edit':
# Explicitly flattening this to a str; it's only relevant on
# the host so that's ok.
name = Lstr(
name = babase.Lstr(
resource='createEditPlayerText',
fallback_resource='editProfileWindow.titleNewText',
).evaluate()
@ -561,11 +569,11 @@ class Chooser:
icon = (
self._profiles[name_raw]['icon']
if 'icon' in self._profiles[name_raw]
else _babase.charstr(SpecialChar.LOGO)
else babase.charstr(babase.SpecialChar.LOGO)
)
name = icon + name
except Exception:
print_exception('Error applying global icon.')
logging.exception('Error applying global icon.')
else:
# We now clamp non-full versions of names so there's at
# least some hope of reading them in-game.
@ -578,51 +586,54 @@ class Chooser:
def _set_ready(self, ready: bool) -> None:
# pylint: disable=cyclic-import
from babase._general import Call
classic = _babase.app.classic
classic = babase.app.classic
assert classic is not None
profilename = self._profilenames[self._profileindex]
# Handle '_edit' as a special case.
if profilename == '_edit' and ready:
with _babase.ContextRef.empty():
with babase.ContextRef.empty():
classic.profile_browser_window(in_main_menu=False)
# Give their input-device UI ownership too
# (prevent someone else from snatching it in crowded games)
_babase.set_ui_input_device(self._sessionplayer.inputdevice.id)
babase.set_ui_input_device(self._sessionplayer.inputdevice.id)
return
if not ready:
self._sessionplayer.assigninput(
InputType.LEFT_PRESS,
Call(self.handlemessage, ChangeMessage('team', -1)),
babase.InputType.LEFT_PRESS,
babase.Call(self.handlemessage, ChangeMessage('team', -1)),
)
self._sessionplayer.assigninput(
InputType.RIGHT_PRESS,
Call(self.handlemessage, ChangeMessage('team', 1)),
babase.InputType.RIGHT_PRESS,
babase.Call(self.handlemessage, ChangeMessage('team', 1)),
)
self._sessionplayer.assigninput(
InputType.BOMB_PRESS,
Call(self.handlemessage, ChangeMessage('character', 1)),
babase.InputType.BOMB_PRESS,
babase.Call(self.handlemessage, ChangeMessage('character', 1)),
)
self._sessionplayer.assigninput(
InputType.UP_PRESS,
Call(self.handlemessage, ChangeMessage('profileindex', -1)),
babase.InputType.UP_PRESS,
babase.Call(
self.handlemessage, ChangeMessage('profileindex', -1)
),
)
self._sessionplayer.assigninput(
InputType.DOWN_PRESS,
Call(self.handlemessage, ChangeMessage('profileindex', 1)),
babase.InputType.DOWN_PRESS,
babase.Call(
self.handlemessage, ChangeMessage('profileindex', 1)
),
)
self._sessionplayer.assigninput(
(
InputType.JUMP_PRESS,
InputType.PICK_UP_PRESS,
InputType.PUNCH_PRESS,
babase.InputType.JUMP_PRESS,
babase.InputType.PICK_UP_PRESS,
babase.InputType.PUNCH_PRESS,
),
Call(self.handlemessage, ChangeMessage('ready', 1)),
babase.Call(self.handlemessage, ChangeMessage('ready', 1)),
)
self._ready = False
self._update_text()
@ -630,31 +641,31 @@ class Chooser:
else:
self._sessionplayer.assigninput(
(
InputType.LEFT_PRESS,
InputType.RIGHT_PRESS,
InputType.UP_PRESS,
InputType.DOWN_PRESS,
InputType.JUMP_PRESS,
InputType.BOMB_PRESS,
InputType.PICK_UP_PRESS,
babase.InputType.LEFT_PRESS,
babase.InputType.RIGHT_PRESS,
babase.InputType.UP_PRESS,
babase.InputType.DOWN_PRESS,
babase.InputType.JUMP_PRESS,
babase.InputType.BOMB_PRESS,
babase.InputType.PICK_UP_PRESS,
),
self._do_nothing,
)
self._sessionplayer.assigninput(
(
InputType.JUMP_PRESS,
InputType.BOMB_PRESS,
InputType.PICK_UP_PRESS,
InputType.PUNCH_PRESS,
babase.InputType.JUMP_PRESS,
babase.InputType.BOMB_PRESS,
babase.InputType.PICK_UP_PRESS,
babase.InputType.PUNCH_PRESS,
),
Call(self.handlemessage, ChangeMessage('ready', 0)),
babase.Call(self.handlemessage, ChangeMessage('ready', 0)),
)
# Store the last profile picked by this input for reuse.
input_device = self._sessionplayer.inputdevice
name = input_device.name
unique_id = input_device.unique_identifier
device_profiles = _babase.app.config.setdefault(
device_profiles = babase.app.config.setdefault(
'Default Player Profiles', {}
)
@ -670,7 +681,7 @@ class Chooser:
del device_profiles[profilekey]
else:
device_profiles[profilekey] = profilename
_babase.app.config.commit()
babase.app.config.commit()
# Set this player's short and full name.
self._sessionplayer.setname(
@ -688,7 +699,7 @@ class Chooser:
# Team auto-balance kicks us to another team if we try to
# join the team with the most players.
if not self._ready:
if _babase.app.config.get('Auto Balance Teams', False):
if babase.app.config.get('Auto Balance Teams', False):
lobby = self.lobby
sessionteams = lobby.sessionteams
if len(sessionteams) > 1:
@ -725,7 +736,7 @@ class Chooser:
# TODO: should handle this at the engine layer so this is unnecessary.
def _handle_repeat_message_attack(self) -> None:
now = _babase.apptime()
now = babase.apptime()
count = self._last_change[1]
if now - self._last_change[0] < QUICK_CHANGE_INTERVAL:
count += 1
@ -745,11 +756,11 @@ class Chooser:
# If we've been removed from the lobby, ignore this stuff.
if self._dead:
print_error('chooser got ChangeMessage after dying')
logging.error('chooser got ChangeMessage after dying')
return
if not self._text_node:
print_error('got ChangeMessage after nodes died')
logging.error('got ChangeMessage after nodes died')
return
if msg.what == 'team':
@ -794,18 +805,21 @@ class Chooser:
if self._ready:
# Once we're ready, we've saved the name, so lets ask the system
# for it so we get appended numbers and stuff.
text = Lstr(value=self._sessionplayer.getname(full=True))
text = Lstr(
text = babase.Lstr(value=self._sessionplayer.getname(full=True))
text = babase.Lstr(
value='${A} (${B})',
subs=[('${A}', text), ('${B}', Lstr(resource='readyText'))],
subs=[
('${A}', text),
('${B}', babase.Lstr(resource='readyText')),
],
)
else:
text = Lstr(value=self._getname(full=True))
text = babase.Lstr(value=self._getname(full=True))
can_switch_teams = len(self.lobby.sessionteams) > 1
# Flash as we're coming in.
fin_color = _babase.safecolor(self.get_color()) + (1,)
fin_color = babase.safecolor(self.get_color()) + (1,)
if not self._inited:
animate_array(
self._text_node,
@ -876,7 +890,7 @@ class Chooser:
return self._sessionplayer
def _update_icon(self) -> None:
assert _babase.app.classic is not None
assert babase.app.classic is not None
if self._profilenames[self._profileindex] == '_edit':
tex = _bascenev1.gettexture('black')
tint_tex = _bascenev1.gettexture('black')
@ -887,14 +901,14 @@ class Chooser:
return
try:
tex_name = _babase.app.classic.spaz_appearances[
tex_name = babase.app.classic.spaz_appearances[
self._character_names[self._character_index]
].icon_texture
tint_tex_name = _babase.app.classic.spaz_appearances[
tint_tex_name = babase.app.classic.spaz_appearances[
self._character_names[self._character_index]
].icon_mask_texture
except Exception:
print_exception('Error updating char icon list')
logging.exception('Error updating char icon list')
tex_name = 'neoSpazIcon'
tint_tex_name = 'neoSpazIconColorMask'
@ -1012,7 +1026,7 @@ class Lobby:
# pylint: disable=cyclic-import
from bascenev1lib.actor.spazappearance import get_appearances
assert _babase.app.classic is not None
assert babase.app.classic is not None
# We may have gained or lost character names if the user
# bought something; reload these too.
@ -1020,13 +1034,13 @@ class Lobby:
self.character_names_local_unlocked.sort(key=lambda x: x.lower())
# Do any overall prep we need to such as creating account profile.
_babase.app.classic.accounts.ensure_have_account_player_profile()
babase.app.classic.accounts.ensure_have_account_player_profile()
for chooser in self.choosers:
try:
chooser.reload_profiles()
chooser.update_from_profile()
except Exception:
print_exception('Error reloading profiles.')
logging.exception('Error reloading profiles.')
def update_positions(self) -> None:
"""Update positions for all choosers."""
@ -1068,9 +1082,9 @@ class Lobby:
self.choosers.remove(chooser)
break
if not found:
print_error(f'remove_chooser did not find player {player}')
logging.exception('remove_chooser did not find player %s.', player)
elif chooser in self.choosers:
print_error(f'chooser remains after removal for {player}')
logging.exception('chooser remains after removal for %s.', player)
self.update_positions()
def remove_all_choosers(self) -> None:

View File

@ -25,7 +25,7 @@ class Session:
Category: **Gameplay Classes**
Examples of sessions are bascenev1.FreeForAllSession,
bascenv1.DualTeamSession, and bascenev1.CoopSession.
bascenev1.DualTeamSession, and bascenev1.CoopSession.
A Session is responsible for wrangling and transitioning between various
bascenev1.Activity instances such as mini-games and score-screens, and for

View File

@ -13,12 +13,11 @@ from bascenev1lib.gameutils import SharedObjects
if TYPE_CHECKING:
from typing import Any
import baclassic
class HockeyStadium(bs.Map):
"""Stadium map used for ice hockey games."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import hockey_stadium as defs
name = 'Hockey Stadium'
@ -176,6 +175,7 @@ class FootballStadium(bs.Map):
class Bridgit(bs.Map):
"""Map with a narrow bridge in the middle."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import bridgit as defs
name = 'Bridgit'
@ -281,6 +281,7 @@ class Bridgit(bs.Map):
class BigG(bs.Map):
"""Large G shaped map for racing"""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import big_g as defs
name = 'Big G'
@ -391,6 +392,7 @@ class BigG(bs.Map):
class Roundabout(bs.Map):
"""CTF map featuring two platforms and a long way around between them"""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import roundabout as defs
name = 'Roundabout'
@ -495,6 +497,7 @@ class Roundabout(bs.Map):
class MonkeyFace(bs.Map):
"""Map sorta shaped like a monkey face; teehee!"""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import monkey_face as defs
name = 'Monkey Face'
@ -599,6 +602,7 @@ class MonkeyFace(bs.Map):
class ZigZag(bs.Map):
"""A very long zig-zaggy map"""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import zig_zag as defs
name = 'Zigzag'
@ -706,6 +710,7 @@ class ZigZag(bs.Map):
class ThePad(bs.Map):
"""A simple square shaped map with a raised edge."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import the_pad as defs
name = 'The Pad'
@ -794,6 +799,7 @@ class ThePad(bs.Map):
class DoomShroom(bs.Map):
"""A giant mushroom. Of doom!"""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import doom_shroom as defs
name = 'Doom Shroom'
@ -889,6 +895,7 @@ class DoomShroom(bs.Map):
class LakeFrigid(bs.Map):
"""An icy lake fit for racing."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import lake_frigid as defs
name = 'Lake Frigid'
@ -975,6 +982,7 @@ class LakeFrigid(bs.Map):
class TipTop(bs.Map):
"""A pointy map good for king-of-the-hill-ish games."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import tip_top as defs
name = 'Tip Top'
@ -1052,6 +1060,7 @@ class TipTop(bs.Map):
class CragCastle(bs.Map):
"""A lovely castle map."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import crag_castle as defs
name = 'Crag Castle'
@ -1267,6 +1276,7 @@ class TowerD(bs.Map):
class HappyThoughts(bs.Map):
"""Flying map."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import happy_thoughts as defs
name = 'Happy Thoughts'
@ -1382,6 +1392,7 @@ class HappyThoughts(bs.Map):
class StepRightUp(bs.Map):
"""Wide stepped map good for CTF or Assault."""
# noinspection PyUnresolvedReferences
from bascenev1lib.mapdata import step_right_up as defs
name = 'Step Right Up'

View File

@ -183,7 +183,6 @@ class PurchaseWindow(bui.Window):
return
def do_it() -> None:
plus = bui.app.plus
assert plus is not None
plus.in_game_purchase(self._items[0], self._price)

View File

@ -321,7 +321,6 @@ def _test_v1_transaction() -> None:
results[0] = True # Success!
def _do_it() -> None:
plus = bui.app.plus
assert plus is not None
# Fire off a transaction with a callback.
plus.add_v1_account_transaction(

View File

@ -475,7 +475,6 @@ class SpecialOfferWindow(bui.Window):
return
def do_it() -> None:
plus = bui.app.plus
assert plus is not None
plus.in_game_purchase(