mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-23 07:23:19 +08:00
Tidying
This commit is contained in:
parent
f0583ac816
commit
dd6a4b625b
@ -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"
|
||||
}
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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)
|
||||
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -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:
|
||||
|
||||
@ -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()
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user