A few game logic bug fixes

This commit is contained in:
Eric Froemling 2020-05-29 18:22:04 -07:00
parent 95c93a455f
commit c98e645f74
12 changed files with 142 additions and 156 deletions

View File

@ -4132,16 +4132,16 @@
"assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "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/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", "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/8d/c2/9fd3ab19a28b05160f818f787115", "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f0/6c/17cfdbdfeac96070b5134251a451",
"build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/67/25/34c42457f20c9d87d538f4f69320", "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/52/25/297b9a00058301b85ddb02f6ee09",
"build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/d9/3d/39326060f1a1df1b18070d75ade8", "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/94/a8/e1477ff611c1e1a5a625bffff60c",
"build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9f/b7/d63ab7e13f1b9d931b83ef652262", "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/c6/d8/20917734baac0fdec68f72c41ed7",
"build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/39/45/f4d0bbe6dfa0286b1faaad5d4c0e", "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ed/2b/0f91bf6faf8efd08890a687d48d7",
"build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/a8/2b/251dcadd37ae0d2c08a0f3bb683d", "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1b/cc/88ba8eb1dbd3cc30181d75b4d16e",
"build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3a/1a/b80f37d9802d40e625b2df3696b1", "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/9e/df/8560a3f6a5394d6e1e4eff3c4225",
"build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/46/fd/6400f9eba88a419487f5d3732e54", "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/73/e2/8d816aa46639e1200a63c387ad5a",
"build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/7d/6a/3dc3c77c340471c0a7b79bf077a4", "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/85/9a/d64a09c882fe8ddd061d37547ea3",
"build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/97/5d/824c5c71f61d871c904c61fabc56", "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/d9/f8/ede540a4757ea9c246b4818abc93",
"build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/91/92/1f309a3edf4b4aa595ea83472e7a", "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/33/00/49adaf80c83df4d6d806691676c0",
"build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/d5/3c/fefdeed4e8048332724167fe1442" "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5e/e3/4a2fd651c619449b0ac47580b442"
} }

View File

@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand.
""" """
# (hash we can use to see if this file is out of date) # (hash we can use to see if this file is out of date)
# SOURCES_HASH=214732868903831008614942145147141302125 # SOURCES_HASH=34814525496434113316994893689868607574
# I'm sorry Pylint. I know this file saddens you. Be strong. # I'm sorry Pylint. I know this file saddens you. Be strong.
# pylint: disable=useless-suppression # pylint: disable=useless-suppression

View File

@ -39,8 +39,7 @@ from _ba import (CollideModel, Context, ContextCall, Data, InputDevice,
open_url, widget) open_url, widget)
from ba._activity import Activity from ba._activity import Activity
from ba._actor import Actor from ba._actor import Actor
from ba._player import (PlayerInfo, Player, playercast, playercast_o, from ba._player import PlayerInfo, Player, StandLocation
StandLocation)
from ba._nodeactor import NodeActor from ba._nodeactor import NodeActor
from ba._app import App from ba._app import App
from ba._coopgame import CoopGameActivity from ba._coopgame import CoopGameActivity

View File

@ -30,7 +30,7 @@ from ba._error import (print_exception, SessionTeamNotFoundError,
NodeNotFoundError) NodeNotFoundError)
from ba._dependency import DependencyComponent from ba._dependency import DependencyComponent
from ba._general import Call, verify_object_death from ba._general import Call, verify_object_death
from ba._messages import UNHANDLED from ba._messages import UNHANDLED, DieMessage, DeathType
import _ba import _ba
if TYPE_CHECKING: if TYPE_CHECKING:
@ -224,7 +224,7 @@ class Activity(DependencyComponent, Generic[PlayerType, TeamType]):
with _ba.Context('empty'): with _ba.Context('empty'):
self._expire() self._expire()
# Inform our owner that we're officially kicking the bucket. # Inform our owner that we officially kicked the bucket.
if self._transitioning_out: if self._transitioning_out:
session = self._session() session = self._session()
if session is not None: if session is not None:
@ -287,19 +287,19 @@ class Activity(DependencyComponent, Generic[PlayerType, TeamType]):
"""(internal)""" """(internal)"""
self._has_ended = val self._has_ended = val
def set_immediate_end(self, results: ba.TeamGameResults, delay: float, # def set_immediate_end(self, results: ba.TeamGameResults, delay: float,
force: bool) -> None: # force: bool) -> None:
"""Set the activity to die immediately after beginning. # """Set the activity to die immediately after beginning.
(internal) # (internal)
""" # """
if self.has_begun(): # if self.has_begun():
raise RuntimeError('This should only be called for Activities' # raise RuntimeError('This should only be called for Activities'
'that have not yet begun.') # 'that have not yet begun.')
if not self._should_end_immediately or force: # if not self._should_end_immediately or force:
self._should_end_immediately = True # self._should_end_immediately = True
self._should_end_immediately_results = results # self._should_end_immediately_results = results
self._should_end_immediately_delay = delay # self._should_end_immediately_delay = delay
def destroy(self) -> None: def destroy(self) -> None:
"""Begin the process of tearing down the activity. """Begin the process of tearing down the activity.
@ -522,20 +522,14 @@ class Activity(DependencyComponent, Generic[PlayerType, TeamType]):
for player in session.players: for player in session.players:
self.add_player(player) self.add_player(player)
# And finally tell the game to start. self._has_begun = True
with _ba.Context(self):
self._has_begun = True
self.on_begin()
# If the whole session wants to die and was waiting on us, # Let the activity do its thing.
# can kick off that process now. with _ba.Context(self):
if session.wants_to_end: # Note: do we want to catch errors here?
session.launch_end_session_activity() # Currently I believe we wind up canceling the
else: # activity launch; just wanna be sure that is intentional.
# Otherwise, if we've already been told to die, do so now. self.on_begin()
if self._should_end_immediately:
self.end(self._should_end_immediately_results,
self._should_end_immediately_delay)
def end(self, def end(self,
results: Any = None, results: Any = None,
@ -636,6 +630,16 @@ class Activity(DependencyComponent, Generic[PlayerType, TeamType]):
except Exception: except Exception:
print_exception(f'Error in on_player_leave for {self}') print_exception(f'Error in on_player_leave for {self}')
try: try:
# If they have an actor, kill it.
if player.actor:
player.actor.handlemessage(
DieMessage(how=DeathType.LEFT_GAME))
player.actor = None
except Exception:
print_exception(
f'Error killing player actor on leave for {self}')
try:
player.reset()
sessionplayer.reset() sessionplayer.reset()
sessionplayer.set_node(None) sessionplayer.set_node(None)
sessionplayer.set_activity(None) sessionplayer.set_activity(None)

View File

@ -29,7 +29,7 @@ from typing import TYPE_CHECKING, TypeVar
from ba._activity import Activity from ba._activity import Activity
from ba._score import ScoreInfo from ba._score import ScoreInfo
from ba._lang import Lstr from ba._lang import Lstr
from ba._messages import PlayerDiedMessage, StandMessage, DieMessage, DeathType from ba._messages import PlayerDiedMessage, StandMessage
from ba._error import NotFoundError, print_error, print_exception from ba._error import NotFoundError, print_error, print_exception
from ba._general import Call, WeakCall from ba._general import Call, WeakCall
from ba._player import PlayerInfo from ba._player import PlayerInfo
@ -549,18 +549,19 @@ class GameActivity(Activity[PlayerType, TeamType]):
# By default, just spawn a dude. # By default, just spawn a dude.
self.spawn_player(player) self.spawn_player(player)
def on_player_leave(self, player: PlayerType) -> None: # def on_player_leave(self, player: PlayerType) -> None:
super().on_player_leave(player) # super().on_player_leave(player)
# If the player has an actor, send it a deferred die message. # # If the player has an actor, send it a deferred die message.
# This way the player will be completely gone from the game # # This way the player will be completely gone from the game
# when the message goes through, making it less likely games # # when the message goes through, making it less likely games
# will incorrectly try to respawn them, etc. # # will incorrectly try to respawn them, etc.
actor = player.actor # actor = player.actor
if actor is not None: # if actor is not None:
_ba.pushcall( # _ba.pushcall(
Call(actor.handlemessage, DieMessage(how=DeathType.LEFT_GAME))) # Call(actor.handlemessage,
player.set_actor(None) # DieMessage(how=DeathType.LEFT_GAME)))
# player.actor = None
def handlemessage(self, msg: Any) -> Any: def handlemessage(self, msg: Any) -> Any:
if isinstance(msg, PlayerDiedMessage): if isinstance(msg, PlayerDiedMessage):
@ -948,7 +949,7 @@ class GameActivity(Activity[PlayerType, TeamType]):
character=player.character, character=player.character,
player=player) player=player)
player.set_actor(spaz) player.actor = spaz
assert spaz.node assert spaz.node
# If this is co-op and we're on Courtyard or Runaround, add the # If this is co-op and we're on Courtyard or Runaround, add the

View File

