diff --git a/.efrocachemap b/.efrocachemap
index cdb6a024..0bee99e8 100644
--- a/.efrocachemap
+++ b/.efrocachemap
@@ -3995,50 +3995,50 @@
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34",
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
- "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6b/e8/d24c94a6b989acff6eabe76639dc",
- "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e3/d1/45b086c23b8f8fa4407aadf1f33d",
- "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/68/7283a2f2aa677b43ee180cfd003a",
- "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/c8/d9530a64d2b54bdf0a40af6ee3ba",
- "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b0/c1/c0f5d1f36cf398935adb81ee9194",
- "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/a7/0f/03f5a9cb4ebca7b1481b0eb5e069",
- "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b9/a7/0f77eaebbb18ad0d224e196bfe22",
- "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3e/bf/11620aabebaa398ec8a6608e017d",
- "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/34/37/7e66ea0c048a064a6ca0ab506a10",
- "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/73/bb/636174d3ca010f2a6a2e6d4e6b6e",
- "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/86/38/641aa55c007421d864d5c15e48e9",
- "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c2/a4/5e2cd5aee95187c3c486a01ca295",
- "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ac/b7/6e4ccacf60dfd9b804fceaee521a",
- "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ca/df/41218c2e85335edd56cb16b9b1bd",
- "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/71/24/8368f82cff7cd110da5aac9fe6fb",
- "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/10/82/8d3f421a7d543c023687a3c53dbf",
- "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/84/26/6b1afe3e4b75c354477930c5b1ed",
- "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5f/13/4470db4743c750d3b652bdddc96a",
- "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/be/36/1aa413ad7d9fb1c16269ef9be3f8",
- "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/a5/e0/5e17b9531385957a9667fd09c957",
- "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ed/ab/bb1936d686208edc8c4730949632",
- "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0b/88/beb016a2d7ff70fcf7016d8187ae",
- "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/12/be/b10ca74c866bf5d6783672805037",
- "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/af/f2/5acd4d29a8b1991c1e09737195f9",
- "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0f/19/279502db6206f11c8e4b5422bc34",
- "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a1/f2/99be86d804b841689a49f484d35d",
- "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/00/44/dd1e2251e0215546803c9fbac444",
- "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/16/81/25d134cc4a2bd4bf47fd176f0700",
- "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2a/a1/546dae6c198c49ff56ef5fad1187",
- "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/01/60/bb0aae698489aefb789ad78a9340",
- "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/df/fb/4f5eef097e21d2bef9c89d6fe8f0",
- "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/76/d8/adc5e75eee89d891802c13b27cb0",
- "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cd/d7/d96b6c39bce663f33f736f879342",
- "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/92/aa/398f81c2cc39c37185034c62af39",
- "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/88/b1/3a1e67fab19230eb82ef229a1729",
- "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/03/32/ec1822a2b5eb602885762e6fa886",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6a/3c/5c45519b983e18ba57630ca90637",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/a4/04/af5d0357afba90780cf966584100",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/92/3a/238a4e4e4d51d6f9976bd5e5e724",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/20/69/b8ccf2f5df5ff6837aaaf0baef5a",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/dd/de/51cd4209ce2bb9377fb9df204bc1",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c7/7f/6a64850570f668759cecb4a00e2b",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/23/17/311aada1ccf834cec4162301895f",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/31/97/9a3aa9ed980f08e58cb29f5fc3a4",
+ "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3c/77/04b4a5e5483b8c2a5041cf33177e",
+ "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/db/ed/655b7a5f870bd14bbb9b2cc86f18",
+ "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/33/a6/4fb920d00f3b7f1e45df0894b957",
+ "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4f/3c/8524e9d2ae515883beb55608c804",
+ "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/34/ca59dc7e360989e90712fd7479ec",
+ "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e8/86/1bf02b18f43cef7c3b8a3f4c0992",
+ "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/95/9e/a9bbba540c8dc202bd8e84b4bbb5",
+ "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/87/3f/6f3d7db1e3bd9f5378e07849e638",
+ "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/18/04/bce334a942743038f3e4737f96e1",
+ "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/91/38/4ffe7091ba3a4b78537d0fed875a",
+ "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/64/a6/d61e5449b966e5a7a4ff78d180b9",
+ "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/58/dd/fb56683ec41f2f1a6e4c7cd9be37",
+ "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/ad/38a79505481c967d88c9670bc6a5",
+ "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/8c/bf/a0ee6a443e4bdb97a92c3da70196",
+ "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a8/a5/0349b307442b990368f01fc4d0c6",
+ "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b9/a8/5d9aa9993e0c027aa6e95780e13a",
+ "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/3a/59/6fe1ff1e5e64180b29d4ec9cd1a2",
+ "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/1f/f1/ad26d4f67412eaaa2966cca82f8e",
+ "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/65/fa/c2516baddc702bd9edb30390b232",
+ "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/5f/8c/2d8c7b89e73b62bf0b88f38a80a1",
+ "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/70/bb76d82665f9cfc95bea6a3b277f",
+ "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/49/36/0c77fc298d97a386f0f1c1faa020",
+ "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fe/35/f506a7fd6b80e89cfa4ce5a9af84",
+ "build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a1/b1/bffa28e8677d6025f43ebaec241b",
+ "build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9d/f7/ee8b85edf48e549dba57e23082d9",
+ "build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/cd/fe/e8e4ae7de89c8ac6b1093c148a5f",
+ "build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/47/08/4662c54c56443c6ed70fd95294cd",
+ "build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f5/cc/e3c1d51df1cdcce702c12c2538ef",
+ "build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6e/ff/85ffb41a77eabae5bf74e1d52607",
+ "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bb/dd/96ab4c30c037eff4d1005b6515ec",
+ "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/8a/23328b06e397dfdafb201f429e0e",
+ "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/09/d9/ee415075a16dccc24f365dc2c847",
+ "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0f/80/d43c47af5dc56078f0e4b31049ec",
+ "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ff/81/4c771163b42212f839a1fbc3b1ce",
+ "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a8/f3/187de01651879d28e70ab4d2375a",
+ "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/de/4c/74a267e161853efc82afa8aa6b41",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/16/52/cf9c1531c053eb01fc9c1d4ade55",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/7b/78/cdac1fffd8a600387ce160afd888",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/4a/2c/c90d053b0758bf561c39c046b1a0",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/2f/ba/dff4088d2b8c29d8bffe5931bf11",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6a/4b/da9fcff7a95c12e980d9eb4a54ae",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/56/bf/1ceb339245a465763d0ede76f52b",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/3d/6a/a3e8a651870ffae660cd2c444f38",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/ed/58/1c30bad71ae607d2a34ea3f208d9",
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/7d/3e/229a581cb2454ed856f1d8b564a7",
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/98/12/571b2160d69d42580e8f31fa6a8d"
}
\ No newline at end of file
diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml
index ab5c5eba..34ce61aa 100644
--- a/.idea/dictionaries/ericf.xml
+++ b/.idea/dictionaries/ericf.xml
@@ -13,6 +13,7 @@
aaaj
aaak
aarch
+ aate
abcdefghijklmnopqrstuvwxyz
abcdefghjkmnpqrtuvwxy
abeb
@@ -186,6 +187,7 @@
bacommon
badguy
bafoundation
+ bainternal
ballistica
ballistica's
ballisticacore
@@ -280,6 +282,7 @@
bsactor
bscampaign
bsfoundation
+ bsgp
bsmaster
bsmusic
bsources
@@ -689,6 +692,7 @@
dualteamsession
duckdns
dummymodule
+ dummymodules
dummyname
dummyret
dummytoken
@@ -1489,6 +1493,7 @@
mathutils
maxdepth
maxlinks
+ maxpathlen
maxtries
maxval
maxw
@@ -1524,6 +1529,7 @@
minidom
minigame
minigames
+ miniplayer
minping
minusbutton
minval
@@ -1627,6 +1633,7 @@
nametext
nameval
nboxes
+ nbuffer
ncpu
ndbm
ndkpath
@@ -2368,6 +2375,7 @@
standin
starscale
startercache
+ startms
startscan
startsplits
starttime
@@ -2734,6 +2742,7 @@
vartype
vcruntime
vcxproj
+ vdata
venv
verfilename
verlines
diff --git a/.idea/scopes/UncheckedPython.xml b/.idea/scopes/UncheckedPython.xml
index 19e104b1..7dbb3a2b 100644
--- a/.idea/scopes/UncheckedPython.xml
+++ b/.idea/scopes/UncheckedPython.xml
@@ -1,3 +1,3 @@
-
-
+
+
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5144a273..813e4e5c 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-### 1.7.7 (build 20756, api 7, 2022-09-03)
+### 1.7.7 (build 20760, api 7, 2022-09-04)
- Added `ba.app.meta.load_exported_classes()` for loading classes discovered by the meta subsystem cleanly in a background thread.
- Improved logging of missing playlist game types.
- Some ba.Lstr functionality can now be used in background threads.
@@ -15,7 +15,9 @@
- Spaz starting with gloves no longer loses it after picking up an expiring gloves powerup (thanks itsre3!)
- Starting to rename the 'game' thread to the 'logic' thread. This is the thread where most high level app logic happen, not only game logic.
- `_ba.in_game_thread()` is now `_ba.in_logic_thread()`.
-- Misc C++ layer tidying.
+- Misc C++ layer tidying/refactoring.
+- Split out the `_ba` binary module into `_ba` and `_bainternal`. This will eventually allow running without the closed-source parts (_bainternal) present at all.
+- There is now a `_bainternal.py` dummy-module alongside the existing `_ba.py` one. Be sure to exclude it from any script collections used by the game (the same as `_ba.py`).
### 1.7.6 (build 20687, api 7, 2022-08-11)
- Cleaned up da MetaSubsystem code.
diff --git a/Makefile b/Makefile
index eed5d0b1..53284308 100644
--- a/Makefile
+++ b/Makefile
@@ -105,8 +105,8 @@ clean-list:
git clean -dnx ${ROOT_CLEAN_IGNORES}
# Force regenerate the dummy module.
-dummymodule:
- ./tools/pcommand update_dummy_module --force
+dummymodules:
+ ./tools/pcommand update_dummy_modules --force
# Generate docs.
docs: assets-cmake
@@ -117,7 +117,7 @@ docs: assets-cmake
assets-windows-Win32 assets-windows-x64 \
assets-mac assets-ios assets-android assets-clean \
resources resources-clean meta meta-clean \
- clean clean-list dummymodule docs
+ clean clean-list dummymodules docs
################################################################################
diff --git a/assets/.asset_manifest_public.json b/assets/.asset_manifest_public.json
index 075dc768..48810438 100644
--- a/assets/.asset_manifest_public.json
+++ b/assets/.asset_manifest_public.json
@@ -1,4 +1,6 @@
[
+ "ba_data/python/__pycache__/_bainternal.cpython-310.opt-1.pyc",
+ "ba_data/python/_bainternal.py",
"ba_data/python/ba/__init__.py",
"ba_data/python/ba/__pycache__/__init__.cpython-310.opt-1.pyc",
"ba_data/python/ba/__pycache__/_accountv1.cpython-310.opt-1.pyc",
diff --git a/assets/Makefile b/assets/Makefile
index 88f68306..685f0810 100644
--- a/assets/Makefile
+++ b/assets/Makefile
@@ -133,6 +133,7 @@ endef
# __AUTOGENERATED_PUBLIC_BEGIN__
SCRIPT_TARGETS_PY_PUBLIC = \
+ build/ba_data/python/_bainternal.py \
build/ba_data/python/ba/__init__.py \
build/ba_data/python/ba/_accountv1.py \
build/ba_data/python/ba/_accountv2.py \
@@ -383,6 +384,7 @@ SCRIPT_TARGETS_PY_PUBLIC = \
build/server/ballisticacore_server.py
SCRIPT_TARGETS_PYC_PUBLIC = \
+ build/ba_data/python/__pycache__/_bainternal.cpython-310.opt-1.pyc \
build/ba_data/python/ba/__pycache__/__init__.cpython-310.opt-1.pyc \
build/ba_data/python/ba/__pycache__/_accountv1.cpython-310.opt-1.pyc \
build/ba_data/python/ba/__pycache__/_accountv2.cpython-310.opt-1.pyc \
diff --git a/assets/src/ba_data/python/._ba_sources_hash b/assets/src/ba_data/python/._ba_sources_hash
index 80b3d16b..1de0c1be 100644
--- a/assets/src/ba_data/python/._ba_sources_hash
+++ b/assets/src/ba_data/python/._ba_sources_hash
@@ -1 +1 @@
-70054840476702184810018356968995584648
\ No newline at end of file
+35892999596210727401283369713319458531
\ No newline at end of file
diff --git a/assets/src/ba_data/python/._bainternal_sources_hash b/assets/src/ba_data/python/._bainternal_sources_hash
new file mode 100644
index 00000000..1de0c1be
--- /dev/null
+++ b/assets/src/ba_data/python/._bainternal_sources_hash
@@ -0,0 +1 @@
+35892999596210727401283369713319458531
\ No newline at end of file
diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py
index f5028a62..58948f52 100644
--- a/assets/src/ba_data/python/_ba.py
+++ b/assets/src/ba_data/python/_ba.py
@@ -3,12 +3,12 @@
"""A dummy stub module for the real _ba.
The real _ba is a compiled extension module and only available
-in the live game. This dummy module allows Pylint/Mypy/etc. to
-function reasonably well outside of the game.
+in the live engine. This dummy-module allows Pylint/Mypy/etc. to
+function reasonably well outside of that environment.
-Make sure this file is never included in an actual game distro!
+Make sure this file is never included in live script dirs!
-Ideally this should be a stub (.pyi) file, but we'd need
+In the future perhaps this can be a stub (.pyi) file, but we will need
to make sure that it still works with all our tools
(mypy, pylint, pycharm).
diff --git a/assets/src/ba_data/python/_bainternal.py b/assets/src/ba_data/python/_bainternal.py
new file mode 100644
index 00000000..e5e7de1d
--- /dev/null
+++ b/assets/src/ba_data/python/_bainternal.py
@@ -0,0 +1,244 @@
+# Released under the MIT License. See LICENSE for details.
+#
+"""A dummy stub module for the real _bainternal.
+
+The real _bainternal is a compiled extension module and only available
+in the live engine. This dummy-module allows Pylint/Mypy/etc. to
+function reasonably well outside of that environment.
+
+Make sure this file is never included in live script dirs!
+
+In the future perhaps this can be a stub (.pyi) file, but we will need
+to make sure that it still works with all our tools
+(mypy, pylint, pycharm).
+
+NOTE: This file was autogenerated by batools.dummymodule; do not edit by hand.
+"""
+
+# I'm sorry Pylint. I know this file saddens you. Be strong.
+# pylint: disable=useless-suppression
+# pylint: disable=unnecessary-pass
+# pylint: disable=use-dict-literal
+# pylint: disable=use-list-literal
+# pylint: disable=unused-argument
+# pylint: disable=missing-docstring
+# pylint: disable=too-many-locals
+# pylint: disable=redefined-builtin
+# pylint: disable=too-many-lines
+# pylint: disable=redefined-outer-name
+# pylint: disable=invalid-name
+# pylint: disable=no-value-for-parameter
+
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, TypeVar
+
+if TYPE_CHECKING:
+ from typing import Any, Callable
+
+_T = TypeVar('_T')
+
+
+def _uninferrable() -> Any:
+ """Get an "Any" in mypy and "uninferrable" in Pylint."""
+ # pylint: disable=undefined-variable
+ return _not_a_real_variable # type: ignore
+
+
+def add_transaction(transaction: dict,
+ callback: Callable | None = None) -> None:
+ """(internal)"""
+ return None
+
+
+def game_service_has_leaderboard(game: str, config: str) -> bool:
+ """(internal)
+
+ Given a game and config string, returns whether there is a leaderboard
+ for it on the game service.
+ """
+ return bool()
+
+
+def get_master_server_address(source: int = -1,
+ version: int = 1,
+ internal: bool = False) -> str:
+ """(internal)
+
+ Return the address of the master server.
+ """
+ return str()
+
+
+def get_news_show() -> str:
+ """(internal)"""
+ return str()
+
+
+def get_price(item: str) -> str | None:
+ """(internal)"""
+ return ''
+
+
+def get_public_login_id() -> str | None:
+ """(internal)"""
+ return ''
+
+
+def get_purchased(item: str) -> bool:
+ """(internal)"""
+ return bool()
+
+
+def get_purchases_state() -> int:
+ """(internal)"""
+ return int()
+
+
+def get_v1_account_display_string(full: bool = True) -> str:
+ """(internal)"""
+ return str()
+
+
+def get_v1_account_misc_read_val(name: str, default_value: Any) -> Any:
+ """(internal)"""
+ return _uninferrable()
+
+
+def get_v1_account_misc_read_val_2(name: str, default_value: Any) -> Any:
+ """(internal)"""
+ return _uninferrable()
+
+
+def get_v1_account_misc_val(name: str, default_value: Any) -> Any:
+ """(internal)"""
+ return _uninferrable()
+
+
+def get_v1_account_name() -> str:
+ """(internal)"""
+ return str()
+
+
+def get_v1_account_state() -> str:
+ """(internal)"""
+ return str()
+
+
+def get_v1_account_state_num() -> int:
+ """(internal)"""
+ return int()
+
+
+def get_v1_account_ticket_count() -> int:
+ """(internal)
+
+ Returns the number of tickets for the current account.
+ """
+ return int()
+
+
+def get_v1_account_type() -> str:
+ """(internal)"""
+ return str()
+
+
+def get_v2_fleet() -> str:
+ """(internal)"""
+ return str()
+
+
+def have_outstanding_transactions() -> bool:
+ """(internal)"""
+ return bool()
+
+
+def in_game_purchase(item: str, price: int) -> None:
+ """(internal)"""
+ return None
+
+
+def is_blessed() -> bool:
+ """(internal)"""
+ return bool()
+
+
+def mark_config_dirty() -> None:
+ """(internal)
+
+ Category: General Utility Functions
+ """
+ return None
+
+
+def power_ranking_query(callback: Callable, season: Any = None) -> None:
+ """(internal)"""
+ return None
+
+
+def purchase(item: str) -> None:
+ """(internal)"""
+ return None
+
+
+def report_achievement(achievement: str, pass_to_account: bool = True) -> None:
+ """(internal)"""
+ return None
+
+
+def reset_achievements() -> None:
+ """(internal)"""
+ return None
+
+
+def restore_purchases() -> None:
+ """(internal)"""
+ return None
+
+
+def run_transactions() -> None:
+ """(internal)"""
+ return None
+
+
+def sign_in_v1(account_type: str) -> None:
+ """(internal)
+
+ Category: General Utility Functions
+ """
+ return None
+
+
+def sign_out_v1(v2_embedded: bool = False) -> None:
+ """(internal)
+
+ Category: General Utility Functions
+ """
+ return None
+
+
+def submit_score(game: str,
+ config: str,
+ name: Any,
+ score: int | None,
+ callback: Callable,
+ friend_callback: Callable | None,
+ order: str = 'increasing',
+ tournament_id: str | None = None,
+ score_type: str = 'points',
+ campaign: str | None = None,
+ level: str | None = None) -> None:
+ """(internal)
+
+ Submit a score to the server; callback will be called with the results.
+ As a courtesy, please don't send fake scores to the server. I'd prefer
+ to devote my time to improving the game instead of trying to make the
+ score server more mischief-proof.
+ """
+ return None
+
+
+def tournament_query(callback: Callable[[dict | None], None],
+ args: dict) -> None:
+ """(internal)"""
+ return None
diff --git a/assets/src/ba_data/python/ba/_bootstrap.py b/assets/src/ba_data/python/ba/_bootstrap.py
index 434ef16d..1c321304 100644
--- a/assets/src/ba_data/python/ba/_bootstrap.py
+++ b/assets/src/ba_data/python/ba/_bootstrap.py
@@ -32,7 +32,7 @@ def bootstrap() -> None:
# Give a soft warning if we're being used with a different binary
# version than we expect.
- expected_build = 20756
+ expected_build = 20760
running_build: int = env['build_number']
if running_build != expected_build:
print(
diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml
index b10c4aa3..96b9308c 100644
--- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml
+++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml
@@ -3,6 +3,7 @@
NOMINMAX
aabb
+ aate
abcdefghijklmnopqrstuvwxyz
abcdefghjkmnpqrtuvwxy
abouttab
@@ -90,6 +91,7 @@
backporting
backtraces
backwin
+ bainternal
ballistica
ballisticacore
bamasteraddr
@@ -157,8 +159,10 @@
bscfg
bsgaps
bsgdps
+ bsgp
bsivu
bsmhi
+ bsremote
bsstd
bstat
bstr
@@ -356,6 +360,7 @@
dstpath
dstr
dtest
+ dummymodules
dummyret
dummyval
dummyvalid
@@ -759,6 +764,7 @@
masterver
mastervers
maximus
+ maxpathlen
maxtries
maxwait
maxwidth
@@ -778,6 +784,7 @@
mikirog
millisecs
minelem
+ miniplayer
minping
minsdl
mipmapcount
@@ -826,6 +833,7 @@
mywidget
namecap
nameval
+ nbuffer
ndebug
nearbytab
nearstr
@@ -1226,6 +1234,7 @@
ssval
standin
startedptr
+ startms
startpos
startsplits
starttime
@@ -1399,6 +1408,7 @@
vbos
vbuf
vcache
+ vdata
vdynamic
vertout
verts
diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc
index 41e926ce..d6b7eb77 100644
--- a/src/ballistica/ballistica.cc
+++ b/src/ballistica/ballistica.cc
@@ -18,43 +18,43 @@
#include "ballistica/platform/platform.h"
#include "ballistica/python/python.h"
#include "ballistica/scene/scene.h"
-#include "ballistica/ui/ui.h"
namespace ballistica {
// These are set automatically via script; don't modify them here.
-const int kAppBuildNumber = 20756;
+const int kAppBuildNumber = 20760;
const char* kAppVersion = "1.7.7";
// Our standalone globals.
// These are separated out for easy access.
// Everything else should go into AppGlobals (or more ideally into a class).
int g_early_log_writes{10};
-Thread* g_main_thread{};
-AppGlobals* g_app_globals{};
+
+Account* g_account{};
AppConfig* g_app_config{};
+AppGlobals* g_app_globals{};
AppInternal* g_app_internal{};
App* g_app{};
-Account* g_account{};
-Game* g_game{};
+Audio* g_audio{};
+AudioServer* g_audio_server{};
BGDynamics* g_bg_dynamics{};
BGDynamicsServer* g_bg_dynamics_server{};
-Platform* g_platform{};
-Utils* g_utils{};
-UI* g_ui{};
+Game* g_game{};
Graphics* g_graphics{};
-Python* g_python{};
-Input* g_input{};
GraphicsServer* g_graphics_server{};
+Input* g_input{};
+Thread* g_main_thread{};
Media* g_media{};
-Audio* g_audio{};
MediaServer* g_media_server{};
-AudioServer* g_audio_server{};
-StdInputModule* g_std_input_module{};
NetworkReader* g_network_reader{};
Networking* g_networking{};
NetworkWriteModule* g_network_write_module{};
+Platform* g_platform{};
+Python* g_python{};
+StdInputModule* g_std_input_module{};
TextGraphics* g_text_graphics{};
+UI* g_ui{};
+Utils* g_utils{};
// Basic overview of our bootstrapping process:
// 1: All threads and globals are created and provisioned. Everything above
diff --git a/src/ballistica/python/python.cc b/src/ballistica/python/python.cc
index b224b41a..135b36c1 100644
--- a/src/ballistica/python/python.cc
+++ b/src/ballistica/python/python.cc
@@ -1033,6 +1033,7 @@ auto AddClass(PyObject* module) -> PyObject* {
BA_PRECONDITION(r == 0);
return reinterpret_cast(&T::type_obj);
}
+
auto Python::InitModuleClasses(PyObject* module) -> void {
// Init our classes and add them to our module.
AddClass(module);
diff --git a/tools/batools/dummymodule.py b/tools/batools/dummymodule.py
index 6569811c..55ffe80c 100755
--- a/tools/batools/dummymodule.py
+++ b/tools/batools/dummymodule.py
@@ -1,10 +1,10 @@
# Released under the MIT License. See LICENSE for details.
#
-"""Generates a dummy _ba.py based on the game's real internal _ba module.
+"""Generates a dummy _ba.py and _bainternal.py based on binary modules.
-This allows us to use code introspection tools such as pylint from outside
-the game, and also allows external scripts to import game scripts successfully
-(though with limited functionality)
+This allows us to use code introspection tools such as pylint without spinning
+up the engine, and also allows external scripts to import game scripts
+successfully (albeit with limited functionality).
"""
from __future__ import annotations
@@ -201,10 +201,6 @@ def _writefuncs(parent: Any, funcnames: Sequence[str], indent: int,
'import ba # pylint: disable=cyclic-import\nreturn ' +
returns + '()')
- # we'll also have to go without a sig
- # (could use the equivalent _ba class perhaps)
- # sig = sig.split('->')[0]
-
elif returns in {'object', 'Any'}:
# We use 'object' when we mean "can vary"
@@ -614,9 +610,10 @@ def _writeclasses(module: ModuleType, classnames: Sequence[str]) -> str:
return out
-def generate(sources_hash: str, outfilename: str) -> None:
+def generate(mname: str, sources_hash: str, outfilename: str) -> None:
"""Run the actual generation from within the game."""
- import _ba as module
+ # pylint: disable=too-many-locals
+ module = __import__(mname)
from efrotools import get_public_license, PYVER
import types
funcnames = []
@@ -626,7 +623,7 @@ def generate(sources_hash: str, outfilename: str) -> None:
funcnames.append(entry)
elif isinstance(getattr(module, entry), type):
classnames.append(entry)
- elif entry == 'app':
+ elif mname == '_ba' and entry == 'app':
# Ignore _ba.app.
continue
else:
@@ -634,18 +631,31 @@ def generate(sources_hash: str, outfilename: str) -> None:
f'found unknown obj {entry}, {getattr(module, entry)}')
funcnames.sort()
classnames.sort()
+ typing_imports = ('TYPE_CHECKING, overload, Sequence, TypeVar'
+ if mname == '_ba' else 'TYPE_CHECKING, TypeVar')
+ typing_imports_tc = ('Any, Callable, Literal'
+ if mname == '_ba' else 'Any, Callable')
+ tc_import_lines_extra = (' from ba._app import App\n'
+ ' import ba\n' if mname == '_ba' else '')
+ app_declare_lines = ('app: App\n'
+ '\n' if mname == '_ba' else '')
+ enum_import_lines = (
+ 'from ba._generated.enums import TimeFormat, TimeType\n'
+ '\n' if mname == '_ba' else '')
out = (get_public_license('python')
+ '\n'
'#\n'
- '"""A dummy stub module for the real _ba.\n'
+ f'"""A dummy stub module for the real {mname}.\n'
'\n'
- 'The real _ba is a compiled extension module and only available\n'
- 'in the live game. This dummy module allows Pylint/Mypy/etc. to\n'
- 'function reasonably well outside of the game.\n'
+ f'The real {mname} is a compiled extension module'
+ ' and only available\n'
+ 'in the live engine. This dummy-module allows Pylint/Mypy/etc. to\n'
+ 'function reasonably well outside of that environment.\n'
'\n'
- 'Make sure this file is never included in an actual game distro!\n'
+ 'Make sure this file is never included in live script dirs!\n'
'\n'
- 'Ideally this should be a stub (.pyi) file, but we\'d need\n'
+ 'In the future perhaps this can be a stub (.pyi) file, but'
+ ' we will need\n'
'to make sure that it still works with all our tools\n'
'(mypy, pylint, pycharm).\n'
'\n'
@@ -672,20 +682,17 @@ def generate(sources_hash: str, outfilename: str) -> None:
'\n'
'from __future__ import annotations\n'
'\n'
- 'from typing import TYPE_CHECKING, overload, Sequence, TypeVar\n'
- '\n'
- 'from ba._generated.enums import TimeFormat, TimeType\n'
+ f'from typing import {typing_imports}\n'
'\n'
+ f'{enum_import_lines}'
'if TYPE_CHECKING:\n'
- ' from typing import Any, Callable, Literal\n'
- ' from ba._app import App\n'
- ' import ba\n'
+ f' from typing import {typing_imports_tc}\n'
+ f'{tc_import_lines_extra}'
'\n'
'\n'
"_T = TypeVar('_T')\n"
'\n'
- 'app: App\n'
- '\n'
+ f'{app_declare_lines}'
'def _uninferrable() -> Any:\n'
' """Get an "Any" in mypy and "uninferrable" in Pylint."""\n'
' # pylint: disable=undefined-variable\n'
@@ -698,7 +705,7 @@ def generate(sources_hash: str, outfilename: str) -> None:
out += _writefuncs(module, funcnames, indent=0, spacing=2, as_method=False)
outhashpath = os.path.join(os.path.dirname(outfilename),
- '._ba_sources_hash')
+ f'.{mname}_sources_hash')
with open(outfilename, 'w', encoding='utf-8') as outfile:
outfile.write(out)
@@ -711,8 +718,8 @@ def generate(sources_hash: str, outfilename: str) -> None:
check=True)
-def _dummy_module_dirty() -> tuple[bool, str]:
- """Test hashes on the dummy module to see if it needs updates."""
+def _dummy_module_dirty(mname: str) -> tuple[bool, str]:
+ """Test hashes on the dummy-module to see if it needs updates."""
# Let's generate a hash from all sources under the python source dir.
pysources = []
@@ -725,7 +732,7 @@ def _dummy_module_dirty() -> tuple[bool, str]:
# Also lets add this script so we re-create when it changes.
pysources.append(__file__)
- outpath = 'assets/src/ba_data/python/._ba_sources_hash'
+ outpath = f'assets/src/ba_data/python/.{mname}_sources_hash'
if not os.path.exists(outpath):
existing_hash = ''
else:
@@ -743,12 +750,9 @@ def _dummy_module_dirty() -> tuple[bool, str]:
def update(projroot: str, check: bool, force: bool) -> None:
- """Update the dummy module as needed."""
+ """Update dummy-modules as needed."""
toolsdir = os.path.abspath(os.path.join(projroot, 'tools'))
- outfilename = os.path.abspath(
- os.path.join(projroot, 'assets/src/ba_data/python/_ba.py'))
-
# Make sure we're running from the project root dir.
os.chdir(projroot)
@@ -756,53 +760,61 @@ def update(projroot: str, check: bool, force: bool) -> None:
if force and check:
raise Exception('cannot specify both force and check mode')
- dirty, sources_hash = _dummy_module_dirty()
+ for mname in ('_ba', '_bainternal'):
+ outfilename = os.path.abspath(
+ os.path.join(projroot, f'assets/src/ba_data/python/{mname}.py'))
- if dirty:
- if check:
- print(f'{Clr.RED}ERROR: dummy _ba module'
- f' is out of date.{Clr.RST}')
- sys.exit(255)
- elif not force:
- # Dummy module is clean and force is off; we're done here.
- print('Dummy module _ba.py is up to date.')
- sys.exit(0)
+ dirty, sources_hash = _dummy_module_dirty(mname)
- print(f'{Clr.MAG}Updating _ba.py Dummy Module...{Clr.RST}')
+ if dirty:
+ if check:
+ print(f'{Clr.RED}ERROR: dummy {mname} module'
+ f' is out of date.{Clr.RST}')
+ sys.exit(255)
+ elif not force:
+ # Dummy-module is clean and force is off; we're done here.
+ print(f'Dummy-module {Clr.BLD}{mname}.py{Clr.RST} is up to date.')
+ continue
- # Let's build the cmake version; no sandboxing issues to contend with
- # there. Also going with the headless build; will need to revisit if
- # there's ever any functionality not available in that build.
- subprocess.run(['make', 'cmake-server-build'], check=True)
+ print(f'{Clr.MAG}Updating {Clr.BLD}{mname}.py{Clr.RST}{Clr.MAG}'
+ f' dummy-module...{Clr.RST}')
- # Launch ballistica and exec ourself from within it.
- print('Launching ballisticacore to generate dummy-module...')
- try:
- subprocess.run(
- [
- './ballisticacore',
- '-exec',
- f'try:\n'
- f' import sys\n'
- f' sys.path.append("{toolsdir}")\n'
- f' from batools import dummymodule\n'
- f' dummymodule.generate(sources_hash="{sources_hash}",\n'
- f' outfilename="{outfilename}")\n'
- f' ba.quit()\n'
- f'except Exception as exc:\n'
- f' import sys\n'
- f' import traceback\n'
- f' print("ERROR GENERATING DUMMY MODULE")\n'
- f' traceback.print_exc()\n'
- f' sys.exit(255)\n',
- ],
- cwd='build/cmake/server-debug/dist',
- check=True,
- )
- except Exception as exc2:
- # Keep our error simple here; we want focus to be on what went
- # wrong withing BallisticaCore.
- raise CleanError(
- 'BallisticaCore dummy-module generation failed.') from exc2
+ # Let's build the cmake version; no sandboxing issues to contend with
+ # there. Also going with the headless build; will need to revisit if
+ # there's ever any functionality not available in that build.
+ subprocess.run(['make', 'cmake-server-build'], check=True)
- print('Dummy-module generation complete.')
+ # Launch ballisticacore and exec ourself from within it.
+ print(f'Launching ballisticacore to generate'
+ f' {Clr.BLD}{mname}.py{Clr.RST} dummy-module...')
+ try:
+ subprocess.run(
+ [
+ './ballisticacore',
+ '-exec',
+ f'try:\n'
+ f' import sys\n'
+ f' sys.path.append("{toolsdir}")\n'
+ f' from batools import dummymodule\n'
+ f' dummymodule.generate(mname="{mname}",\n'
+ f' sources_hash="{sources_hash}",\n'
+ f' outfilename="{outfilename}")\n'
+ f' ba.quit()\n'
+ f'except Exception as exc:\n'
+ f' import sys\n'
+ f' import traceback\n'
+ f' print("ERROR GENERATING {mname} DUMMY-MODULE")\n'
+ f' traceback.print_exc()\n'
+ f' sys.exit(255)\n',
+ ],
+ cwd='build/cmake/server-debug/dist',
+ check=True,
+ )
+ print(
+ f'{Clr.BLU}{mname} dummy-module generation complete.{Clr.RST}')
+
+ except Exception as exc2:
+ # Keep our error simple here; we want focus to be on what went
+ # wrong withing BallisticaCore.
+ raise CleanError(
+ 'BallisticaCore dummy-module generation failed.') from exc2
diff --git a/tools/batools/pcommand.py b/tools/batools/pcommand.py
index 1ed0fbfc..4271f054 100644
--- a/tools/batools/pcommand.py
+++ b/tools/batools/pcommand.py
@@ -999,8 +999,8 @@ def gen_python_init_module() -> None:
'#\n')
-def update_dummy_module() -> None:
- """Update our _ba dummy module."""
+def update_dummy_modules() -> None:
+ """Update our _ba.py and _bainternal.py dummy modules."""
from batools.dummymodule import update
update(projroot=str(PROJROOT),
check='--check' in sys.argv,
diff --git a/tools/batools/project.py b/tools/batools/project.py
index 0bd71885..4d8898bf 100755
--- a/tools/batools/project.py
+++ b/tools/batools/project.py
@@ -101,7 +101,7 @@ class Updater:
self._apply_line_changes()
self._apply_file_changes()
- self._update_dummy_module()
+ self._update_dummy_modules()
# Though not technically necessary, let's go ahead and update
# irony compile-commands, tool configs, etc. as part of the
@@ -659,13 +659,13 @@ class Updater:
raise CleanError(
'Error checking/updating resources Makefile.') from exc
- def _update_dummy_module(self) -> None:
+ def _update_dummy_modules(self) -> None:
# Update our dummy _ba module.
# Note: This should happen near the end because it may run the cmake
# build so its success may depend on the cmake build files having
# already been updated.
try:
- subprocess.run(['tools/pcommand', 'update_dummy_module'] +
+ subprocess.run(['tools/pcommand', 'update_dummy_modules'] +
self._checkarglist,
check=True)
except Exception as exc:
diff --git a/tools/pcommand b/tools/pcommand
index 55ba4bce..eb9737e1 100755
--- a/tools/pcommand
+++ b/tools/pcommand
@@ -42,7 +42,7 @@ from batools.pcommand import (
gen_flat_data_code, wsl_path_to_win, wsl_build_check_win_drive,
win_ci_binary_build, genchangelog, android_sdk_utils,
update_resources_makefile, update_meta_makefile, gen_python_enums_module,
- gen_python_init_module, update_dummy_module, win_ci_install_prereqs,
+ gen_python_init_module, update_dummy_modules, win_ci_install_prereqs,
version)
# pylint: enable=unused-import