diff --git a/.efrocachemap b/.efrocachemap
index 1a14b3aa..ed82a109 100644
--- a/.efrocachemap
+++ b/.efrocachemap
@@ -420,32 +420,32 @@
"assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/d5/f8/de3b22ac60d0caee44369117c8db",
"assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/c7/37/660e2ceca8b9b2db2cfce5a9f6f0",
"assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/d9/82/92157cb4f21fdd8c911eec910ad4",
- "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/d2/3b/8570014ea8623a9acd11cff77b51",
+ "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/4b/50/f349b757f92f6362a39f70ea7a80",
"assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/45/70/91f386517fa3dc7322e1345ee1ab",
"assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503",
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/55/93/1f358b653e9a347593d9b23f0061",
"assets/build/ba_data/data/languages/chinesetraditional.json": "https://files.ballistica.net/cache/ba1/60/48/bf681053e91e38d0f4c4b1f8f1a6",
"assets/build/ba_data/data/languages/croatian.json": "https://files.ballistica.net/cache/ba1/6c/2b/7a0669cc74fbcebbb76c440c6c04",
- "assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/87/84/9f3d39610453b3bf350698a23316",
+ "assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/61/77/ae85d46474923707f8a7190849a2",
"assets/build/ba_data/data/languages/danish.json": "https://files.ballistica.net/cache/ba1/3f/46/e4da3c1d2b0ebf916df55c608b28",
"assets/build/ba_data/data/languages/dutch.json": "https://files.ballistica.net/cache/ba1/68/93/da8e9874f41a786edf52ba4ccaad",
- "assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/2c/41/2c43429b95bef4e88fc279071470",
+ "assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/13/42/9585944a58dd340611373a48732f",
"assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/4c/c7/0184b8178869d1a3827a1bfcd5bb",
"assets/build/ba_data/data/languages/filipino.json": "https://files.ballistica.net/cache/ba1/a6/43/180ad35f294f7087661479687a12",
"assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/b6/e0/37dd30b686f475733ccc4b3cab49",
"assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/c0/26/04875251b9237f3133c84a910afd",
- "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/a6/d8/ef66df542461dda9f0dff66eb2e9",
+ "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/f6/5c/591661f58ee2cf4a78fd8fa54bed",
"assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/82/eb/37ff44af76812097f9c98f05c730",
"assets/build/ba_data/data/languages/hindi.json": "https://files.ballistica.net/cache/ba1/08/3b/68cea4d16f7020d932829af85323",
"assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/b0/48/e1ebe08bfdfc94fcb61a16b851e5",
"assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/75/70/e33e6ee95830052e8f36cd2135f7",
"assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/f3/11/d81cc9f0c76b81b0b8dcf64fe292",
"assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/07/37/ab65ccee3a555bd40e9661860c58",
- "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/02/ab/e310f81582b6dc2ae93348d45166",
+ "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/1b/45/b1e45fe07e0d632e979a9433dadd",
"assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/76/be/84e567de0aabd9f9145b62179c2c",
"assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/08/be/543b564010ad45e191d6ff5f130b",
"assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/df/30/9ab2f22cdd54f0393a7d2aba2ae0",
- "assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/37/ee/ce17003d5ce5699e07b2eea59c9a",
+ "assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/f2/41/d4f06aabfc3499534e04fedb10dd",
"assets/build/ba_data/data/languages/serbian.json": "https://files.ballistica.net/cache/ba1/13/19/828be486951be254445263f36c6e",
"assets/build/ba_data/data/languages/slovak.json": "https://files.ballistica.net/cache/ba1/f9/4b/d9f01814224066856695452ef57c",
"assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/bc/93/b5d78fcd8cdffda7f3d9cc238cef",
@@ -3995,26 +3995,26 @@
"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/da/2b/56328e0ba415b8e6e8eb1ff29482",
- "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/81/3a/f0f61b8f35eb0643a88b0885a79c",
- "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/95/8e/d0e33cd63f054c4514e393a2f1a5",
- "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/00/6d/0667ba0d67aad0c026faaa8e8a28",
- "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/ab/d0/f27f1e356c0488bd853fc6cc7f9b",
- "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d5/f3/08bc34448e6ef62814f298b3a9cd",
- "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/6b/fc/f65a6c158df8d97dd79a374626e1",
- "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/22/8b/2730908a2456f6cfef5a9115b3b9",
- "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4e/ee/753818cbcc876116151ea549e2e2",
- "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/08/ff/fceff2784ddce6d40427b0d1306f",
- "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e9/bf/97e39a6a1e8d52e936cafcdde064",
- "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8e/67/0e305470e785e0727fbfddcfea0f",
- "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7e/46/690e09f0b3b7b9232d92fd1d471d",
- "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fc/70/59ee010a542cc2224e1f488b7622",
- "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/32/84/e7d0245756375243c003d3a0da6b",
- "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f8/fd/a60efb43c5211f142b88c7623fbb",
- "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c7/df/452750d9184979e4059ffb5a4530",
- "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/a7/33/ad262a7b5eac8c6d4d1bba840150",
- "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/21/44/f55871875f1636a15aa706910121",
- "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ca/5e/8f957adc88d0603d94f8fedda70d",
+ "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/c5/78/166434347d693336296e22a0a323",
+ "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/c9/3f6dd21934fcc9a976eabfee6d66",
+ "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/90/4a/459b3ab70f74cc304333ba21966f",
+ "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/28/d8/22228717045fccdfc04a0e90e6db",
+ "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/7e/ce/05d5c642453a7659933dc8aa4641",
+ "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d9/b7/2da6d8f9ebf5d18b571277beab77",
+ "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9e/b4/97a4db9c86955924294a6ac7c81c",
+ "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1d/a8/afec9ed5dbea84d094138f43748c",
+ "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/69/05/7908bef9451eb8b7dfb88cee8eac",
+ "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/bf/4b/a911064303941c3e0641492fdad4",
+ "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/63/fb/3c193820bf3ad29184f6db31bbe9",
+ "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/24/5d/07253c060d12590b905ef7b9dd2d",
+ "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d2/6b/390798978c1fe4f202f1fe6ff5af",
+ "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/df/36/9390056f405515198ba22b222851",
+ "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0e/3c/a53a3c9f2e47037b9c0c23d43d00",
+ "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8e/db/d3837335b9a3f55808060928a97c",
+ "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/94/a2/d9c48b67391e211a40af6fdfb607",
+ "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/c0/dc/c2e97b01e7f8091661acdc176b72",
+ "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/bf/4b/59fbf05daccfe8b5429dd3d402f3",
+ "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/6d/8f/6a5aeda4b4d1aa0c9528196da5f9",
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3c/08/bcb4ce1689de4f0a4ffe1d7c542f",
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/67/44/8916488c91538d83248f0ec5a2e5",
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8c/d7/6ff4bfa3bb6805fa812fb023876e",
@@ -4031,14 +4031,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/aa/c5/159b01f8dc8a4201dec430c77a5c",
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c3/ec/f087eff8388ef3f0a16699bb44b3",
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/64/98/01a2649fa88ad6513e8c36d3ac04",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/a4/f9/994f2d5d466b8c50ba126425f22b",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/32/31/5b8f78f8931c22f550e7441b5488",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/f0/65/527320489d18c1554b9f5bbe95f3",
- "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/fb/9a/a151bc4666259655645d8e017a9e",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/75/e7/953bcddc7df64ba31c74110a5b04",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/86/cb/bb2a9f4005fc6d3667c586dcc8c0",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/55/a4/e4e0859afb82e96166b725c61b76",
- "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/38/c8/76e0e29dbb11d314322f9f3467ef",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ee/67/86f37883c1d82436296c107cb0af",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b6/0a/288ab61d465b4901cf7112a241c9",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/73/88/561fac00c0eb27f6b451322cf777",
+ "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/e6/11/73127ddbd3a779076770a7448ce1",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/2a/3c/ef57604bb8e94075d74eafe258e3",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/5d/ca/0e6d9a2ac4d0f750b8295b6d775e",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/ff/e3/f03bc482b4e305288e7418acb38a",
+ "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/8a/33/713bfca4012f0d1b7b7b4e896d46",
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/6e/6f/004b696e9a13b083069374e4bb6a",
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/d3/db/e73d4dcf1280d5f677c3cf8b47c3"
}
\ No newline at end of file
diff --git a/.idea/dictionaries/ericf.xml b/.idea/dictionaries/ericf.xml
index a624394b..3f27d8c7 100644
--- a/.idea/dictionaries/ericf.xml
+++ b/.idea/dictionaries/ericf.xml
@@ -434,6 +434,7 @@
cmodel
cmodules
cmpf
+ cmplen
cnode
codecsmodule
codedata
@@ -624,6 +625,7 @@
dlldir
dlls
dmake
+ dmgname
dmitry
dmodule
dmypy
@@ -654,6 +656,7 @@
drawscore
drawscreen
dripity
+ drooopyyy
dropbox
dropdir
drumroll
@@ -1771,9 +1774,11 @@
passwd
patcomp
pathcapture
+ pathdst
pathlib
pathnames
pathparts
+ pathsrc
pathstonames
pathtmp
patsubst
@@ -2719,6 +2724,7 @@
vert
verts
virotic
+ vishal
vmaddr
vmcfg
vmhgfs
diff --git a/CHANGELOG.md b/CHANGELOG.md
index c1bf732d..9cf9d303 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,4 @@
-### 1.7.4 (20645, 2022-07-09)
+### 1.7.4 (20646, 2022-07-12)
- Fixed the trophies list showing an incorrect total (Thanks itsre3!)
- ba.app.meta.metascan is now ba.app.meta.scanresults
- Cleaned up co-op ui code a bit
@@ -8,6 +8,8 @@
- Updated the 'Show Mods Folder' to properly show the path to the mods folder. Before it would unhelpfully show something like `/mods` but now it should be something more useful like `Android/data/net.froemling.bombsquad/files/mods`.
- Updated the Modding Guide button in advanced settings to point to the new ballistica wiki stuff instead of the old out-of-date 1.4 modding docs.
- Added ba.app.net.sslcontext which is a shared SSLContext we can recycle for our https requests. It turns out it can take upwards of 1 second on older Android devices to create a default SSLContext, so this can provide a nice speedup compared to the default behavior of creating a new default one for each request.
+- Rewrote Google Play version purchasing code using Google's newest libraries (Google Play Billing 5.0). This should make everything more reliable, but please holler if you try to purchase anything in the game and run into problems.
+- It is now possible on the Google Play version to purchase things like Pro more than once for different accounts.
### 1.7.3 (20634, 2022-07-06)
- Fixed an issue with King of the Hill flag regions not working when players entered them (Thanks itsre3!)
diff --git a/assets/src/ba_data/python/bastd/ui/creditslist.py b/assets/src/ba_data/python/bastd/ui/creditslist.py
index 322c864c..c266fc56 100644
--- a/assets/src/ba_data/python/bastd/ui/creditslist.py
+++ b/assets/src/ba_data/python/bastd/ui/creditslist.py
@@ -207,10 +207,15 @@ class CreditsListWindow(ba.Window):
'\n' + '\n'.join(translation_names.splitlines()[:146]) +
'\n'.join(translation_names.splitlines()[146:]) + '\n'
'\n'
- ' Shout Out to Awesome Mods / Modders:\n\n'
+ ' Shout Out to Awesome Mods / Modders / Contributors:\n\n'
' BombDash ModPack\n'
' TheMikirog & SoK - BombSquad Joyride Modpack\n'
' Mrmaxmeier - BombSquad-Community-Mod-Manager\n'
+ ' Ritiek Malhotra \n'
+ ' Dliwk\n'
+ ' vishal332008\n'
+ ' itsre3\n'
+ ' Drooopyyy\n'
'\n'
' Holiday theme vector art designed by Freepik\n'
'\n'
diff --git a/assets/src/ba_data/python/bastd/ui/tournamententry.py b/assets/src/ba_data/python/bastd/ui/tournamententry.py
index e77a5c7a..a495792f 100644
--- a/assets/src/ba_data/python/bastd/ui/tournamententry.py
+++ b/assets/src/ba_data/python/bastd/ui/tournamententry.py
@@ -182,8 +182,9 @@ class TournamentEntryWindow(popup.PopupWindow):
h_align='center',
v_align='center',
scale=0.6,
- text=ba.Lstr(resource='watchAVideoText',
- fallback_resource='watchAnAdText'),
+ # Note: AdMob now requires rewarded ad usage
+ # specifically says 'Ad' in it.
+ text=ba.Lstr(resource='watchAnAdText'),
maxwidth=95,
color=(0, 1, 0))
ad_plays_remaining_text = (
diff --git a/ballisticacore-cmake/.idea/dictionaries/ericf.xml b/ballisticacore-cmake/.idea/dictionaries/ericf.xml
index 8378d5b1..f710b4b1 100644
--- a/ballisticacore-cmake/.idea/dictionaries/ericf.xml
+++ b/ballisticacore-cmake/.idea/dictionaries/ericf.xml
@@ -225,6 +225,7 @@
cmds
cmdvals
cmodules
+ cmplen
codedata
codewarrior
codewarrior's
@@ -328,6 +329,7 @@
dliwk
dllpath
dmake
+ dmgname
dname
dncm
dobell
@@ -339,6 +341,7 @@
dpad
dpads
dpos
+ drooopyyy
drpt
dsize
dsound
@@ -921,7 +924,9 @@
parameteriv
passcode
pathcapture
+ pathdst
pathparts
+ pathsrc
pausable
pcommands
pdataclass
@@ -1380,6 +1385,7 @@
vertout
verts
vidia
+ vishal
vmag
vorbis
vorbisfile
diff --git a/src/ballistica/ballistica.cc b/src/ballistica/ballistica.cc
index 01febaa3..ef20ad6a 100644
--- a/src/ballistica/ballistica.cc
+++ b/src/ballistica/ballistica.cc
@@ -21,7 +21,7 @@
namespace ballistica {
// These are set automatically via script; don't modify them here.
-const int kAppBuildNumber = 20645;
+const int kAppBuildNumber = 20646;
const char* kAppVersion = "1.7.4";
// Our standalone globals.
diff --git a/tools/efrotools/code.py b/tools/efrotools/code.py
index d8188dd6..47311a80 100644
--- a/tools/efrotools/code.py
+++ b/tools/efrotools/code.py
@@ -1,5 +1,6 @@
# Released under the MIT License. See LICENSE for details.
#
+# pylint: disable=too-many-lines
"""Functionality for formatting, linting, etc. code."""
from __future__ import annotations
@@ -16,14 +17,35 @@ if TYPE_CHECKING:
from typing import Any
-def format_clang_format(projroot: Path, full: bool) -> None:
+def format_cpp_str(projroot: Path,
+ text: str,
+ filename: str = 'untitled.cc') -> str:
+ """Run clang-format inline on c++ code.
+
+ Note that some cpp formatting keys off the filename, so a fake one can
+ be optionally provided.
+ """
+ import tempfile
+
+ with tempfile.TemporaryDirectory() as tempdir:
+ filename = os.path.join(tempdir, filename)
+ with open(filename, 'w', encoding='utf-8') as outfile:
+ outfile.write(text)
+ cfg = os.path.join(projroot, 'config/toolconfigsrc/clang-format')
+ subprocess.run(['clang-format', f'--style=file:{cfg}', '-i', filename],
+ check=True)
+ with open(filename, encoding='utf-8') as infile:
+ return infile.read()
+
+
+def format_project_cpp_files(projroot: Path, full: bool) -> None:
"""Run clang-format on all of our source code (multithreaded)."""
import time
import concurrent.futures
from multiprocessing import cpu_count
from efrotools import get_files_hash
os.chdir(projroot)
- cachepath = Path(projroot, '.cache/format_clang_format')
+ cachepath = Path(projroot, '.cache/format_project_cpp_files')
if full and cachepath.exists():
cachepath.unlink()
cache = FileCache(cachepath)
@@ -145,14 +167,14 @@ def get_code_filenames(projroot: Path) -> list[str]:
return codefilenames
-def format_yapf(projroot: Path, full: bool) -> None:
+def format_project_python_files(projroot: Path, full: bool) -> None:
"""Runs yapf on all of our Python code."""
import time
from concurrent.futures import ThreadPoolExecutor
from multiprocessing import cpu_count
from efrotools import get_files_hash, PYVER
os.chdir(projroot)
- cachepath = Path(projroot, '.cache/format_yapf')
+ cachepath = Path(projroot, '.cache/format_project_python_files')
if full and cachepath.exists():
cachepath.unlink()
@@ -189,9 +211,12 @@ def format_yapf(projroot: Path, full: bool) -> None:
flush=True)
-def format_yapf_str(projroot: Path, code: str) -> str:
+def format_python_str(projroot: Path, code: str) -> str:
"""Run yapf formatting on the provided inline code."""
from efrotools import PYVER
+
+ # We'll get incorrect results if run on an uninited repo dir/etc.
+ assert os.path.exists(os.path.join(projroot, '.style.yapf'))
out = subprocess.run([f'python{PYVER}', '-m', 'yapf'],
capture_output=True,
check=True,
diff --git a/tools/efrotools/message.py b/tools/efrotools/message.py
index 12fd20fb..3c2fe396 100644
--- a/tools/efrotools/message.py
+++ b/tools/efrotools/message.py
@@ -8,7 +8,7 @@ import sys
from pathlib import Path
from typing import TYPE_CHECKING
-from efrotools.code import format_yapf_str
+from efrotools.code import format_python_str
if TYPE_CHECKING:
pass
@@ -66,7 +66,7 @@ def standard_message_sender_gen_pcommand(
enable_sync_sends=enable_sync_sends,
enable_async_sends=enable_async_sends,
)
- out = format_yapf_str(projroot, module_code)
+ out = format_python_str(projroot, module_code)
print(f'Meta-building {Clr.BLD}{dst}{Clr.RST}')
Path(dst).parent.mkdir(parents=True, exist_ok=True)
@@ -127,7 +127,7 @@ def standard_message_receiver_gen_pcommand(
is_async=is_async,
)
- out = format_yapf_str(projroot, module_code)
+ out = format_python_str(projroot, module_code)
print(f'Meta-building {Clr.BLD}{dst}{Clr.RST}')
Path(dst).parent.mkdir(parents=True, exist_ok=True)
diff --git a/tools/efrotools/pcommand.py b/tools/efrotools/pcommand.py
index 806eca41..787a47a4 100644
--- a/tools/efrotools/pcommand.py
+++ b/tools/efrotools/pcommand.py
@@ -273,14 +273,14 @@ def formatcode() -> None:
"""Format all of our C/C++/etc. code."""
import efrotools.code
full = '-full' in sys.argv
- efrotools.code.format_clang_format(PROJROOT, full)
+ efrotools.code.format_project_cpp_files(PROJROOT, full)
def formatscripts() -> None:
"""Format all of our Python/etc. code."""
import efrotools.code
full = '-full' in sys.argv
- efrotools.code.format_yapf(PROJROOT, full)
+ efrotools.code.format_project_python_files(PROJROOT, full)
def formatmakefile() -> None:
@@ -404,7 +404,7 @@ def tool_config_install() -> None:
with src.open(encoding='utf-8') as infile:
cfg = infile.read()
- # Rome substitutions, etc.
+ # Some substitutions, etc.
cfg = _filter_tool_config(cfg)
# Add an auto-generated notice.