@ -175,13 +175,6 @@ class Player(Generic[TeamType]):
""" """
return self._sessionplayer.get_name(full=full, icon=icon) return self._sessionplayer.get_name(full=full, icon=icon)
def set_actor(self, actor: Optional[ba.Actor]) -> None:
"""set_actor(actor: Optional[ba.Actor]) -> None
Set the player's associated ba.Actor.
"""
self.actor = actor
def is_alive(self) -> bool: def is_alive(self) -> bool:
"""is_alive() -> bool """is_alive() -> bool
@ -223,6 +216,12 @@ class Player(Generic[TeamType]):
return self.exists() return self.exists()
# NOTE: It seems we might not need these playercast() calls; have gone
# the direction where things returning players generally take a type arg
# and do this themselves; that way the user is 'forced' to deal with types
# instead of requiring extra work by them.
def playercast(totype: Type[PlayerType], player: ba.Player) -> PlayerType: def playercast(totype: Type[PlayerType], player: ba.Player) -> PlayerType:
"""Cast a ba.Player to a specific ba.Player subclass. """Cast a ba.Player to a specific ba.Player subclass.

View File

@ -175,8 +175,12 @@ class Session:
self._activity_end_timer: Optional[ba.Timer] = None self._activity_end_timer: Optional[ba.Timer] = None
self._activity_weak = empty_weakref(Activity) self._activity_weak = empty_weakref(Activity)
self._next_activity: Optional[ba.Activity] = None self._next_activity: Optional[ba.Activity] = None
self.wants_to_end = False self._wants_to_end = False
self._ending = False self._ending = False
self._activity_should_end_immediately = False
self._activity_should_end_immediately_results: (
Optional[ba.TeamGameResults]) = None
self._activity_should_end_immediately_delay = 0.0
# Create static teams if we're using them. # Create static teams if we're using them.
if self.use_teams: if self.use_teams:
@ -324,11 +328,11 @@ class Session:
Note that this happens asynchronously, allowing the Note that this happens asynchronously, allowing the
session and its activities to shut down gracefully. session and its activities to shut down gracefully.
""" """
self.wants_to_end = True self._wants_to_end = True
if self._next_activity is None: if self._next_activity is None:
self.launch_end_session_activity() self._launch_end_session_activity()
def launch_end_session_activity(self) -> None: def _launch_end_session_activity(self) -> None:
"""(internal)""" """(internal)"""
from ba._activitytypes import EndSessionActivity from ba._activitytypes import EndSessionActivity
from ba._enums import TimeType from ba._enums import TimeType
@ -341,11 +345,11 @@ class Session:
if since_last < 30.0: if since_last < 30.0:
return return
print_error( print_error(
'launch_end_session_activity called twice (since_last=' + '_launch_end_session_activity called twice (since_last=' +
str(since_last) + ')') str(since_last) + ')')
self._launch_end_session_activity_time = curtime self._launch_end_session_activity_time = curtime
self.set_activity(_ba.new_activity(EndSessionActivity)) self.set_activity(_ba.new_activity(EndSessionActivity))
self.wants_to_end = False self._wants_to_end = False
self._ending = True # Prevent further actions. self._ending = True # Prevent further actions.
def on_team_join(self, team: ba.SessionTeam) -> None: def on_team_join(self, team: ba.SessionTeam) -> None:
@ -373,7 +377,11 @@ class Session:
# If this activity hasn't begun yet, just set it up to end immediately # If this activity hasn't begun yet, just set it up to end immediately
# once it does. # once it does.
if not activity.has_begun(): if not activity.has_begun():
activity.set_immediate_end(results, delay, force) # activity.set_immediate_end(results, delay, force)
if not self._activity_should_end_immediately or force:
self._activity_should_end_immediately = True
self._activity_should_end_immediately_results = results
self._activity_should_end_immediately_delay = delay
# The activity has already begun; get ready to end it. # The activity has already begun; get ready to end it.
else: else:
@ -506,7 +514,7 @@ class Session:
with _ba.Context(self): with _ba.Context(self):
result = self.on_player_request(sessionplayer) result = self.on_player_request(sessionplayer)
except Exception: except Exception:
print_exception('error in on_player_request call for', self) print_exception(f'Error in on_player_request for {self}')
result = False result = False
# If the user said yes, add the player to the session list. # If the user said yes, add the player to the session list.
@ -540,11 +548,25 @@ class Session:
self._activity_retained = self._next_activity self._activity_retained = self._next_activity
self._activity_weak = weakref.ref(self._next_activity) self._activity_weak = weakref.ref(self._next_activity)
self._next_activity = None self._next_activity = None
self._activity_should_end_immediately = False
# Kick out anyone loitering in the lobby. # Kick out anyone loitering in the lobby.
self.lobby.remove_all_choosers_and_kick_players() self.lobby.remove_all_choosers_and_kick_players()
# Kick off the activity.
self._activity_retained.begin(self) self._activity_retained.begin(self)
# If we want to go down, we're now free to kick off that process.
if self._wants_to_end:
self._launch_end_session_activity()
else:
# Otherwise, if the activity has already been told to end,
# do so now.
if self._activity_should_end_immediately:
self._activity_retained.end(
self._activity_should_end_immediately_results,
self._activity_should_end_immediately_delay)
def _on_player_ready(self, chooser: ba.Chooser) -> None: def _on_player_ready(self, chooser: ba.Chooser) -> None:
"""Called when a ba.Player has checked themself ready.""" """Called when a ba.Player has checked themself ready."""
lobby = chooser.lobby lobby = chooser.lobby
@ -607,13 +629,13 @@ class Session:
# referencing the chooser which could inadvertently keep it alive. # referencing the chooser which could inadvertently keep it alive.
sessionplayer.reset_input() sessionplayer.reset_input()
# Pass it to the current activity if it has already begun # We can pass it to the current activity if it has already begun
# (otherwise it'll get passed once begin is called). # (otherwise it'll get passed once begin is called).
pass_to_activity = (activity.has_begun() pass_to_activity = (activity.has_begun()
and not activity.is_joining_activity) and not activity.is_joining_activity)
# If we're not allowing mid-game joins, don't pass; just announce # However, if we're not allowing mid-game joins, don't actually pass;
# the arrival and say they'll partake next round. # just announce the arrival and say they'll partake next round.
if pass_to_activity: if pass_to_activity:
if not self.allow_mid_activity_joins: if not self.allow_mid_activity_joins:
pass_to_activity = False pass_to_activity = False

View File

@ -150,6 +150,17 @@ class BombFactory:
ba.Sound for a rolling bomb. ba.Sound for a rolling bomb.
""" """
@staticmethod
def get() -> BombFactory:
"""Get/create a shared bastd.actor.bomb.BombFactory object."""
activity = ba.getactivity()
factory = getattr(activity, STORAGE_ATTR_NAME, None)
if factory is None:
factory = BombFactory()
setattr(activity, STORAGE_ATTR_NAME, factory)
assert isinstance(factory, BombFactory)
return factory
def random_explode_sound(self) -> ba.Sound: def random_explode_sound(self) -> ba.Sound:
"""Return a random explosion ba.Sound from the factory.""" """Return a random explosion ba.Sound from the factory."""
return self.explode_sounds[random.randrange(len(self.explode_sounds))] return self.explode_sounds[random.randrange(len(self.explode_sounds))]
@ -301,17 +312,6 @@ class BombFactory:
) )
def get_factory() -> BombFactory:
"""Get/create a shared bastd.actor.bomb.BombFactory object."""
activity = ba.getactivity()
factory = getattr(activity, STORAGE_ATTR_NAME, None)
if factory is None:
factory = BombFactory()
setattr(activity, STORAGE_ATTR_NAME, factory)
assert isinstance(factory, BombFactory)
return factory
class SplatMessage: class SplatMessage:
"""Tells an object to make a splat noise.""" """Tells an object to make a splat noise."""
@ -335,9 +335,6 @@ class WarnMessage:
class ExplodeHitMessage: class ExplodeHitMessage:
"""Tell an object it was hit by an explosion.""" """Tell an object it was hit by an explosion."""
def __init__(self) -> None:
pass
class Blast(ba.Actor): class Blast(ba.Actor):
"""An explosion, as generated by a bomb or some other object. """An explosion, as generated by a bomb or some other object.
@ -362,7 +359,7 @@ class Blast(ba.Actor):
super().__init__() super().__init__()
shared = SharedObjects.get() shared = SharedObjects.get()
factory = get_factory() factory = BombFactory.get()
self.blast_type = blast_type self.blast_type = blast_type
self._source_player = source_player self._source_player = source_player
@ -653,11 +650,14 @@ class Blast(ba.Actor):
radius=self.radius, radius=self.radius,
source_player=ba.existing(self._source_player))) source_player=ba.existing(self._source_player)))
if self.blast_type == 'ice': if self.blast_type == 'ice':
ba.playsound(get_factory().freeze_sound, 10, position=nodepos) ba.playsound(BombFactory.get().freeze_sound,
10,
position=nodepos)
node.handlemessage(ba.FreezeMessage()) node.handlemessage(ba.FreezeMessage())
else: else:
super().handlemessage(msg) return super().handlemessage(msg)
return None
class Bomb(ba.Actor): class Bomb(ba.Actor):
@ -687,7 +687,7 @@ class Bomb(ba.Actor):
super().__init__() super().__init__()
shared = SharedObjects.get() shared = SharedObjects.get()
factory = get_factory() factory = BombFactory.get()
if bomb_type not in ('ice', 'impact', 'land_mine', 'normal', 'sticky', if bomb_type not in ('ice', 'impact', 'land_mine', 'normal', 'sticky',
'tnt'): 'tnt'):
@ -906,7 +906,7 @@ class Bomb(ba.Actor):
and ba.time() - self._last_sticky_sound_time > 1.0): and ba.time() - self._last_sticky_sound_time > 1.0):
self._last_sticky_sound_time = ba.time() self._last_sticky_sound_time = ba.time()
assert self.node assert self.node
ba.playsound(get_factory().sticky_impact_sound, ba.playsound(BombFactory.get().sticky_impact_sound,
2.0, 2.0,
position=self.node.position) position=self.node.position)
@ -940,7 +940,7 @@ class Bomb(ba.Actor):
def _handle_warn(self) -> None: def _handle_warn(self) -> None:
if self.texture_sequence and self.node: if self.texture_sequence and self.node:
self.texture_sequence.rate = 30 self.texture_sequence.rate = 30
ba.playsound(get_factory().warn_sound, ba.playsound(BombFactory.get().warn_sound,
0.5, 0.5,
position=self.node.position) position=self.node.position)
@ -959,7 +959,7 @@ class Bomb(ba.Actor):
""" """
if not self.node: if not self.node:
return return
factory = get_factory() factory = BombFactory.get()
intex: Sequence[ba.Texture] intex: Sequence[ba.Texture]
if self.bomb_type == 'land_mine': if self.bomb_type == 'land_mine':
intex = (factory.land_mine_lit_tex, factory.land_mine_tex) intex = (factory.land_mine_lit_tex, factory.land_mine_tex)

