mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-26 08:53:32 +08:00
Minor bug fixes and build system improvements
This commit is contained in:
parent
61c7dad9c0
commit
29742b69cb
@ -4135,16 +4135,16 @@
|
||||
"assets/build/windows/x64/vc_redist.x64.exe": "https://files.ballistica.net/cache/ba1/ea/19/8b8787d81abcdce158ba608cd24f",
|
||||
"assets/build/windows/x64/vcruntime140_1d.dll": "https://files.ballistica.net/cache/ba1/11/d8/ff6344b429b00c24d9a1930d4338",
|
||||
"assets/build/windows/x64/vcruntime140d.dll": "https://files.ballistica.net/cache/ba1/20/33/0825e11e6518f87ece3009309933",
|
||||
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/19/bb/f03a6517dc8fdfa02324a3059dbd",
|
||||
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d3/93/3b0a9a32dd7de1373a3f23c0db1c",
|
||||
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/84/c0/59d2d1755a6acd0087892cda1f2f",
|
||||
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/1c/c5/dccf038a6357df5f363e81f26f3c",
|
||||
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/85/8d/56a2e40acf5dfa800475875b469e",
|
||||
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9d/66/3c5ac59f38b141f58d0070180ec7",
|
||||
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/fe/c5/f94df676b749a6c26dea2a650893",
|
||||
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/64/bc/8802a039ffc5f6d751afe42c8848",
|
||||
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/ff/de/ef57afea5f6185b94e7b655cb6cf",
|
||||
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/b5/ea/9b7604181d98cafe49cc2b7ceb2e",
|
||||
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/9e/fb/f81378d8e98f81dc54b097b132db",
|
||||
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/82/c9/72c92564a78169edf48a640b5e9a"
|
||||
"build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/57/f8/47526bddac42b974f4ce86d13166",
|
||||
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0a/a9/46cb3927b667d67d8dc936b744b6",
|
||||
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/dd/f3/130eb5ddb320f11093ba92bfbe6a",
|
||||
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/53/a6/56310d64b07fb7aa1481e59a4d29",
|
||||
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/cd/6a/1518d0ebde22f06a679edf04002a",
|
||||
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/72/4f/f4d081f47a48ba940603a6825c1f",
|
||||
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d9/1f/436439103f6ede3ec88f46b592a7",
|
||||
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/97/44/68715ff4f2208719f42e174db2e5",
|
||||
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/39/87/ce5cf695b6af229875b9c5ff757e",
|
||||
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/db/f1/50f277827b1b070dd3b4c5c97553",
|
||||
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/20/f3/6fb608d305279d5d8663f6b8cee6",
|
||||
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/71/a0/00ae9e235e28b18def6847d69c75"
|
||||
}
|
||||
@ -1,9 +1,13 @@
|
||||
### 1.5.20 (20126)
|
||||
- The ba.Session.teams and ba.Session.players lists are now ba.Session.sessionteams and ba.Session.sessionplayers. This is to help keep it clear that a Team/Player and a SessionTeam/SessionPlayer are different things now.
|
||||
- Disconnecting an input-device now immediately removes the player instead of doing so in the next cycle; this prevents possible issues where code would try to access player.inputdevice before the removal happens which would lead to errors.
|
||||
- Updated mac prefab builds to point at homebrew's python@3.7 package now that 3.8 has been made the default.
|
||||
|
||||
### 1.5.19 (20123)
|
||||
- Cleaned up some bomb logic to avoid weird corner-cases such as land-mine explosions behaving like punches when set off by punches or bombs potentially resulting in multiple explosions when triggered by multiple other bombs simultaneously. Holler if anything explosion-related seems off now.
|
||||
- Reactivated and cleaned up fatal-error message dialogs; they should now show up more consistently and on more platforms when something really bad happens instead of getting a silent crash.
|
||||
- Certain hardware buttons on Android which stopped working in 1.5 should now be working again..
|
||||
|
||||
|
||||
### 1.5.18 (20108)
|
||||
- A bit of project cleanup; tools/snippets is now tools/pcommand, etc.
|
||||
- More minor bug fixes and crash/bug-logging improvements.
|
||||
|
||||
@ -494,11 +494,11 @@ class Activity(DependencyComponent, Generic[PlayerType, TeamType]):
|
||||
self._stats = session.stats
|
||||
|
||||
# Add session's teams in.
|
||||
for team in session.teams:
|
||||
for team in session.sessionteams:
|
||||
self.add_team(team)
|
||||
|
||||
# Add session's players in.
|
||||
for player in session.players:
|
||||
for player in session.sessionplayers:
|
||||
self.add_player(player)
|
||||
|
||||
self._has_begun = True
|
||||
|
||||
@ -189,7 +189,7 @@ class CoopSession(Session):
|
||||
# If there's *no* players left in the current activity but there *is*
|
||||
# in the session, restart the activity to pull them into the game
|
||||
# (or quit if they're just in the lobby).
|
||||
if not activity.players and self.players:
|
||||
if not activity.players and self.sessionplayers:
|
||||
|
||||
# Special exception for tourney games; don't auto-restart these.
|
||||
if self.tournament_id is not None:
|
||||
@ -226,7 +226,7 @@ class CoopSession(Session):
|
||||
|
||||
# Make an exception if there's no players left. Otherwise this
|
||||
# can override the default session end that occurs in that case.
|
||||
if not self.players:
|
||||
if not self.sessionplayers:
|
||||
return
|
||||
|
||||
# This method may get called from the UI context so make sure we
|
||||
@ -268,7 +268,7 @@ class CoopSession(Session):
|
||||
|
||||
# If at any point we have no in-game players, quit out of the session
|
||||
# (this can happen if someone leaves in the tutorial for instance).
|
||||
active_players = [p for p in self.players if p.in_game]
|
||||
active_players = [p for p in self.sessionplayers if p.in_game]
|
||||
if not active_players:
|
||||
self.end()
|
||||
return
|
||||
@ -305,7 +305,7 @@ class CoopSession(Session):
|
||||
|
||||
# Reset stats for the new activity.
|
||||
self.stats.reset()
|
||||
for player in self.players:
|
||||
for player in self.sessionplayers:
|
||||
|
||||
# Skip players that are still choosing a team.
|
||||
if player.in_game:
|
||||
|
||||
@ -49,17 +49,17 @@ class FreeForAllSession(MultiTeamSession):
|
||||
This is based on the current number of players.
|
||||
"""
|
||||
point_awards: Dict[int, int]
|
||||
if len(self.players) == 1:
|
||||
if len(self.sessionplayers) == 1:
|
||||
point_awards = {}
|
||||
elif len(self.players) == 2:
|
||||
elif len(self.sessionplayers) == 2:
|
||||
point_awards = {0: 6}
|
||||
elif len(self.players) == 3:
|
||||
elif len(self.sessionplayers) == 3:
|
||||
point_awards = {0: 6, 1: 3}
|
||||
elif len(self.players) == 4:
|
||||
elif len(self.sessionplayers) == 4:
|
||||
point_awards = {0: 8, 1: 4, 2: 2}
|
||||
elif len(self.players) == 5:
|
||||
elif len(self.sessionplayers) == 5:
|
||||
point_awards = {0: 8, 1: 4, 2: 2}
|
||||
elif len(self.players) == 6:
|
||||
elif len(self.sessionplayers) == 6:
|
||||
point_awards = {0: 8, 1: 4, 2: 2}
|
||||
else:
|
||||
point_awards = {0: 8, 1: 4, 2: 2, 3: 1}
|
||||
@ -80,7 +80,7 @@ class FreeForAllSession(MultiTeamSession):
|
||||
|
||||
# If there's multiple players and everyone has the same score,
|
||||
# call it a draw.
|
||||
if len(self.players) > 1 and len(winners) < 2:
|
||||
if len(self.sessionplayers) > 1 and len(winners) < 2:
|
||||
self.setactivity(
|
||||
_ba.newactivity(DrawScoreScreenActivity, {'results': results}))
|
||||
else:
|
||||
@ -95,7 +95,7 @@ class FreeForAllSession(MultiTeamSession):
|
||||
team.customdata['score'] += points
|
||||
|
||||
series_winners = [
|
||||
team for team in self.teams
|
||||
team for team in self.sessionteams
|
||||
if team.customdata['score'] >= self._ffa_series_length
|
||||
]
|
||||
series_winners.sort(reverse=True,
|
||||
|
||||
@ -841,7 +841,9 @@ class Lobby:
|
||||
session = _ba.getsession()
|
||||
self._use_team_colors = session.use_team_colors
|
||||
if session.use_teams:
|
||||
self._sessionteams = [weakref.ref(team) for team in session.teams]
|
||||
self._sessionteams = [
|
||||
weakref.ref(team) for team in session.sessionteams
|
||||
]
|
||||
else:
|
||||
self._dummy_teams = SessionTeam()
|
||||
self._sessionteams = [weakref.ref(self._dummy_teams)]
|
||||
|
||||
@ -199,7 +199,7 @@ class MultiTeamSession(Session):
|
||||
if isinstance(activity, TeamSeriesVictoryScoreScreenActivity):
|
||||
self.stats.reset()
|
||||
self._game_number = 0
|
||||
for team in self.teams:
|
||||
for team in self.sessionteams:
|
||||
team.customdata['score'] = 0
|
||||
|
||||
# Otherwise just set accum (per-game) scores.
|
||||
@ -216,7 +216,7 @@ class MultiTeamSession(Session):
|
||||
self._instantiate_next_game()
|
||||
|
||||
# (Re)register all players and wire stats to our next activity.
|
||||
for player in self.players:
|
||||
for player in self.sessionplayers:
|
||||
# ..but only ones who have been placed on a team
|
||||
# (ie: no longer sitting in the lobby).
|
||||
try:
|
||||
|
||||
@ -158,7 +158,9 @@ class ServerCallThread(threading.Thread):
|
||||
elif isinstance(exc, OSError):
|
||||
if exc.errno == 10051: # Windows unreachable network error.
|
||||
pass
|
||||
elif exc.errno in [errno.ETIMEDOUT, errno.EHOSTUNREACH]:
|
||||
elif exc.errno in [
|
||||
errno.ETIMEDOUT, errno.EHOSTUNREACH, errno.ENETUNREACH
|
||||
]:
|
||||
pass
|
||||
else:
|
||||
do_print = True
|
||||
|
||||
@ -48,21 +48,22 @@ class Session:
|
||||
|
||||
Attrs:
|
||||
|
||||
teams
|
||||
All the ba.Teams in the Session. Most things should use the team
|
||||
list in ba.Activity; not this.
|
||||
sessionteams
|
||||
All the ba.SessionTeams in the Session. Most things should use the
|
||||
list of ba.Teams in ba.Activity; not this.
|
||||
|
||||
players
|
||||
All ba.Players in the Session. Most things should use the player
|
||||
list in ba.Activity; not this. Some players, such as those who have
|
||||
not yet selected a character, will only appear on this list.
|
||||
sessionplayers
|
||||
All ba.SessionPlayers in the Session. Most things should use the
|
||||
list of ba.Players in ba.Activity; not this. Some players, such as
|
||||
those who have not yet selected a character, will only be
|
||||
found on this list.
|
||||
|
||||
min_players
|
||||
The minimum number of Players who must be present for the Session
|
||||
The minimum number of players who must be present for the Session
|
||||
to proceed past the initial joining screen.
|
||||
|
||||
max_players
|
||||
The maximum number of Players allowed in the Session.
|
||||
The maximum number of players allowed in the Session.
|
||||
|
||||
lobby
|
||||
The ba.Lobby instance where new ba.Players go to select a
|
||||
@ -98,9 +99,9 @@ class Session:
|
||||
lobby: ba.Lobby
|
||||
max_players: int
|
||||
min_players: int
|
||||
players: List[ba.SessionPlayer]
|
||||
sessionplayers: List[ba.SessionPlayer]
|
||||
customdata: dict
|
||||
teams: List[ba.SessionTeam]
|
||||
sessionteams: List[ba.SessionTeam]
|
||||
|
||||
def __init__(self,
|
||||
depsets: Sequence[ba.DependencySet],
|
||||
@ -166,8 +167,8 @@ class Session:
|
||||
# Should remove this if possible.
|
||||
self.tournament_id: Optional[str] = None
|
||||
|
||||
self.teams = []
|
||||
self.players = []
|
||||
self.sessionteams = []
|
||||
self.sessionplayers = []
|
||||
self.min_players = min_players
|
||||
self.max_players = max_players
|
||||
|
||||
@ -195,7 +196,7 @@ class Session:
|
||||
name=GameActivity.get_team_display_string(
|
||||
team_names[i]),
|
||||
color=color)
|
||||
self.teams.append(team)
|
||||
self.sessionteams.append(team)
|
||||
self._next_team_id += 1
|
||||
try:
|
||||
with _ba.Context(self):
|
||||
@ -226,7 +227,7 @@ class Session:
|
||||
# Limit player counts *unless* we're in a stress test.
|
||||
if _ba.app.stress_test_reset_timer is None:
|
||||
|
||||
if len(self.players) >= self.max_players:
|
||||
if len(self.sessionplayers) >= self.max_players:
|
||||
|
||||
# Print a rejection message *only* to the client trying to
|
||||
# join (prevents spamming everyone else in the game).
|
||||
@ -245,7 +246,7 @@ class Session:
|
||||
def on_player_leave(self, sessionplayer: ba.SessionPlayer) -> None:
|
||||
"""Called when a previously-accepted ba.SessionPlayer leaves."""
|
||||
|
||||
if sessionplayer not in self.players:
|
||||
if sessionplayer not in self.sessionplayers:
|
||||
print('ERROR: Session.on_player_leave called'
|
||||
' for player not in our list.')
|
||||
return
|
||||
@ -295,7 +296,7 @@ class Session:
|
||||
self._remove_player_team(sessionteam, activity)
|
||||
|
||||
# Now remove them from the session list.
|
||||
self.players.remove(sessionplayer)
|
||||
self.sessionplayers.remove(sessionplayer)
|
||||
|
||||
def _remove_player_team(self, sessionteam: ba.SessionTeam,
|
||||
activity: Optional[ba.Activity]) -> None:
|
||||
@ -313,9 +314,9 @@ class Session:
|
||||
|
||||
# And then from the Session.
|
||||
with _ba.Context(self):
|
||||
if sessionteam in self.teams:
|
||||
if sessionteam in self.sessionteams:
|
||||
try:
|
||||
self.teams.remove(sessionteam)
|
||||
self.sessionteams.remove(sessionteam)
|
||||
self.on_team_leave(sessionteam)
|
||||
except Exception:
|
||||
print_exception(
|
||||
@ -535,7 +536,7 @@ class Session:
|
||||
|
||||
# If they said yes, add the player to the lobby.
|
||||
if result:
|
||||
self.players.append(sessionplayer)
|
||||
self.sessionplayers.append(sessionplayer)
|
||||
with _ba.Context(self):
|
||||
try:
|
||||
self.lobby.add_chooser(sessionplayer)
|
||||
@ -643,7 +644,7 @@ class Session:
|
||||
def _add_chosen_player(self, chooser: ba.Chooser) -> ba.SessionPlayer:
|
||||
from ba._team import SessionTeam
|
||||
sessionplayer = chooser.getplayer()
|
||||
assert sessionplayer in self.players, (
|
||||
assert sessionplayer in self.sessionplayers, (
|
||||
'SessionPlayer not found in session '
|
||||
'player-list after chooser selection.')
|
||||
|
||||
@ -686,7 +687,7 @@ class Session:
|
||||
)
|
||||
|
||||
# Add player's team to the Session.
|
||||
self.teams.append(sessionteam)
|
||||
self.sessionteams.append(sessionteam)
|
||||
|
||||
with _ba.Context(self):
|
||||
try:
|
||||
|
||||
@ -75,7 +75,7 @@ class TeamVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
|
||||
scale=0.25,
|
||||
color=(0.5, 0.5, 0.5, 1.0),
|
||||
jitter=3.0).autoretain()
|
||||
for team in self.session.teams:
|
||||
for team in self.session.sessionteams:
|
||||
ba.timer(
|
||||
i * 0.15 + 0.15,
|
||||
ba.WeakCall(self._show_team_name, vval - i * height, team,
|
||||
|
||||
@ -66,9 +66,10 @@ class MultiTeamJoinActivity(JoinActivity):
|
||||
# In teams mode, show our two team names.
|
||||
# FIXME: Lobby should handle this.
|
||||
if isinstance(ba.getsession(), DualTeamSession):
|
||||
team_names = [team.name for team in ba.getsession().teams]
|
||||
team_names = [team.name for team in ba.getsession().sessionteams]
|
||||
team_colors = [
|
||||
tuple(team.color) + (0.5, ) for team in ba.getsession().teams
|
||||
tuple(team.color) + (0.5, )
|
||||
for team in ba.getsession().sessionteams
|
||||
]
|
||||
if len(team_names) == 2:
|
||||
for i in range(2):
|
||||
|
||||
@ -271,7 +271,9 @@ class ControlsGuide(ba.Actor):
|
||||
# We look at the session's players; not the activity's.
|
||||
# We want to get ones who are still in the process of
|
||||
# selecting a character, etc.
|
||||
input_devices = [p.inputdevice for p in ba.getsession().players]
|
||||
input_devices = [
|
||||
p.inputdevice for p in ba.getsession().sessionplayers
|
||||
]
|
||||
input_devices = [
|
||||
i for i in input_devices if i and i is not touchscreen
|
||||
]
|
||||
@ -323,7 +325,7 @@ class ControlsGuide(ba.Actor):
|
||||
|
||||
# We look at the session's players; not the activity's - we want to
|
||||
# get ones who are still in the process of selecting a character, etc.
|
||||
input_devices = [p.inputdevice for p in ba.getsession().players]
|
||||
input_devices = [p.inputdevice for p in ba.getsession().sessionplayers]
|
||||
input_devices = [i for i in input_devices if i]
|
||||
|
||||
# If there's no players with input devices yet, try to default to
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
|
||||
<h4><em>last updated on 2020-07-08 for Ballistica version 1.5.19 build 20119</em></h4>
|
||||
<h4><em>last updated on 2020-07-09 for Ballistica version 1.5.20 build 20128</em></h4>
|
||||
<p>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 <a href="mailto:support@froemling.net">let me know</a>. Happy modding!</p>
|
||||
<hr>
|
||||
@ -1734,7 +1734,7 @@ and it should begin its actual game logic.</p>
|
||||
high score lists.</p>
|
||||
|
||||
<h3>Attributes Inherited:</h3>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__players">players</a>, <a href="#attr_ba_Session__teams">teams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__sessionplayers">sessionplayers</a>, <a href="#attr_ba_Session__sessionteams">sessionteams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h3>Attributes Defined Here:</h3>
|
||||
<h5><a href="#attr_ba_CoopSession__campaign">campaign</a>, <a href="#attr_ba_CoopSession__sessionglobalsnode">sessionglobalsnode</a></h5>
|
||||
<dl>
|
||||
@ -2092,7 +2092,7 @@ its time with lingering corpses, sound effects, etc.</p>
|
||||
</p>
|
||||
|
||||
<h3>Attributes Inherited:</h3>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__players">players</a>, <a href="#attr_ba_Session__teams">teams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__sessionplayers">sessionplayers</a>, <a href="#attr_ba_Session__sessionteams">sessionteams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h3>Attributes Defined Here:</h3>
|
||||
<dl>
|
||||
<dt><h4><a name="attr_ba_DualTeamSession__sessionglobalsnode">sessionglobalsnode</a></h4></dt><dd>
|
||||
@ -2219,7 +2219,7 @@ its time with lingering corpses, sound effects, etc.</p>
|
||||
<p><all methods inherited from <a href="#class_ba_Team">ba.Team</a>></p>
|
||||
<hr>
|
||||
<h2><strong><a name="class_ba_Existable">ba.Existable</a></strong></h3>
|
||||
<p>Inherits from: <a href="#class_typing_extensions_Protocol">typing_extensions.Protocol</a></p>
|
||||
<p>Inherits from: <a href="#class_typing_Protocol">typing.Protocol</a>, <a href="#class_typing_Generic">typing.Generic</a></p>
|
||||
<p>A Protocol for objects supporting an exists() method.</p>
|
||||
|
||||
<p>Category: <a href="#class_category_Protocols">Protocols</a>
|
||||
@ -2273,7 +2273,7 @@ its time with lingering corpses, sound effects, etc.</p>
|
||||
</p>
|
||||
|
||||
<h3>Attributes Inherited:</h3>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__players">players</a>, <a href="#attr_ba_Session__teams">teams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__sessionplayers">sessionplayers</a>, <a href="#attr_ba_Session__sessionteams">sessionteams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h3>Attributes Defined Here:</h3>
|
||||
<dl>
|
||||
<dt><h4><a name="attr_ba_FreeForAllSession__sessionglobalsnode">sessionglobalsnode</a></h4></dt><dd>
|
||||
@ -3687,7 +3687,7 @@ Use <a href="#function_ba_getmodel">ba.getmodel</a>() to instantiate one.</p>
|
||||
</p>
|
||||
|
||||
<h3>Attributes Inherited:</h3>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__players">players</a>, <a href="#attr_ba_Session__teams">teams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__sessionplayers">sessionplayers</a>, <a href="#attr_ba_Session__sessionteams">sessionteams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h3>Attributes Defined Here:</h3>
|
||||
<dl>
|
||||
<dt><h4><a name="attr_ba_MultiTeamSession__sessionglobalsnode">sessionglobalsnode</a></h4></dt><dd>
|
||||
@ -4659,7 +4659,7 @@ Pass 0 or a negative number for no ban time.</p>
|
||||
maintaining state between them (players, teams, score tallies, etc).</p>
|
||||
|
||||
<h3>Attributes:</h3>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__players">players</a>, <a href="#attr_ba_Session__sessionglobalsnode">sessionglobalsnode</a>, <a href="#attr_ba_Session__teams">teams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<h5><a href="#attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a>, <a href="#attr_ba_Session__customdata">customdata</a>, <a href="#attr_ba_Session__lobby">lobby</a>, <a href="#attr_ba_Session__max_players">max_players</a>, <a href="#attr_ba_Session__min_players">min_players</a>, <a href="#attr_ba_Session__sessionglobalsnode">sessionglobalsnode</a>, <a href="#attr_ba_Session__sessionplayers">sessionplayers</a>, <a href="#attr_ba_Session__sessionteams">sessionteams</a>, <a href="#attr_ba_Session__use_team_colors">use_team_colors</a>, <a href="#attr_ba_Session__use_teams">use_teams</a></h5>
|
||||
<dl>
|
||||
<dt><h4><a name="attr_ba_Session__allow_mid_activity_joins">allow_mid_activity_joins</a></h4></dt><dd>
|
||||
<p><span>bool</span></p>
|
||||
@ -4683,31 +4683,32 @@ any such selection.</p>
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__max_players">max_players</a></h4></dt><dd>
|
||||
<p><span>int</span></p>
|
||||
<p>The maximum number of Players allowed in the Session.</p>
|
||||
<p>The maximum number of players allowed in the Session.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__min_players">min_players</a></h4></dt><dd>
|
||||
<p><span>int</span></p>
|
||||
<p>The minimum number of Players who must be present for the Session
|
||||
<p>The minimum number of players who must be present for the Session
|
||||
to proceed past the initial joining screen.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__players">players</a></h4></dt><dd>
|
||||
<p><span>List[<a href="#class_ba_SessionPlayer">ba.SessionPlayer</a>]</span></p>
|
||||
<p>All <a href="#class_ba_Player">ba.Players</a> in the Session. Most things should use the player
|
||||
list in <a href="#class_ba_Activity">ba.Activity</a>; not this. Some players, such as those who have
|
||||
not yet selected a character, will only appear on this list.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__sessionglobalsnode">sessionglobalsnode</a></h4></dt><dd>
|
||||
<p><span><a href="#class_ba_Node">ba.Node</a></span></p>
|
||||
<p>The sessionglobals <a href="#class_ba_Node">ba.Node</a> for the session.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__teams">teams</a></h4></dt><dd>
|
||||
<dt><h4><a name="attr_ba_Session__sessionplayers">sessionplayers</a></h4></dt><dd>
|
||||
<p><span>List[<a href="#class_ba_SessionPlayer">ba.SessionPlayer</a>]</span></p>
|
||||
<p>All <a href="#class_ba_SessionPlayer">ba.SessionPlayers</a> in the Session. Most things should use the
|
||||
list of <a href="#class_ba_Player">ba.Players</a> in <a href="#class_ba_Activity">ba.Activity</a>; not this. Some players, such as
|
||||
those who have not yet selected a character, will only be
|
||||
found on this list.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__sessionteams">sessionteams</a></h4></dt><dd>
|
||||
<p><span>List[<a href="#class_ba_SessionTeam">ba.SessionTeam</a>]</span></p>
|
||||
<p>All the <a href="#class_ba_Team">ba.Teams</a> in the Session. Most things should use the team
|
||||
list in <a href="#class_ba_Activity">ba.Activity</a>; not this.</p>
|
||||
<p>All the <a href="#class_ba_SessionTeam">ba.SessionTeams</a> in the Session. Most things should use the
|
||||
list of <a href="#class_ba_Team">ba.Teams</a> in <a href="#class_ba_Activity">ba.Activity</a>; not this.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="attr_ba_Session__use_team_colors">use_team_colors</a></h4></dt><dd>
|
||||
|
||||
@ -149,7 +149,8 @@ def cpplint(projroot: Path, full: bool) -> None:
|
||||
codelines[unknownlintline] = ' elif False:'
|
||||
|
||||
def lint_file(filename: str) -> None:
|
||||
result = subprocess.call(['cpplint', '--root=src', filename], env=env)
|
||||
result = subprocess.call(
|
||||
['python3.7', '-m', 'cpplint', '--root=src', filename], env=env)
|
||||
if result != 0:
|
||||
raise CleanError(
|
||||
f'{Clr.RED}Cpplint failed for {filename}.{Clr.RST}')
|
||||
@ -213,7 +214,8 @@ def formatscripts(projroot: Path, full: bool) -> None:
|
||||
|
||||
def format_file(filename: str) -> None:
|
||||
start_time = time.time()
|
||||
result = subprocess.call(['yapf', '--in-place', filename])
|
||||
result = subprocess.call(
|
||||
['python3.7', '-m', 'yapf', '--in-place', filename])
|
||||
if result != 0:
|
||||
raise Exception(f'Formatting failed for {filename}')
|
||||
duration = time.time() - start_time
|
||||
|
||||
@ -586,11 +586,11 @@ class App:
|
||||
|
||||
with open(fname) as infile:
|
||||
lines = infile.read().splitlines()
|
||||
auto_start = lines.index(' #AUTOGENERATED_BEGIN (this section'
|
||||
auto_start = lines.index(' #AUTOGENERATED_BEGIN (this section'
|
||||
' is managed by the "update_project" tool)')
|
||||
auto_end = lines.index(' #AUTOGENERATED_END')
|
||||
auto_end = lines.index(' #AUTOGENERATED_END')
|
||||
our_lines = [
|
||||
' ${BA_SRC_ROOT}/ballistica' + f
|
||||
' ${BA_SRC_ROOT}/ballistica' + f
|
||||
for f in sorted(self._source_files + self._header_files)
|
||||
if not f.endswith('.mm') and not f.endswith('.m')
|
||||
]
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user