diff --git a/.efrocachemap b/.efrocachemap index c68902ef..f51457be 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -420,18 +420,18 @@ "assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/14/f1/4f2995d78fc20dd79dfb39c5d554", "assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/57/ac/6ed0caecd25dc23688debed24c45", "assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/32/08/38dac4a79ab2acee76a75d32a310", - "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/3d/c1/5832d2ba841538ddddab9e8d3b4a", - "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/b1/3d/c68e22dddcb97d029be8aa128dbd", + "assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/84/40/e8b86900b0c91052460ba8480520", + "assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/0f/0e/7184059414320d32104463e41038", "assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/49/92/dbd8af6861dd47b8bca51aa9533c", "assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/e7/b4/0bbeacb47d314348d4b54edd9bd9", "assets/build/ba_data/data/languages/chinesetraditional.json": "https://files.ballistica.net/cache/ba1/8d/03/4f4d0d3f6b36e2b8728f13d73050", "assets/build/ba_data/data/languages/croatian.json": "https://files.ballistica.net/cache/ba1/66/bf/6e98398016da261296b8c306560e", - "assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/f8/63/106bcd08194d23cd8baa7d8be4fc", + "assets/build/ba_data/data/languages/czech.json": "https://files.ballistica.net/cache/ba1/b6/67/633c424cc32e5c4afbd188d3a908", "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/d1/07/37b7adc3dbec7328d26c5325f212", "assets/build/ba_data/data/languages/english.json": "https://files.ballistica.net/cache/ba1/b6/e8/5b89a8e607a1eec8e4c86374b7de", "assets/build/ba_data/data/languages/esperanto.json": "https://files.ballistica.net/cache/ba1/6e/fd/685a4e1da031474d47a1d9eb2731", - "assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/c1/e9/0d7426afb8faa8b66c3b74b35e23", + "assets/build/ba_data/data/languages/french.json": "https://files.ballistica.net/cache/ba1/16/53/1535cc28a789efb7372de01bd7fb", "assets/build/ba_data/data/languages/german.json": "https://files.ballistica.net/cache/ba1/9f/99/500019aa5bc3ea8dca84a06036bd", "assets/build/ba_data/data/languages/gibberish.json": "https://files.ballistica.net/cache/ba1/13/7c/90fc15be9c187e22c3bebff4bb6f", "assets/build/ba_data/data/languages/greek.json": "https://files.ballistica.net/cache/ba1/93/36/177284765143e14ee6454a59ec0d", @@ -439,19 +439,19 @@ "assets/build/ba_data/data/languages/hungarian.json": "https://files.ballistica.net/cache/ba1/de/1b/d9a8e089566aa2951dc34c8c7173", "assets/build/ba_data/data/languages/indonesian.json": "https://files.ballistica.net/cache/ba1/87/e5/a10ddd73cfb7996bbd576032db6a", "assets/build/ba_data/data/languages/italian.json": "https://files.ballistica.net/cache/ba1/bf/d6/4341a67850096fae618968c327ae", - "assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/51/fc/16596c8d421e4961eab3041303d7", - "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/e4/38/446b22f510f74f590cb990394d36", + "assets/build/ba_data/data/languages/korean.json": "https://files.ballistica.net/cache/ba1/26/8d/bf9cc8db2cc71b69e789898e1093", + "assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/b7/0a/1bb4a8a466d8f237c202229ab49c", "assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/03/08/40f887bb92ddd5c565d879efa279", "assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/ce/f8/087671938e6d407d11d95565e67b", "assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/82/12/57bf144e12be229a9b70da9c45cb", "assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/bb/67/bdf5e720897c0eb966acdbab4274", "assets/build/ba_data/data/languages/serbian.json": "https://files.ballistica.net/cache/ba1/91/1e/2846b8fab5260d1949562e7979be", "assets/build/ba_data/data/languages/slovak.json": "https://files.ballistica.net/cache/ba1/02/f9/4a1e4b16c1c0db6e1a88fb7c2b1f", - "assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/09/b2/83ece6ba1adb6763416c21fa3600", + "assets/build/ba_data/data/languages/spanish.json": "https://files.ballistica.net/cache/ba1/42/8a/31ee9bf7d90ad1c7a613ab91e4f3", "assets/build/ba_data/data/languages/swedish.json": "https://files.ballistica.net/cache/ba1/50/9f/be006ba19be6a69a57837eb6dca0", - "assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/45/64/340df1c2eba4f6959d6fe1eec500", - "assets/build/ba_data/data/languages/ukrainian.json": "https://files.ballistica.net/cache/ba1/3f/7b/ff6beb9428d90cf58879431b22b3", - "assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/45/54/68b15a87516627368891c11bf386", + "assets/build/ba_data/data/languages/turkish.json": "https://files.ballistica.net/cache/ba1/a4/d9/93b754bae8c86791f6d8d3b600e1", + "assets/build/ba_data/data/languages/ukrainian.json": "https://files.ballistica.net/cache/ba1/c3/61/d5bcf2bcad50104b26d22d3365a4", + "assets/build/ba_data/data/languages/venetian.json": "https://files.ballistica.net/cache/ba1/88/a0/96a0b7c38440c65d3f9dc3bbb70b", "assets/build/ba_data/data/languages/vietnamese.json": "https://files.ballistica.net/cache/ba1/7c/d8/b98949fc52015844cea496eaefb4", "assets/build/ba_data/data/maps/big_g.json": "https://files.ballistica.net/cache/ba1/47/0a/a617cc85d927b576c4e6fc1091ed", "assets/build/ba_data/data/maps/bridgit.json": "https://files.ballistica.net/cache/ba1/03/4b/57ee9b42854b26f23f81bd8c58ef", @@ -3936,26 +3936,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/72/82/86956fae909ac2fe2a1abd84a361", "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/be/90/8fbbd0f4570405372d94a1749312", + "build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5e/ea/7a1a395da3864b945cfb93f45ebe", "build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/74/1d/fc9e33e565475daaac80da5252f0", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0e/f5/e1585dfa4abb3a24b62c21259196", - "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/4e/6b/8012d4bbed6ecee79161866d6078", - "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a4/c4/0fa36aad74aa15fafc20c73b19ea", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/25/99/249fe5b1134dd4dd0855ae644478", + "build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fd/50/e338a2856082eed8402d525ea197", + "build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/88/d0/68bb4413dbbb2a7b342bc18dd428", "build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/7b/ac1a200be0f37078af0991faca3b", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/34/ff/358a7048f00432e0a1f3f2f6892a", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/97/3b/576fc32f9ec58ab4dfd83a30c2f3", - "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4c/d9/dcefa7433496e23d6722bec45c83", - "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/0d/bd/017a33857704529facbd1668a3d9", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2a/b5/2e5d1109ab74691e54c4718c9bdf", - "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/54/d5/a64a1e3b4d07570b8346d3f012b7", - "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/54/fa/0a83f54428b6e1e800d73580cdb2", - "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/05/55/a1af91dbfbd65c28acfa74bb9195", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8d/ac/62521ee29f4b952b318a3c70d78c", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/39/7a/d32929d332be578e9ab615775ff0", - "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/01/c0/87a990c2ed155abc253aed53a6b0", - "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/b3/47/0fe64df855db157bc3f99202314c", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/e2/98/f34747aa2f4cb5c7c7eb79bf12e3", - "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/28/88/800c382835568db912616b223c0e", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/26/23/308864d64e2701d8dbee06d31f46", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a7/2b/7334ed0337fad10e90394284cf3c", + "build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/89/32/bc4c40044ed1ca9bb2b13b53e26c", + "build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/bb/06/ea2453b4da9e725c587bafaecaf4", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/49/22/fcf35717056f840b2cbbbc3eea5e", + "build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ae/e3/6f0073b336c704005ecd57e06e15", + "build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/1e/9b/09c218220ed81da476a4ba708264", + "build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/4c/9d231533de0e034860a4e354eab9", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3d/2c/27a4174d8bf7e1a0c30c38701061", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/06/04/6ecbb75b2111cc89c7c579909d1c", + "build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/02/56/a9b5f47e9831626403abf366115a", + "build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/68/72/6583a3040623f3475dad2160a94c", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/fa/23/190e821c3b844805ebf5753a525d", + "build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ea/dc/e1327c2f7cc9c172e33f47f5afb6", "build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/32/bda06e355384dac2fc81c8357812", "build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/34/f6/b4db57144d47cfdb153dd4de6742", "build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/53/44/cf4405c2ebe2695d55858129d3fe", @@ -3968,18 +3968,18 @@ "build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/67/aa/7e132a33ae0c06f50ae67a11ee34", "build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/66/89272c8577954d2382ec60b9f0af", "build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/8b/0e/0e82816929e595543b0aaac49978", - "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1e/38/59b3b58320e5680e86732823ae78", + "build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/72/0b/46f5e0da6e5440c1e5b3e1970bb6", "build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/5b/0390ee8916f97d302cde3ea356bc", - "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7a/ee/8249ede29becc0cd41178924b6dc", + "build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/1d/3c/2f2761b9ee7550e2b1f16d6d3c2c", "build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c0/5f/e89024a87dd092f6e0cc43afb707", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/6e/9a/f56dfc87cbcfe3db96a59729c95c", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/8f/34/161cc168673655f74570039ecf60", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7c/b7/42061e80899861ec9b6854e940f3", - "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/11/94/c7403ce06b9a74d21b9e835e78f8", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/c1/84/2093f24945d0e858f7dab4473369", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/8d/8c/dc1d33754f442496d932cb6c1bb3", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/6f/71/a3fb9582f561435cc206f2cb4579", - "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/ed/25/8359de107bc51204177cbab4279d", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/33/a4/c7d2a7972a8baf10ddcb26acbe9c", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/33/ca/253c2d0902d8dbf79f9aa39e75d5", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/81/11/f63202d9de3ef7df10366f411985", + "build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/a0/3a/b1e6d10424a9fcaa45e45281e88e", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/77/ca/f2873e0a654686c12e9ae308e30c", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/5c/cd/5d67a35cb100bb6e183d1e36f7fe", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/cc/22/fe3cc28f53c0536bbd037ad60b77", + "build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/fd/04/90ade9d6393192486b7de680c85e", "src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/fc/b5/62133319c6df8567aecfd29b1204", "src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/8d/96/c1516dee7d458c9065597e0aede6" } \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a200915..6e65cf69 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,5 @@ +### 1.6.5 (20388) + ### 1.6.4 (20382) - Some cleanups in the Favorites tab of the gather window. - Reorganized prefab target names; some targets such as `prefab-debug` are now `prefab-gui-debug` (more consistent with the existing `prefab-server-debug` targets). diff --git a/assets/src/ba_data/python/ba/_app.py b/assets/src/ba_data/python/ba/_app.py index 88a9a676..759ddf2a 100644 --- a/assets/src/ba_data/python/ba/_app.py +++ b/assets/src/ba_data/python/ba/_app.py @@ -581,7 +581,8 @@ class App: """ import urllib.request try: - val = urllib.request.urlopen('https://example.com').read() + with urllib.request.urlopen('https://example.com') as url: + val = url.read() print('HTTPS TEST SUCCESS', len(val)) except Exception as exc: print('HTTPS TEST FAIL:', exc) diff --git a/assets/src/ba_data/python/bastd/actor/spazbot.py b/assets/src/ba_data/python/bastd/actor/spazbot.py index 4e53ee67..ac950ef6 100644 --- a/assets/src/ba_data/python/bastd/actor/spazbot.py +++ b/assets/src/ba_data/python/bastd/actor/spazbot.py @@ -977,8 +977,8 @@ class SpazBotSet: if activity is None or activity.expired: return - for i in range(len(self._bot_lists)): - for bot in self._bot_lists[i]: + for i, bot_list in enumerate(self._bot_lists): + for bot in bot_list: bot.handlemessage(ba.DieMessage(immediate=True)) self._bot_lists[i] = [] diff --git a/assets/src/ba_data/python/bastd/game/conquest.py b/assets/src/ba_data/python/bastd/game/conquest.py index b2404b8e..7f41819b 100644 --- a/assets/src/ba_data/python/bastd/game/conquest.py +++ b/assets/src/ba_data/python/bastd/game/conquest.py @@ -159,8 +159,8 @@ class ConquestGame(ba.TeamGameActivity[Player, Team]): self.setup_standard_powerup_drops() # Set up flags with marker lights. - for i in range(len(self.map.flag_points)): - point = self.map.flag_points[i] + for i, flag_point in enumerate(self.map.flag_points): + point = flag_point flag = ConquestFlag(position=point, touchable=False, materials=[self._extraflagmat]) @@ -177,14 +177,14 @@ class ConquestGame(ba.TeamGameActivity[Player, Team]): }) # Give teams a flag to start with. - for i in range(len(self.teams)): - self._flags[i].team = self.teams[i] + for i, team in enumerate(self.teams): + self._flags[i].team = team light = self._flags[i].light assert light node = self._flags[i].node assert node - light.color = self.teams[i].color - node.color = self.teams[i].color + light.color = team.color + node.color = team.color self._update_scores() diff --git a/assets/src/ba_data/python/bastd/game/football.py b/assets/src/ba_data/python/bastd/game/football.py index 3531dfc5..8773e272 100644 --- a/assets/src/ba_data/python/bastd/game/football.py +++ b/assets/src/ba_data/python/bastd/game/football.py @@ -206,8 +206,8 @@ class FootballTeamGame(ba.TeamGameActivity[Player, Team]): return region = ba.getcollision().sourcenode i = None - for i in range(len(self._score_regions)): - if region == self._score_regions[i].node: + for i, score_region in enumerate(self._score_regions): + if region == score_region.node: break for team in self.teams: if team.id == i: @@ -651,8 +651,8 @@ class FootballCoopGame(ba.CoopGameActivity[Player, Team]): # See which score region it was. region = ba.getcollision().sourcenode i = None - for i in range(len(self._score_regions)): - if region == self._score_regions[i].node: + for i, score_region in enumerate(self._score_regions): + if region == score_region.node: break for team in [self.teams[0], self._bot_team]: diff --git a/assets/src/ba_data/python/bastd/game/hockey.py b/assets/src/ba_data/python/bastd/game/hockey.py index 3964ad7e..0e988c05 100644 --- a/assets/src/ba_data/python/bastd/game/hockey.py +++ b/assets/src/ba_data/python/bastd/game/hockey.py @@ -277,8 +277,8 @@ class HockeyGame(ba.TeamGameActivity[Player, Team]): region = ba.getcollision().sourcenode index = 0 - for index in range(len(self._score_regions)): - if region == self._score_regions[index].node: + for index, score_region in enumerate(self._score_regions): + if region == score_region.node: break for team in self.teams: diff --git a/assets/src/ba_data/python/bastd/ui/coop/browser.py b/assets/src/ba_data/python/bastd/ui/coop/browser.py index c8d0eee5..a7f18ec7 100644 --- a/assets/src/ba_data/python/bastd/ui/coop/browser.py +++ b/assets/src/ba_data/python/bastd/ui/coop/browser.py @@ -989,22 +989,21 @@ class CoopBrowserWindow(ba.Window): # (for wiring up) self._refresh_campaign_row() - for i in range(len(self._tournament_buttons)): + for i, tbutton in enumerate(self._tournament_buttons): ba.widget( - edit=self._tournament_buttons[i]['button'], + edit=tbutton['button'], up_widget=self._tournament_info_button if i == 0 else self._tournament_buttons[i - 1]['button'], down_widget=self._tournament_buttons[(i + 1)]['button'] if i + 1 < len(self._tournament_buttons) else custom_h_scroll) ba.widget( - edit=self._tournament_buttons[i]['more_scores_button'], + edit=tbutton['more_scores_button'], down_widget=self._tournament_buttons[( i + 1)]['current_leader_name_text'] if i + 1 < len(self._tournament_buttons) else custom_h_scroll) - ba.widget( - edit=self._tournament_buttons[i]['current_leader_name_text'], - up_widget=self._tournament_info_button if i == 0 else - self._tournament_buttons[i - 1]['more_scores_button']) + ba.widget(edit=tbutton['current_leader_name_text'], + up_widget=self._tournament_info_button if i == 0 else + self._tournament_buttons[i - 1]['more_scores_button']) for btn in self._custom_buttons: try: diff --git a/assets/src/ba_data/python/bastd/ui/getcurrency.py b/assets/src/ba_data/python/bastd/ui/getcurrency.py index db19be22..ef9f7118 100644 --- a/assets/src/ba_data/python/bastd/ui/getcurrency.py +++ b/assets/src/ba_data/python/bastd/ui/getcurrency.py @@ -333,10 +333,10 @@ class GetCurrencyWindow(ba.Window): txt1 = (ba.Lstr( resource=self._r + - '.youHaveText').evaluate().split('${COUNT}')[0].strip()) + '.youHaveText').evaluate().partition('${COUNT}')[0].strip()) txt2 = (ba.Lstr( resource=self._r + - '.youHaveText').evaluate().split('${COUNT}')[-1].strip()) + '.youHaveText').evaluate().rpartition('${COUNT}')[0].strip()) ba.textwidget(parent=self._root_widget, text=txt1, diff --git a/docs/ba_module.md b/docs/ba_module.md index 964b3be7..39bcc1c7 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -
This page documents the Python classes and functions in the 'ba' module, which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please let me know. Happy modding!