View File

@ -201,26 +201,23 @@ class PlayerSpaz(Spaz):
# Keep track of if we're being held and by who most recently. # Keep track of if we're being held and by who most recently.
if isinstance(msg, ba.PickedUpMessage): if isinstance(msg, ba.PickedUpMessage):
super().handlemessage(msg) # Augment standard behavior. # Augment standard behavior.
super().handlemessage(msg)
self.held_count += 1 self.held_count += 1
picked_up_by = ba.playercast_o(type(self._player), picked_up_by = msg.node.source_player
msg.node.source_player)
if picked_up_by: if picked_up_by:
self.last_player_held_by = picked_up_by self.last_player_held_by = picked_up_by
elif isinstance(msg, ba.DroppedMessage): elif isinstance(msg, ba.DroppedMessage):
super().handlemessage(msg) # Augment standard behavior. # Augment standard behavior.
super().handlemessage(msg)
self.held_count -= 1 self.held_count -= 1
if self.held_count < 0: if self.held_count < 0:
print('ERROR: spaz held_count < 0') print('ERROR: spaz held_count < 0')
# Let's count someone dropping us as an attack. # Let's count someone dropping us as an attack.
try: picked_up_by = msg.node.source_player
picked_up_by_2 = ba.playercast_o(type(self._player), if picked_up_by:
msg.node.source_player) self.last_player_attacked_by = picked_up_by
except Exception:
picked_up_by_2 = None
if picked_up_by_2:
self.last_player_attacked_by = picked_up_by_2
self.last_attacked_time = ba.time() self.last_attacked_time = ba.time()
self.last_attacked_type = ('picked_up', 'default') self.last_attacked_type = ('picked_up', 'default')
elif isinstance(msg, ba.StandMessage): elif isinstance(msg, ba.StandMessage):

View File

@ -325,8 +325,10 @@ class _EntryProxy:
scoreboard = self._scoreboard() scoreboard = self._scoreboard()
# Remove our team from the scoreboard if its still around. # Remove our team from the scoreboard if its still around.
# (but deferred, in case we die in a sim step or something where
# its illegal to modify nodes)
if scoreboard is not None: if scoreboard is not None:
scoreboard.remove_team(self._team_id) ba.pushcall(ba.Call(scoreboard.remove_team, self._team_id))
class Scoreboard: class Scoreboard:

View File

@ -880,8 +880,8 @@ def _preload2() -> None:
'dripity', 'spawn', 'gong' 'dripity', 'spawn', 'gong'
]: ]:
ba.getsound(sname) ba.getsound(sname)
from bastd.actor import bomb from bastd.actor.bomb import BombFactory
bomb.get_factory() BombFactory.get()
ba.timer(0.1, _preload3) ba.timer(0.1, _preload3)

View File

