diff --git a/.efrocachemap b/.efrocachemap index 8b1559ef..434682a4 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4132,16 +4132,16 @@ "assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb", "assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe", - "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e8/b7/d1b41fb68d9f65901d47267b9287", - "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/40/04/9b0dc90152d5729485488b628429", - "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b0/15/aa58294e041cca7485375e7a49ad", - "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/04/86/d3adc7e35a753aad5e6d62758e7c", - "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/91/81/30196355ca6b2044140131f6da89", - "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d3/3b/e0171b94d0b24c153a88b7724797", - "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/97/10/3b2aded25bb43ce4451f54c42731", - "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/e3/ca/e0788b1f5cc69e92fed8d4d9a61f", - "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/69/78/3a1f6f6f808f671c749d48b0b5a6", - "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/1a/fc/f3b36c2964d64ef2c1685cf8c893", - "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/22/8d/fdf637a15162f92f699f92eca9e7", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/72/34/a37deb6cbc29025a38c161ce7cba" + "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/8c/7f/91dc078e8cfc8e003a90e91e1762", + "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/e0/ee/e2f283b6b432d2aecf105138482e", + "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/b4/0f/15f10e5ed1ec1a80bf4fd443594f", + "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/25/6a/20ce70fc081376c90d8e154d0978", + "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7d/7b/35302bd8dee3631b9d9ddc8acfda", + "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fe/7e/8444f1e9bfdf287c9ad53af65192", + "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/44/c8/59ba42aeceb0ccf0ce728e25da15", + "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/5a/c2/b9d745b8dff2fbcf3d782c60c325", + "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/37/ba/8f6ae8a0694207c90e19fcb31dcc", + "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/72/03/5f1f17bcae5f1cec82fb324de89f", + "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/85/bc/a8d4ba4f6cc15b06ec7220a8b7c6", + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/bc/97/e9e8ba547055185dbcf3b70989b3" } \ No newline at end of file diff --git a/assets/src/ba_data/python/bastd/game/capturetheflag.py b/assets/src/ba_data/python/bastd/game/capturetheflag.py index 579d932a..35e4a20a 100644 --- a/assets/src/ba_data/python/bastd/game/capturetheflag.py +++ b/assets/src/ba_data/python/bastd/game/capturetheflag.py @@ -465,7 +465,7 @@ class CaptureTheFlagGame(ba.TeamGameActivity): """Intercept new spazzes and add our team material for them.""" # (chill pylint; we're passing our exact args to parent call) # pylint: disable=signature-differs - spaz = ba.TeamGameActivity.spawn_player_spaz(self, *args, **keywds) + spaz = super().spawn_player_spaz(*args, **keywds) player = spaz.player player.gamedata['touching_own_flag'] = 0 diff --git a/assets/src/ba_data/python/bastd/game/chosenone.py b/assets/src/ba_data/python/bastd/game/chosenone.py index 7dae8184..7ae3fd06 100644 --- a/assets/src/ba_data/python/bastd/game/chosenone.py +++ b/assets/src/ba_data/python/bastd/game/chosenone.py @@ -128,7 +128,7 @@ class ChosenOneGame(ba.TeamGameActivity): self._update_scoreboard() def on_player_leave(self, player: ba.Player) -> None: - ba.TeamGameActivity.on_player_leave(self, player) + super().on_player_leave(player) if self._get_chosen_one_player() is player: self._set_chosen_one_player(None) diff --git a/assets/src/ba_data/python/bastd/game/elimination.py b/assets/src/ba_data/python/bastd/game/elimination.py index d5ad91d5..6dfe3006 100644 --- a/assets/src/ba_data/python/bastd/game/elimination.py +++ b/assets/src/ba_data/python/bastd/game/elimination.py @@ -428,7 +428,7 @@ class EliminationGame(ba.TeamGameActivity): position=player.node.position).autoretain() def on_player_leave(self, player: ba.Player) -> None: - ba.TeamGameActivity.on_player_leave(self, player) + super().on_player_leave(player) player.gamedata['icons'] = None # Remove us from spawn-order. diff --git a/assets/src/ba_data/python/bastd/game/kingofthehill.py b/assets/src/ba_data/python/bastd/game/kingofthehill.py index 9e7c7ca3..024589ba 100644 --- a/assets/src/ba_data/python/bastd/game/kingofthehill.py +++ b/assets/src/ba_data/python/bastd/game/kingofthehill.py @@ -141,7 +141,7 @@ class KingOfTheHillGame(ba.TeamGameActivity): self._update_scoreboard() def on_player_join(self, player: ba.Player) -> None: - ba.TeamGameActivity.on_player_join(self, player) + super().on_player_join(player) player.gamedata['at_flag'] = 0 def on_begin(self) -> None: diff --git a/assets/src/ba_data/python/bastd/game/meteorshower.py b/assets/src/ba_data/python/bastd/game/meteorshower.py index daf5bacd..c757cbc4 100644 --- a/assets/src/ba_data/python/bastd/game/meteorshower.py +++ b/assets/src/ba_data/python/bastd/game/meteorshower.py @@ -97,7 +97,6 @@ class MeteorShowerGame(ba.TeamGameActivity): # Print messages when players die (since its meaningful in this game). self.announce_player_deaths = True - # Called when our game actually starts. def on_begin(self) -> None: from bastd.actor.onscreentimer import OnScreenTimer @@ -140,7 +139,7 @@ class MeteorShowerGame(ba.TeamGameActivity): def on_player_leave(self, player: ba.Player) -> None: # Augment default behavior. - ba.TeamGameActivity.on_player_leave(self, player) + super().on_player_leave(player) # A departing player may trigger game-over. self._check_end_game() diff --git a/assets/src/ba_data/python/bastd/game/race.py b/assets/src/ba_data/python/bastd/game/race.py index f2ace834..2fac27bb 100644 --- a/assets/src/ba_data/python/bastd/game/race.py +++ b/assets/src/ba_data/python/bastd/game/race.py @@ -354,10 +354,10 @@ class RaceGame(ba.TeamGameActivity): player.gamedata['distance'] = 0.0 player.gamedata['finished'] = False player.gamedata['rank'] = None - ba.TeamGameActivity.on_player_join(self, player) + super().on_player_join(player) def on_player_leave(self, player: ba.Player) -> None: - ba.TeamGameActivity.on_player_leave(self, player) + super().on_player_leave(player) # A player leaving disqualifies the team if 'Entire Team Must Finish' # is on (otherwise in teams mode everyone could just leave except the diff --git a/tools/snippets b/tools/snippets index 3e5948dd..d270f01e 100755 --- a/tools/snippets +++ b/tools/snippets @@ -559,18 +559,20 @@ def lazy_increment_build() -> None: from efro.terminal import Clr from efrotools import get_files_hash from efrotools.code import get_code_filenames - codehash = get_files_hash(get_code_filenames(PROJROOT)) + codefiles = get_code_filenames(PROJROOT) + codehash = get_files_hash(codefiles) hashfilename = '.cache/lazy_increment_build' try: with open(hashfilename) as infile: lasthash = infile.read() except FileNotFoundError: lasthash = '' - if codehash == lasthash: - pass - else: + if codehash != lasthash: print(f'{Clr.SMAG}Source(s) changed; incrementing build...{Clr.RST}') subprocess.run(['tools/version_utils', 'incrementbuild'], check=True) + + # We just changed code, so we need to re-calc the current hash. + codehash = get_files_hash(codefiles) os.makedirs(os.path.dirname(hashfilename), exist_ok=True) with open(hashfilename, 'w') as outfile: outfile.write(codehash)