@ -1,5 +1,5 @@
<!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND --> <!-- THIS FILE IS AUTO GENERATED; DO NOT EDIT BY HAND -->
<h4><em>last updated on 2020-05-29 for Ballistica version 1.5.0 build 20034</em></h4> <h4><em>last updated on 2020-05-29 for Ballistica version 1.5.0 build 20035</em></h4>
<p>This page documents the Python classes and functions in the 'ba' module, <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> 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> <hr>
@ -57,8 +57,6 @@
<li><a href="#function_ba_getnodes">ba.getnodes()</a></li> <li><a href="#function_ba_getnodes">ba.getnodes()</a></li>
<li><a href="#function_ba_getsession">ba.getsession()</a></li> <li><a href="#function_ba_getsession">ba.getsession()</a></li>
<li><a href="#function_ba_newnode">ba.newnode()</a></li> <li><a href="#function_ba_newnode">ba.newnode()</a></li>
<li><a href="#function_ba_playercast">ba.playercast()</a></li>
<li><a href="#function_ba_playercast_o">ba.playercast_o()</a></li>
<li><a href="#function_ba_playsound">ba.playsound()</a></li> <li><a href="#function_ba_playsound">ba.playsound()</a></li>
<li><a href="#function_ba_printnodes">ba.printnodes()</a></li> <li><a href="#function_ba_printnodes">ba.printnodes()</a></li>
<li><a href="#function_ba_setmusic">ba.setmusic()</a></li> <li><a href="#function_ba_setmusic">ba.setmusic()</a></li>
@ -1597,7 +1595,7 @@ start_long_action(callback_when_done=<a href="#class_ba_ContextCall">ba.ContextC
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_GameActivity__add_actor_weak_ref">add_actor_weak_ref()</a>, <a href="#method_ba_GameActivity__add_player">add_player()</a>, <a href="#method_ba_GameActivity__add_team">add_team()</a>, <a href="#method_ba_GameActivity__begin">begin()</a>, <a href="#method_ba_GameActivity__continue_or_end_game">continue_or_end_game()</a>, <a href="#method_ba_GameActivity__create_player">create_player()</a>, <a href="#method_ba_GameActivity__create_settings_ui">create_settings_ui()</a>, <a href="#method_ba_GameActivity__create_team">create_team()</a>, <a href="#method_ba_GameActivity__dep_is_present">dep_is_present()</a>, <a href="#method_ba_GameActivity__destroy">destroy()</a>, <a href="#method_ba_GameActivity__end">end()</a>, <a href="#method_ba_GameActivity__end_game">end_game()</a>, <a href="#method_ba_GameActivity__get_description">get_description()</a>, <a href="#method_ba_GameActivity__get_description_display_string">get_description_display_string()</a>, <a href="#method_ba_GameActivity__get_display_string">get_display_string()</a>, <a href="#method_ba_GameActivity__get_dynamic_deps">get_dynamic_deps()</a>, <a href="#method_ba_GameActivity__get_game_settings">get_game_settings()</a>, <a href="#method_ba_GameActivity__get_instance_description">get_instance_description()</a>, <a href="#method_ba_GameActivity__get_instance_description_short">get_instance_description_short()</a>, <a href="#method_ba_GameActivity__get_instance_display_string">get_instance_display_string()</a>, <a href="#method_ba_GameActivity__get_instance_scoreboard_display_string">get_instance_scoreboard_display_string()</a>, <a href="#method_ba_GameActivity__get_name">get_name()</a>, <a href="#method_ba_GameActivity__get_score_info">get_score_info()</a>, <a href="#method_ba_GameActivity__get_settings_display_string">get_settings_display_string()</a>, <a href="#method_ba_GameActivity__get_supported_maps">get_supported_maps()</a>, <a href="#method_ba_GameActivity__get_team_display_string">get_team_display_string()</a>, <a href="#method_ba_GameActivity__handlemessage">handlemessage()</a>, <a href="#method_ba_GameActivity__has_begun">has_begun()</a>, <a href="#method_ba_GameActivity__has_ended">has_ended()</a>, <a href="#method_ba_GameActivity__has_transitioned_in">has_transitioned_in()</a>, <a href="#method_ba_GameActivity__is_transitioning_out">is_transitioning_out()</a>, <a href="#method_ba_GameActivity__is_waiting_for_continue">is_waiting_for_continue()</a>, <a href="#method_ba_GameActivity__on_continue">on_continue()</a>, <a href="#method_ba_GameActivity__on_expire">on_expire()</a>, <a href="#method_ba_GameActivity__on_player_join">on_player_join()</a>, <a href="#method_ba_GameActivity__on_player_leave">on_player_leave()</a>, <a href="#method_ba_GameActivity__on_team_join">on_team_join()</a>, <a href="#method_ba_GameActivity__on_team_leave">on_team_leave()</a>, <a href="#method_ba_GameActivity__on_transition_in">on_transition_in()</a>, <a href="#method_ba_GameActivity__on_transition_out">on_transition_out()</a>, <a href="#method_ba_GameActivity__remove_player">remove_player()</a>, <a href="#method_ba_GameActivity__remove_team">remove_team()</a>, <a href="#method_ba_GameActivity__respawn_player">respawn_player()</a>, <a href="#method_ba_GameActivity__retain_actor">retain_actor()</a>, <a href="#method_ba_GameActivity__set_has_ended">set_has_ended()</a>, <a href="#method_ba_GameActivity__set_immediate_end">set_immediate_end()</a>, <a href="#method_ba_GameActivity__setup_standard_powerup_drops">setup_standard_powerup_drops()</a>, <a href="#method_ba_GameActivity__setup_standard_time_limit">setup_standard_time_limit()</a>, <a href="#method_ba_GameActivity__show_zoom_message">show_zoom_message()</a>, <a href="#method_ba_GameActivity__spawn_player">spawn_player()</a>, <a href="#method_ba_GameActivity__spawn_player_if_exists">spawn_player_if_exists()</a>, <a href="#method_ba_GameActivity__transition_in">transition_in()</a>, <a href="#method_ba_GameActivity__transition_out">transition_out()</a></h5> <h5><a href="#method_ba_GameActivity__add_actor_weak_ref">add_actor_weak_ref()</a>, <a href="#method_ba_GameActivity__add_player">add_player()</a>, <a href="#method_ba_GameActivity__add_team">add_team()</a>, <a href="#method_ba_GameActivity__begin">begin()</a>, <a href="#method_ba_GameActivity__continue_or_end_game">continue_or_end_game()</a>, <a href="#method_ba_GameActivity__create_player">create_player()</a>, <a href="#method_ba_GameActivity__create_settings_ui">create_settings_ui()</a>, <a href="#method_ba_GameActivity__create_team">create_team()</a>, <a href="#method_ba_GameActivity__dep_is_present">dep_is_present()</a>, <a href="#method_ba_GameActivity__destroy">destroy()</a>, <a href="#method_ba_GameActivity__end">end()</a>, <a href="#method_ba_GameActivity__end_game">end_game()</a>, <a href="#method_ba_GameActivity__get_description">get_description()</a>, <a href="#method_ba_GameActivity__get_description_display_string">get_description_display_string()</a>, <a href="#method_ba_GameActivity__get_display_string">get_display_string()</a>, <a href="#method_ba_GameActivity__get_dynamic_deps">get_dynamic_deps()</a>, <a href="#method_ba_GameActivity__get_game_settings">get_game_settings()</a>, <a href="#method_ba_GameActivity__get_instance_description">get_instance_description()</a>, <a href="#method_ba_GameActivity__get_instance_description_short">get_instance_description_short()</a>, <a href="#method_ba_GameActivity__get_instance_display_string">get_instance_display_string()</a>, <a href="#method_ba_GameActivity__get_instance_scoreboard_display_string">get_instance_scoreboard_display_string()</a>, <a href="#method_ba_GameActivity__get_name">get_name()</a>, <a href="#method_ba_GameActivity__get_score_info">get_score_info()</a>, <a href="#method_ba_GameActivity__get_settings_display_string">get_settings_display_string()</a>, <a href="#method_ba_GameActivity__get_supported_maps">get_supported_maps()</a>, <a href="#method_ba_GameActivity__get_team_display_string">get_team_display_string()</a>, <a href="#method_ba_GameActivity__handlemessage">handlemessage()</a>, <a href="#method_ba_GameActivity__has_begun">has_begun()</a>, <a href="#method_ba_GameActivity__has_ended">has_ended()</a>, <a href="#method_ba_GameActivity__has_transitioned_in">has_transitioned_in()</a>, <a href="#method_ba_GameActivity__is_transitioning_out">is_transitioning_out()</a>, <a href="#method_ba_GameActivity__is_waiting_for_continue">is_waiting_for_continue()</a>, <a href="#method_ba_GameActivity__on_continue">on_continue()</a>, <a href="#method_ba_GameActivity__on_expire">on_expire()</a>, <a href="#method_ba_GameActivity__on_player_join">on_player_join()</a>, <a href="#method_ba_GameActivity__on_player_leave">on_player_leave()</a>, <a href="#method_ba_GameActivity__on_team_join">on_team_join()</a>, <a href="#method_ba_GameActivity__on_team_leave">on_team_leave()</a>, <a href="#method_ba_GameActivity__on_transition_in">on_transition_in()</a>, <a href="#method_ba_GameActivity__on_transition_out">on_transition_out()</a>, <a href="#method_ba_GameActivity__remove_player">remove_player()</a>, <a href="#method_ba_GameActivity__remove_team">remove_team()</a>, <a href="#method_ba_GameActivity__respawn_player">respawn_player()</a>, <a href="#method_ba_GameActivity__retain_actor">retain_actor()</a>, <a href="#method_ba_GameActivity__set_has_ended">set_has_ended()</a>, <a href="#method_ba_GameActivity__setup_standard_powerup_drops">setup_standard_powerup_drops()</a>, <a href="#method_ba_GameActivity__setup_standard_time_limit">setup_standard_time_limit()</a>, <a href="#method_ba_GameActivity__show_zoom_message">show_zoom_message()</a>, <a href="#method_ba_GameActivity__spawn_player">spawn_player()</a>, <a href="#method_ba_GameActivity__spawn_player_if_exists">spawn_player_if_exists()</a>, <a href="#method_ba_GameActivity__transition_in">transition_in()</a>, <a href="#method_ba_GameActivity__transition_out">transition_out()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<h5><a href="#method_ba_CoopGameActivity____init__">&lt;constructor&gt;</a>, <a href="#method_ba_CoopGameActivity__celebrate">celebrate()</a>, <a href="#method_ba_CoopGameActivity__fade_to_red">fade_to_red()</a>, <a href="#method_ba_CoopGameActivity__get_score_type">get_score_type()</a>, <a href="#method_ba_CoopGameActivity__on_begin">on_begin()</a>, <a href="#method_ba_CoopGameActivity__setup_low_life_warning_sound">setup_low_life_warning_sound()</a>, <a href="#method_ba_CoopGameActivity__spawn_player_spaz">spawn_player_spaz()</a>, <a href="#method_ba_CoopGameActivity__supports_session_type">supports_session_type()</a></h5> <h5><a href="#method_ba_CoopGameActivity____init__">&lt;constructor&gt;</a>, <a href="#method_ba_CoopGameActivity__celebrate">celebrate()</a>, <a href="#method_ba_CoopGameActivity__fade_to_red">fade_to_red()</a>, <a href="#method_ba_CoopGameActivity__get_score_type">get_score_type()</a>, <a href="#method_ba_CoopGameActivity__on_begin">on_begin()</a>, <a href="#method_ba_CoopGameActivity__setup_low_life_warning_sound">setup_low_life_warning_sound()</a>, <a href="#method_ba_CoopGameActivity__spawn_player_spaz">spawn_player_spaz()</a>, <a href="#method_ba_CoopGameActivity__supports_session_type">supports_session_type()</a></h5>
<dl> <dl>
@ -1687,7 +1685,7 @@ there is no associated Campaign.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_Session__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_Session__end">end()</a>, <a href="#method_ba_Session__end_activity">end_activity()</a>, <a href="#method_ba_Session__getactivity">getactivity()</a>, <a href="#method_ba_Session__handlemessage">handlemessage()</a>, <a href="#method_ba_Session__launch_end_session_activity">launch_end_session_activity()</a>, <a href="#method_ba_Session__on_player_request">on_player_request()</a>, <a href="#method_ba_Session__on_team_join">on_team_join()</a>, <a href="#method_ba_Session__on_team_leave">on_team_leave()</a>, <a href="#method_ba_Session__set_activity">set_activity()</a>, <a href="#method_ba_Session__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5> <h5><a href="#method_ba_Session__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_Session__end">end()</a>, <a href="#method_ba_Session__end_activity">end_activity()</a>, <a href="#method_ba_Session__getactivity">getactivity()</a>, <a href="#method_ba_Session__handlemessage">handlemessage()</a>, <a href="#method_ba_Session__on_player_request">on_player_request()</a>, <a href="#method_ba_Session__on_team_join">on_team_join()</a>, <a href="#method_ba_Session__on_team_leave">on_team_leave()</a>, <a href="#method_ba_Session__set_activity">set_activity()</a>, <a href="#method_ba_Session__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<h5><a href="#method_ba_CoopSession____init__">&lt;constructor&gt;</a>, <a href="#method_ba_CoopSession__get_current_game_instance">get_current_game_instance()</a>, <a href="#method_ba_CoopSession__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_CoopSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_CoopSession__on_player_leave">on_player_leave()</a>, <a href="#method_ba_CoopSession__restart">restart()</a></h5> <h5><a href="#method_ba_CoopSession____init__">&lt;constructor&gt;</a>, <a href="#method_ba_CoopSession__get_current_game_instance">get_current_game_instance()</a>, <a href="#method_ba_CoopSession__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_CoopSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_CoopSession__on_player_leave">on_player_leave()</a>, <a href="#method_ba_CoopSession__restart">restart()</a></h5>
<dl> <dl>
@ -2038,7 +2036,7 @@ its time with lingering corpses, sound effects, etc.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_MultiTeamSession__announce_game_results">announce_game_results()</a>, <a href="#method_ba_MultiTeamSession__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_MultiTeamSession__end">end()</a>, <a href="#method_ba_MultiTeamSession__end_activity">end_activity()</a>, <a href="#method_ba_MultiTeamSession__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_MultiTeamSession__get_ffa_series_length">get_ffa_series_length()</a>, <a href="#method_ba_MultiTeamSession__get_game_number">get_game_number()</a>, <a href="#method_ba_MultiTeamSession__get_max_players">get_max_players()</a>, <a href="#method_ba_MultiTeamSession__get_next_game_description">get_next_game_description()</a>, <a href="#method_ba_MultiTeamSession__get_series_length">get_series_length()</a>, <a href="#method_ba_MultiTeamSession__getactivity">getactivity()</a>, <a href="#method_ba_MultiTeamSession__handlemessage">handlemessage()</a>, <a href="#method_ba_MultiTeamSession__launch_end_session_activity">launch_end_session_activity()</a>, <a href="#method_ba_MultiTeamSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_MultiTeamSession__on_player_leave">on_player_leave()</a>, <a href="#method_ba_MultiTeamSession__on_player_request">on_player_request()</a>, <a href="#method_ba_MultiTeamSession__on_team_join">on_team_join()</a>, <a href="#method_ba_MultiTeamSession__on_team_leave">on_team_leave()</a>, <a href="#method_ba_MultiTeamSession__set_activity">set_activity()</a>, <a href="#method_ba_MultiTeamSession__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5> <h5><a href="#method_ba_MultiTeamSession__announce_game_results">announce_game_results()</a>, <a href="#method_ba_MultiTeamSession__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_MultiTeamSession__end">end()</a>, <a href="#method_ba_MultiTeamSession__end_activity">end_activity()</a>, <a href="#method_ba_MultiTeamSession__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_MultiTeamSession__get_ffa_series_length">get_ffa_series_length()</a>, <a href="#method_ba_MultiTeamSession__get_game_number">get_game_number()</a>, <a href="#method_ba_MultiTeamSession__get_max_players">get_max_players()</a>, <a href="#method_ba_MultiTeamSession__get_next_game_description">get_next_game_description()</a>, <a href="#method_ba_MultiTeamSession__get_series_length">get_series_length()</a>, <a href="#method_ba_MultiTeamSession__getactivity">getactivity()</a>, <a href="#method_ba_MultiTeamSession__handlemessage">handlemessage()</a>, <a href="#method_ba_MultiTeamSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_MultiTeamSession__on_player_leave">on_player_leave()</a>, <a href="#method_ba_MultiTeamSession__on_player_request">on_player_request()</a>, <a href="#method_ba_MultiTeamSession__on_team_join">on_team_join()</a>, <a href="#method_ba_MultiTeamSession__on_team_leave">on_team_leave()</a>, <a href="#method_ba_MultiTeamSession__set_activity">set_activity()</a>, <a href="#method_ba_MultiTeamSession__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<dl> <dl>
<dt><h4><a name="method_ba_DualTeamSession____init__">&lt;constructor&gt;</a></dt></h4><dd> <dt><h4><a name="method_ba_DualTeamSession____init__">&lt;constructor&gt;</a></dt></h4><dd>
@ -2084,7 +2082,7 @@ its time with lingering corpses, sound effects, etc.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_MultiTeamSession__announce_game_results">announce_game_results()</a>, <a href="#method_ba_MultiTeamSession__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_MultiTeamSession__end">end()</a>, <a href="#method_ba_MultiTeamSession__end_activity">end_activity()</a>, <a href="#method_ba_MultiTeamSession__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_MultiTeamSession__get_ffa_series_length">get_ffa_series_length()</a>, <a href="#method_ba_MultiTeamSession__get_game_number">get_game_number()</a>, <a href="#method_ba_MultiTeamSession__get_max_players">get_max_players()</a>, <a href="#method_ba_MultiTeamSession__get_next_game_description">get_next_game_description()</a>, <a href="#method_ba_MultiTeamSession__get_series_length">get_series_length()</a>, <a href="#method_ba_MultiTeamSession__getactivity">getactivity()</a>, <a href="#method_ba_MultiTeamSession__handlemessage">handlemessage()</a>, <a href="#method_ba_MultiTeamSession__launch_end_session_activity">launch_end_session_activity()</a>, <a href="#method_ba_MultiTeamSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_MultiTeamSession__on_player_leave">on_player_leave()</a>, <a href="#method_ba_MultiTeamSession__on_player_request">on_player_request()</a>, <a href="#method_ba_MultiTeamSession__on_team_join">on_team_join()</a>, <a href="#method_ba_MultiTeamSession__on_team_leave">on_team_leave()</a>, <a href="#method_ba_MultiTeamSession__set_activity">set_activity()</a>, <a href="#method_ba_MultiTeamSession__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5> <h5><a href="#method_ba_MultiTeamSession__announce_game_results">announce_game_results()</a>, <a href="#method_ba_MultiTeamSession__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_MultiTeamSession__end">end()</a>, <a href="#method_ba_MultiTeamSession__end_activity">end_activity()</a>, <a href="#method_ba_MultiTeamSession__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_MultiTeamSession__get_ffa_series_length">get_ffa_series_length()</a>, <a href="#method_ba_MultiTeamSession__get_game_number">get_game_number()</a>, <a href="#method_ba_MultiTeamSession__get_max_players">get_max_players()</a>, <a href="#method_ba_MultiTeamSession__get_next_game_description">get_next_game_description()</a>, <a href="#method_ba_MultiTeamSession__get_series_length">get_series_length()</a>, <a href="#method_ba_MultiTeamSession__getactivity">getactivity()</a>, <a href="#method_ba_MultiTeamSession__handlemessage">handlemessage()</a>, <a href="#method_ba_MultiTeamSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_MultiTeamSession__on_player_leave">on_player_leave()</a>, <a href="#method_ba_MultiTeamSession__on_player_request">on_player_request()</a>, <a href="#method_ba_MultiTeamSession__on_team_join">on_team_join()</a>, <a href="#method_ba_MultiTeamSession__on_team_leave">on_team_leave()</a>, <a href="#method_ba_MultiTeamSession__set_activity">set_activity()</a>, <a href="#method_ba_MultiTeamSession__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<h5><a href="#method_ba_FreeForAllSession____init__">&lt;constructor&gt;</a>, <a href="#method_ba_FreeForAllSession__get_ffa_point_awards">get_ffa_point_awards()</a></h5> <h5><a href="#method_ba_FreeForAllSession____init__">&lt;constructor&gt;</a>, <a href="#method_ba_FreeForAllSession__get_ffa_point_awards">get_ffa_point_awards()</a></h5>
<dl> <dl>
@ -2182,9 +2180,9 @@ its time with lingering corpses, sound effects, etc.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_Activity__add_actor_weak_ref">add_actor_weak_ref()</a>, <a href="#method_ba_Activity__add_player">add_player()</a>, <a href="#method_ba_Activity__add_team">add_team()</a>, <a href="#method_ba_Activity__begin">begin()</a>, <a href="#method_ba_Activity__create_player">create_player()</a>, <a href="#method_ba_Activity__create_team">create_team()</a>, <a href="#method_ba_Activity__dep_is_present">dep_is_present()</a>, <a href="#method_ba_Activity__destroy">destroy()</a>, <a href="#method_ba_Activity__get_dynamic_deps">get_dynamic_deps()</a>, <a href="#method_ba_Activity__has_begun">has_begun()</a>, <a href="#method_ba_Activity__has_ended">has_ended()</a>, <a href="#method_ba_Activity__has_transitioned_in">has_transitioned_in()</a>, <a href="#method_ba_Activity__is_transitioning_out">is_transitioning_out()</a>, <a href="#method_ba_Activity__on_expire">on_expire()</a>, <a href="#method_ba_Activity__on_team_join">on_team_join()</a>, <a href="#method_ba_Activity__on_team_leave">on_team_leave()</a>, <a href="#method_ba_Activity__on_transition_out">on_transition_out()</a>, <a href="#method_ba_Activity__remove_player">remove_player()</a>, <a href="#method_ba_Activity__remove_team">remove_team()</a>, <a href="#method_ba_Activity__retain_actor">retain_actor()</a>, <a href="#method_ba_Activity__set_has_ended">set_has_ended()</a>, <a href="#method_ba_Activity__set_immediate_end">set_immediate_end()</a>, <a href="#method_ba_Activity__transition_in">transition_in()</a>, <a href="#method_ba_Activity__transition_out">transition_out()</a></h5> <h5><a href="#method_ba_Activity__add_actor_weak_ref">add_actor_weak_ref()</a>, <a href="#method_ba_Activity__add_player">add_player()</a>, <a href="#method_ba_Activity__add_team">add_team()</a>, <a href="#method_ba_Activity__begin">begin()</a>, <a href="#method_ba_Activity__create_player">create_player()</a>, <a href="#method_ba_Activity__create_team">create_team()</a>, <a href="#method_ba_Activity__dep_is_present">dep_is_present()</a>, <a href="#method_ba_Activity__destroy">destroy()</a>, <a href="#method_ba_Activity__get_dynamic_deps">get_dynamic_deps()</a>, <a href="#method_ba_Activity__has_begun">has_begun()</a>, <a href="#method_ba_Activity__has_ended">has_ended()</a>, <a href="#method_ba_Activity__has_transitioned_in">has_transitioned_in()</a>, <a href="#method_ba_Activity__is_transitioning_out">is_transitioning_out()</a>, <a href="#method_ba_Activity__on_expire">on_expire()</a>, <a href="#method_ba_Activity__on_player_leave">on_player_leave()</a>, <a href="#method_ba_Activity__on_team_join">on_team_join()</a>, <a href="#method_ba_Activity__on_team_leave">on_team_leave()</a>, <a href="#method_ba_Activity__on_transition_out">on_transition_out()</a>, <a href="#method_ba_Activity__remove_player">remove_player()</a>, <a href="#method_ba_Activity__remove_team">remove_team()</a>, <a href="#method_ba_Activity__retain_actor">retain_actor()</a>, <a href="#method_ba_Activity__set_has_ended">set_has_ended()</a>, <a href="#method_ba_Activity__transition_in">transition_in()</a>, <a href="#method_ba_Activity__transition_out">transition_out()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<h5><a href="#method_ba_GameActivity____init__">&lt;constructor&gt;</a>, <a href="#method_ba_GameActivity__continue_or_end_game">continue_or_end_game()</a>, <a href="#method_ba_GameActivity__create_settings_ui">create_settings_ui()</a>, <a href="#method_ba_GameActivity__end">end()</a>, <a href="#method_ba_GameActivity__end_game">end_game()</a>, <a href="#method_ba_GameActivity__get_description">get_description()</a>, <a href="#method_ba_GameActivity__get_description_display_string">get_description_display_string()</a>, <a href="#method_ba_GameActivity__get_display_string">get_display_string()</a>, <a href="#method_ba_GameActivity__get_game_settings">get_game_settings()</a>, <a href="#method_ba_GameActivity__get_instance_description">get_instance_description()</a>, <a href="#method_ba_GameActivity__get_instance_description_short">get_instance_description_short()</a>, <a href="#method_ba_GameActivity__get_instance_display_string">get_instance_display_string()</a>, <a href="#method_ba_GameActivity__get_instance_scoreboard_display_string">get_instance_scoreboard_display_string()</a>, <a href="#method_ba_GameActivity__get_name">get_name()</a>, <a href="#method_ba_GameActivity__get_score_info">get_score_info()</a>, <a href="#method_ba_GameActivity__get_settings_display_string">get_settings_display_string()</a>, <a href="#method_ba_GameActivity__get_supported_maps">get_supported_maps()</a>, <a href="#method_ba_GameActivity__get_team_display_string">get_team_display_string()</a>, <a href="#method_ba_GameActivity__handlemessage">handlemessage()</a>, <a href="#method_ba_GameActivity__is_waiting_for_continue">is_waiting_for_continue()</a>, <a href="#method_ba_GameActivity__on_begin">on_begin()</a>, <a href="#method_ba_GameActivity__on_continue">on_continue()</a>, <a href="#method_ba_GameActivity__on_player_join">on_player_join()</a>, <a href="#method_ba_GameActivity__on_player_leave">on_player_leave()</a>, <a href="#method_ba_GameActivity__on_transition_in">on_transition_in()</a>, <a href="#method_ba_GameActivity__respawn_player">respawn_player()</a>, <a href="#method_ba_GameActivity__setup_standard_powerup_drops">setup_standard_powerup_drops()</a>, <a href="#method_ba_GameActivity__setup_standard_time_limit">setup_standard_time_limit()</a>, <a href="#method_ba_GameActivity__show_zoom_message">show_zoom_message()</a>, <a href="#method_ba_GameActivity__spawn_player">spawn_player()</a>, <a href="#method_ba_GameActivity__spawn_player_if_exists">spawn_player_if_exists()</a>, <a href="#method_ba_GameActivity__spawn_player_spaz">spawn_player_spaz()</a>, <a href="#method_ba_GameActivity__supports_session_type">supports_session_type()</a></h5> <h5><a href="#method_ba_GameActivity____init__">&lt;constructor&gt;</a>, <a href="#method_ba_GameActivity__continue_or_end_game">continue_or_end_game()</a>, <a href="#method_ba_GameActivity__create_settings_ui">create_settings_ui()</a>, <a href="#method_ba_GameActivity__end">end()</a>, <a href="#method_ba_GameActivity__end_game">end_game()</a>, <a href="#method_ba_GameActivity__get_description">get_description()</a>, <a href="#method_ba_GameActivity__get_description_display_string">get_description_display_string()</a>, <a href="#method_ba_GameActivity__get_display_string">get_display_string()</a>, <a href="#method_ba_GameActivity__get_game_settings">get_game_settings()</a>, <a href="#method_ba_GameActivity__get_instance_description">get_instance_description()</a>, <a href="#method_ba_GameActivity__get_instance_description_short">get_instance_description_short()</a>, <a href="#method_ba_GameActivity__get_instance_display_string">get_instance_display_string()</a>, <a href="#method_ba_GameActivity__get_instance_scoreboard_display_string">get_instance_scoreboard_display_string()</a>, <a href="#method_ba_GameActivity__get_name">get_name()</a>, <a href="#method_ba_GameActivity__get_score_info">get_score_info()</a>, <a href="#method_ba_GameActivity__get_settings_display_string">get_settings_display_string()</a>, <a href="#method_ba_GameActivity__get_supported_maps">get_supported_maps()</a>, <a href="#method_ba_GameActivity__get_team_display_string">get_team_display_string()</a>, <a href="#method_ba_GameActivity__handlemessage">handlemessage()</a>, <a href="#method_ba_GameActivity__is_waiting_for_continue">is_waiting_for_continue()</a>, <a href="#method_ba_GameActivity__on_begin">on_begin()</a>, <a href="#method_ba_GameActivity__on_continue">on_continue()</a>, <a href="#method_ba_GameActivity__on_player_join">on_player_join()</a>, <a href="#method_ba_GameActivity__on_transition_in">on_transition_in()</a>, <a href="#method_ba_GameActivity__respawn_player">respawn_player()</a>, <a href="#method_ba_GameActivity__setup_standard_powerup_drops">setup_standard_powerup_drops()</a>, <a href="#method_ba_GameActivity__setup_standard_time_limit">setup_standard_time_limit()</a>, <a href="#method_ba_GameActivity__show_zoom_message">show_zoom_message()</a>, <a href="#method_ba_GameActivity__spawn_player">spawn_player()</a>, <a href="#method_ba_GameActivity__spawn_player_if_exists">spawn_player_if_exists()</a>, <a href="#method_ba_GameActivity__spawn_player_spaz">spawn_player_spaz()</a>, <a href="#method_ba_GameActivity__supports_session_type">supports_session_type()</a></h5>
<dl> <dl>
<dt><h4><a name="method_ba_GameActivity____init__">&lt;constructor&gt;</a></dt></h4><dd> <dt><h4><a name="method_ba_GameActivity____init__">&lt;constructor&gt;</a></dt></h4><dd>
<p><span>ba.GameActivity(settings: Dict[str, Any])</span></p> <p><span>ba.GameActivity(settings: Dict[str, Any])</span></p>
@ -2479,12 +2477,6 @@ whatever is relevant to keep the game going.</p>
<p>(including the initial set of Players)</p> <p>(including the initial set of Players)</p>
</dd>
<dt><h4><a name="method_ba_GameActivity__on_player_leave">on_player_leave()</a></dt></h4><dd>
<p><span>on_player_leave(self, player: PlayerType) -&gt; None</span></p>
<p>Called when a <a href="#class_ba_Player">ba.Player</a> is leaving the Activity.</p>
</dd> </dd>
<dt><h4><a name="method_ba_GameActivity__on_transition_in">on_transition_in()</a></dt></h4><dd> <dt><h4><a name="method_ba_GameActivity__on_transition_in">on_transition_in()</a></dt></h4><dd>
<p><span>on_transition_in(self) -&gt; None</span></p> <p><span>on_transition_in(self) -&gt; None</span></p>
@ -3375,7 +3367,7 @@ Use <a href="#function_ba_getmodel">ba.getmodel</a>() to instantiate one.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_Session__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_Session__end">end()</a>, <a href="#method_ba_Session__end_activity">end_activity()</a>, <a href="#method_ba_Session__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_Session__getactivity">getactivity()</a>, <a href="#method_ba_Session__handlemessage">handlemessage()</a>, <a href="#method_ba_Session__launch_end_session_activity">launch_end_session_activity()</a>, <a href="#method_ba_Session__on_player_leave">on_player_leave()</a>, <a href="#method_ba_Session__on_player_request">on_player_request()</a>, <a href="#method_ba_Session__on_team_leave">on_team_leave()</a>, <a href="#method_ba_Session__set_activity">set_activity()</a>, <a href="#method_ba_Session__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5> <h5><a href="#method_ba_Session__begin_next_activity">begin_next_activity()</a>, <a href="#method_ba_Session__end">end()</a>, <a href="#method_ba_Session__end_activity">end_activity()</a>, <a href="#method_ba_Session__get_custom_menu_entries">get_custom_menu_entries()</a>, <a href="#method_ba_Session__getactivity">getactivity()</a>, <a href="#method_ba_Session__handlemessage">handlemessage()</a>, <a href="#method_ba_Session__on_player_leave">on_player_leave()</a>, <a href="#method_ba_Session__on_player_request">on_player_request()</a>, <a href="#method_ba_Session__on_team_leave">on_team_leave()</a>, <a href="#method_ba_Session__set_activity">set_activity()</a>, <a href="#method_ba_Session__transitioning_out_activity_was_freed">transitioning_out_activity_was_freed()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<h5><a href="#method_ba_MultiTeamSession____init__">&lt;constructor&gt;</a>, <a href="#method_ba_MultiTeamSession__announce_game_results">announce_game_results()</a>, <a href="#method_ba_MultiTeamSession__get_ffa_series_length">get_ffa_series_length()</a>, <a href="#method_ba_MultiTeamSession__get_game_number">get_game_number()</a>, <a href="#method_ba_MultiTeamSession__get_max_players">get_max_players()</a>, <a href="#method_ba_MultiTeamSession__get_next_game_description">get_next_game_description()</a>, <a href="#method_ba_MultiTeamSession__get_series_length">get_series_length()</a>, <a href="#method_ba_MultiTeamSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_MultiTeamSession__on_team_join">on_team_join()</a></h5> <h5><a href="#method_ba_MultiTeamSession____init__">&lt;constructor&gt;</a>, <a href="#method_ba_MultiTeamSession__announce_game_results">announce_game_results()</a>, <a href="#method_ba_MultiTeamSession__get_ffa_series_length">get_ffa_series_length()</a>, <a href="#method_ba_MultiTeamSession__get_game_number">get_game_number()</a>, <a href="#method_ba_MultiTeamSession__get_max_players">get_max_players()</a>, <a href="#method_ba_MultiTeamSession__get_next_game_description">get_next_game_description()</a>, <a href="#method_ba_MultiTeamSession__get_series_length">get_series_length()</a>, <a href="#method_ba_MultiTeamSession__on_activity_end">on_activity_end()</a>, <a href="#method_ba_MultiTeamSession__on_team_join">on_team_join()</a></h5>
<dl> <dl>
@ -3882,7 +3874,7 @@ even if myactor is set to None.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods:</h3> <h3>Methods:</h3>
<h5><a href="#method_ba_Player__assign_input_call">assign_input_call()</a>, <a href="#method_ba_Player__exists">exists()</a>, <a href="#method_ba_Player__get_icon">get_icon()</a>, <a href="#method_ba_Player__get_name">get_name()</a>, <a href="#method_ba_Player__is_alive">is_alive()</a>, <a href="#method_ba_Player__reset_input">reset_input()</a>, <a href="#method_ba_Player__set_actor">set_actor()</a></h5> <h5><a href="#method_ba_Player__assign_input_call">assign_input_call()</a>, <a href="#method_ba_Player__exists">exists()</a>, <a href="#method_ba_Player__get_icon">get_icon()</a>, <a href="#method_ba_Player__get_name">get_name()</a>, <a href="#method_ba_Player__is_alive">is_alive()</a>, <a href="#method_ba_Player__reset_input">reset_input()</a></h5>
<dl> <dl>
<dt><h4><a name="method_ba_Player__assign_input_call">assign_input_call()</a></dt></h4><dd> <dt><h4><a name="method_ba_Player__assign_input_call">assign_input_call()</a></dt></h4><dd>
<p><span>assign_input_call(self, inputtype: Union[str, Tuple[str, ...]], call: Callable) -&gt; None</span></p> <p><span>assign_input_call(self, inputtype: Union[str, Tuple[str, ...]], call: Callable) -&gt; None</span></p>
@ -3943,14 +3935,6 @@ is_alive() method return True. False is returned otherwise.</p>
<p>Clears out the player's assigned input actions.</p> <p>Clears out the player's assigned input actions.</p>
</dd>
<dt><h4><a name="method_ba_Player__set_actor">set_actor()</a></dt></h4><dd>
<p><span>set_actor(self, actor: Optional[<a href="#class_ba_Actor">ba.Actor</a>]) -&gt; None</span></p>
<p>set_actor(actor: Optional[<a href="#class_ba_Actor">ba.Actor</a>]) -&gt; None</p>
<p>Set the player's associated <a href="#class_ba_Actor">ba.Actor</a>.</p>
</dd> </dd>
</dl> </dl>
<hr> <hr>
@ -5077,7 +5061,7 @@ of the session.</p>
</dd> </dd>
</dl> </dl>
<h3>Methods Inherited:</h3> <h3>Methods Inherited:</h3>
<h5><a href="#method_ba_GameActivity__add_actor_weak_ref">add_actor_weak_ref()</a>, <a href="#method_ba_GameActivity__add_player">add_player()</a>, <a href="#method_ba_GameActivity__add_team">add_team()</a>, <a href="#method_ba_GameActivity__begin">begin()</a>, <a href="#method_ba_GameActivity__continue_or_end_game">continue_or_end_game()</a>, <a href="#method_ba_GameActivity__create_player">create_player()</a>, <a href="#method_ba_GameActivity__create_settings_ui">create_settings_ui()</a>, <a href="#method_ba_GameActivity__create_team">create_team()</a>, <a href="#method_ba_GameActivity__dep_is_present">dep_is_present()</a>, <a href="#method_ba_GameActivity__destroy">destroy()</a>, <a href="#method_ba_GameActivity__end_game">end_game()</a>, <a href="#method_ba_GameActivity__get_description">get_description()</a>, <a href="#method_ba_GameActivity__get_description_display_string">get_description_display_string()</a>, <a href="#method_ba_GameActivity__get_display_string">get_display_string()</a>, <a href="#method_ba_GameActivity__get_dynamic_deps">get_dynamic_deps()</a>, <a href="#method_ba_GameActivity__get_game_settings">get_game_settings()</a>, <a href="#method_ba_GameActivity__get_instance_description">get_instance_description()</a>, <a href="#method_ba_GameActivity__get_instance_description_short">get_instance_description_short()</a>, <a href="#method_ba_GameActivity__get_instance_display_string">get_instance_display_string()</a>, <a href="#method_ba_GameActivity__get_instance_scoreboard_display_string">get_instance_scoreboard_display_string()</a>, <a href="#method_ba_GameActivity__get_name">get_name()</a>, <a href="#method_ba_GameActivity__get_score_info">get_score_info()</a>, <a href="#method_ba_GameActivity__get_settings_display_string">get_settings_display_string()</a>, <a href="#method_ba_GameActivity__get_supported_maps">get_supported_maps()</a>, <a href="#method_ba_GameActivity__get_team_display_string">get_team_display_string()</a>, <a href="#method_ba_GameActivity__handlemessage">handlemessage()</a>, <a href="#method_ba_GameActivity__has_begun">has_begun()</a>, <a href="#method_ba_GameActivity__has_ended">has_ended()</a>, <a href="#method_ba_GameActivity__has_transitioned_in">has_transitioned_in()</a>, <a href="#method_ba_GameActivity__is_transitioning_out">is_transitioning_out()</a>, <a href="#method_ba_GameActivity__is_waiting_for_continue">is_waiting_for_continue()</a>, <a href="#method_ba_GameActivity__on_continue">on_continue()</a>, <a href="#method_ba_GameActivity__on_expire">on_expire()</a>, <a href="#method_ba_GameActivity__on_player_join">on_player_join()</a>, <a href="#method_ba_GameActivity__on_player_leave">on_player_leave()</a>, <a href="#method_ba_GameActivity__on_team_join">on_team_join()</a>, <a href="#method_ba_GameActivity__on_team_leave">on_team_leave()</a>, <a href="#method_ba_GameActivity__on_transition_out">on_transition_out()</a>, <a href="#method_ba_GameActivity__remove_player">remove_player()</a>, <a href="#method_ba_GameActivity__remove_team">remove_team()</a>, <a href="#method_ba_GameActivity__respawn_player">respawn_player()</a>, <a href="#method_ba_GameActivity__retain_actor">retain_actor()</a>, <a href="#method_ba_GameActivity__set_has_ended">set_has_ended()</a>, <a href="#method_ba_GameActivity__set_immediate_end">set_immediate_end()</a>, <a href="#method_ba_GameActivity__setup_standard_powerup_drops">setup_standard_powerup_drops()</a>, <a href="#method_ba_GameActivity__setup_standard_time_limit">setup_standard_time_limit()</a>, <a href="#method_ba_GameActivity__show_zoom_message">show_zoom_message()</a>, <a href="#method_ba_GameActivity__spawn_player">spawn_player()</a>, <a href="#method_ba_GameActivity__spawn_player_if_exists">spawn_player_if_exists()</a>, <a href="#method_ba_GameActivity__transition_in">transition_in()</a>, <a href="#method_ba_GameActivity__transition_out">transition_out()</a></h5> <h5><a href="#method_ba_GameActivity__add_actor_weak_ref">add_actor_weak_ref()</a>, <a href="#method_ba_GameActivity__add_player">add_player()</a>, <a href="#method_ba_GameActivity__add_team">add_team()</a>, <a href="#method_ba_GameActivity__begin">begin()</a>, <a href="#method_ba_GameActivity__continue_or_end_game">continue_or_end_game()</a>, <a href="#method_ba_GameActivity__create_player">create_player()</a>, <a href="#method_ba_GameActivity__create_settings_ui">create_settings_ui()</a>, <a href="#method_ba_GameActivity__create_team">create_team()</a>, <a href="#method_ba_GameActivity__dep_is_present">dep_is_present()</a>, <a href="#method_ba_GameActivity__destroy">destroy()</a>, <a href="#method_ba_GameActivity__end_game">end_game()</a>, <a href="#method_ba_GameActivity__get_description">get_description()</a>, <a href="#method_ba_GameActivity__get_description_display_string">get_description_display_string()</a>, <a href="#method_ba_GameActivity__get_display_string">get_display_string()</a>, <a href="#method_ba_GameActivity__get_dynamic_deps">get_dynamic_deps()</a>, <a href="#method_ba_GameActivity__get_game_settings">get_game_settings()</a>, <a href="#method_ba_GameActivity__get_instance_description">get_instance_description()</a>, <a href="#method_ba_GameActivity__get_instance_description_short">get_instance_description_short()</a>, <a href="#method_ba_GameActivity__get_instance_display_string">get_instance_display_string()</a>, <a href="#method_ba_GameActivity__get_instance_scoreboard_display_string">get_instance_scoreboard_display_string()</a>, <a href="#method_ba_GameActivity__get_name">get_name()</a>, <a href="#method_ba_GameActivity__get_score_info">get_score_info()</a>, <a href="#method_ba_GameActivity__get_settings_display_string">get_settings_display_string()</a>, <a href="#method_ba_GameActivity__get_supported_maps">get_supported_maps()</a>, <a href="#method_ba_GameActivity__get_team_display_string">get_team_display_string()</a>, <a href="#method_ba_GameActivity__handlemessage">handlemessage()</a>, <a href="#method_ba_GameActivity__has_begun">has_begun()</a>, <a href="#method_ba_GameActivity__has_ended">has_ended()</a>, <a href="#method_ba_GameActivity__has_transitioned_in">has_transitioned_in()</a>, <a href="#method_ba_GameActivity__is_transitioning_out">is_transitioning_out()</a>, <a href="#method_ba_GameActivity__is_waiting_for_continue">is_waiting_for_continue()</a>, <a href="#method_ba_GameActivity__on_continue">on_continue()</a>, <a href="#method_ba_GameActivity__on_expire">on_expire()</a>, <a href="#method_ba_GameActivity__on_player_join">on_player_join()</a>, <a href="#method_ba_GameActivity__on_player_leave">on_player_leave()</a>, <a href="#method_ba_GameActivity__on_team_join">on_team_join()</a>, <a href="#method_ba_GameActivity__on_team_leave">on_team_leave()</a>, <a href="#method_ba_GameActivity__on_transition_out">on_transition_out()</a>, <a href="#method_ba_GameActivity__remove_player">remove_player()</a>, <a href="#method_ba_GameActivity__remove_team">remove_team()</a>, <a href="#method_ba_GameActivity__respawn_player">respawn_player()</a>, <a href="#method_ba_GameActivity__retain_actor">retain_actor()</a>, <a href="#method_ba_GameActivity__set_has_ended">set_has_ended()</a>, <a href="#method_ba_GameActivity__setup_standard_powerup_drops">setup_standard_powerup_drops()</a>, <a href="#method_ba_GameActivity__setup_standard_time_limit">setup_standard_time_limit()</a>, <a href="#method_ba_GameActivity__show_zoom_message">show_zoom_message()</a>, <a href="#method_ba_GameActivity__spawn_player">spawn_player()</a>, <a href="#method_ba_GameActivity__spawn_player_if_exists">spawn_player_if_exists()</a>, <a href="#method_ba_GameActivity__transition_in">transition_in()</a>, <a href="#method_ba_GameActivity__transition_out">transition_out()</a></h5>
<h3>Methods Defined or Overridden:</h3> <h3>Methods Defined or Overridden:</h3>
<h5><a href="#method_ba_TeamGameActivity____init__">&lt;constructor&gt;</a>, <a href="#method_ba_TeamGameActivity__end">end()</a>, <a href="#method_ba_TeamGameActivity__on_begin">on_begin()</a>, <a href="#method_ba_TeamGameActivity__on_transition_in">on_transition_in()</a>, <a href="#method_ba_TeamGameActivity__spawn_player_spaz">spawn_player_spaz()</a>, <a href="#method_ba_TeamGameActivity__supports_session_type">supports_session_type()</a></h5> <h5><a href="#method_ba_TeamGameActivity____init__">&lt;constructor&gt;</a>, <a href="#method_ba_TeamGameActivity__end">end()</a>, <a href="#method_ba_TeamGameActivity__on_begin">on_begin()</a>, <a href="#method_ba_TeamGameActivity__on_transition_in">on_transition_in()</a>, <a href="#method_ba_TeamGameActivity__spawn_player_spaz">spawn_player_spaz()</a>, <a href="#method_ba_TeamGameActivity__supports_session_type">supports_session_type()</a></h5>
<dl> <dl>
@ -6161,28 +6145,6 @@ object dies. 'owner' can be another node or a <a href="#class_ba_Actor">ba.Actor
<p>Open the provided url in a web-browser, or display the URL <p>Open the provided url in a web-browser, or display the URL
string in a window if that isn't possible.</p> string in a window if that isn't possible.</p>
<hr>
<h2><strong><a name="function_ba_playercast">ba.playercast()</a></strong></h3>
<p><span>playercast(totype: Type[PlayerType], player: <a href="#class_ba_Player">ba.Player</a>) -&gt; PlayerType</span></p>
<p>Cast a <a href="#class_ba_Player">ba.Player</a> to a specific <a href="#class_ba_Player">ba.Player</a> subclass.</p>
<p>Category: <a href="#function_category_Gameplay_Functions">Gameplay Functions</a></p>
<p>When writing type-checked code, sometimes code will deal with raw
<a href="#class_ba_Player">ba.Player</a> objects which need to be cast back to the game's actual
player type so that access can be properly type-checked. This function
is a safe way to do so. It ensures that Optional values are not cast
into Non-Optional, etc.</p>
<hr>
<h2><strong><a name="function_ba_playercast_o">ba.playercast_o()</a></strong></h3>
<p><span>playercast_o(totype: Type[PlayerType], player: Optional[<a href="#class_ba_Player">ba.Player</a>]) -&gt; Optional[PlayerType]</span></p>
<p>A variant of <a href="#function_ba_playercast">ba.playercast</a>() for use with optional <a href="#class_ba_Player">ba.Player</a> values.</p>
<p>Category: <a href="#function_category_Gameplay_Functions">Gameplay Functions</a></p>
<hr> <hr>
<h2><strong><a name="function_ba_playsound">ba.playsound()</a></strong></h3> <h2><strong><a name="function_ba_playsound">ba.playsound()</a></strong></h3>
<p><span>playsound(sound: Sound, volume: float = 1.0, <p><span>playsound(sound: Sound, volume: float = 1.0,