diff --git a/.efrocachemap b/.efrocachemap index ed3f1d9d..837369e8 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4132,16 +4132,16 @@ "assets/build/windows/x64/python.exe": "https://files.ballistica.net/cache/ba1/25/a7/dc87c1be41605eb6fefd0145144c", "assets/build/windows/x64/python37.dll": "https://files.ballistica.net/cache/ba1/b9/e4/d912f56e42e9991bcbb4c804cfcb", "assets/build/windows/x64/pythonw.exe": "https://files.ballistica.net/cache/ba1/6c/bb/b6f52c306aa4e88061510e96cefe", - "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f0/6c/17cfdbdfeac96070b5134251a451", - "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/94/a8/e1477ff611c1e1a5a625bffff60c", - "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/ed/2b/0f91bf6faf8efd08890a687d48d7", - "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/9e/df/8560a3f6a5394d6e1e4eff3c4225", - "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/85/9a/d64a09c882fe8ddd061d37547ea3", - "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/33/00/49adaf80c83df4d6d806691676c0", - "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5e/e3/4a2fd651c619449b0ac47580b442" + "build/prefab/linux-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/36/5a/025457e87759c13a5067617816cd", + "build/prefab/linux-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/66/49/fb5663472ab1f4bd32f5748ba4d7", + "build/prefab/linux/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/44/3e/6eb652f11d24c22f87ae8aab399b", + "build/prefab/linux/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/57/7e48692454b644a7111902f12b58", + "build/prefab/mac-server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/18/55/246021de09b021993e8bdbdb19a6", + "build/prefab/mac-server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3f/ea/079aa2649359d2024b7c20dd19d0", + "build/prefab/mac/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/05/5d/2608f732d75799cfe09c6947736a", + "build/prefab/mac/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ef/20/4f2abb279d24dced1f11f83fbe78", + "build/prefab/windows-server/debug/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/f9/36/28081d9962d3f91c286663357e80", + "build/prefab/windows-server/release/dist/ballisticacore_headless.exe": "https://files.ballistica.net/cache/ba1/51/55/83ceb6ffb806c75815e5f9e88008", + "build/prefab/windows/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/46/ea/461f76e113d3a02da3c61ea04bdb", + "build/prefab/windows/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/83/af/a8ce32760e4dc300ac861f745615" } \ No newline at end of file diff --git a/assets/src/ba_data/python/_ba.py b/assets/src/ba_data/python/_ba.py index 4afc871e..8471f307 100644 --- a/assets/src/ba_data/python/_ba.py +++ b/assets/src/ba_data/python/_ba.py @@ -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) -# SOURCES_HASH=34814525496434113316994893689868607574 +# SOURCES_HASH=33373537027192610824913965080968605548 # I'm sorry Pylint. I know this file saddens you. Be strong. # pylint: disable=useless-suppression @@ -727,13 +727,6 @@ class Node: """ return bool() - def get_name(self) -> str: - """get_name() -> str - - Return the name assigned to a Node; used mainly for debugging - """ - return str() - # Show that ur return type varies based on "doraise" value: @overload def getdelegate(self, @@ -756,6 +749,13 @@ class Node: """ return None + def getname(self) -> str: + """getname() -> str + + Return the name assigned to a Node; used mainly for debugging + """ + return str() + def getnodetype(self) -> str: """getnodetype() -> str @@ -915,8 +915,8 @@ class SessionPlayer: """ return {'foo': 'bar'} - def get_name(self, full: bool = False, icon: bool = True) -> str: - """get_name(full: bool = False, icon: bool = True) -> str + def getname(self, full: bool = False, icon: bool = True) -> str: + """getname(full: bool = False, icon: bool = True) -> str Returns the player's name. If icon is True, the long version of the name may include an icon. diff --git a/assets/src/ba_data/python/ba/_activity.py b/assets/src/ba_data/python/ba/_activity.py index 95a1ae80..ff9203c0 100644 --- a/assets/src/ba_data/python/ba/_activity.py +++ b/assets/src/ba_data/python/ba/_activity.py @@ -282,20 +282,6 @@ class Activity(DependencyComponent, Generic[PlayerType, TeamType]): """(internal)""" self._has_ended = val - # def set_immediate_end(self, results: ba.TeamGameResults, delay: float, - # force: bool) -> None: - # """Set the activity to die immediately after beginning. - - # (internal) - # """ - # if self.has_begun(): - # raise RuntimeError('This should only be called for Activities' - # 'that have not yet begun.') - # if not self._should_end_immediately or force: - # self._should_end_immediately = True - # self._should_end_immediately_results = results - # self._should_end_immediately_delay = delay - def destroy(self) -> None: """Begin the process of tearing down the activity. diff --git a/assets/src/ba_data/python/ba/_analytics.py b/assets/src/ba_data/python/ba/_analytics.py index 948629e0..8448c963 100644 --- a/assets/src/ba_data/python/ba/_analytics.py +++ b/assets/src/ba_data/python/ba/_analytics.py @@ -62,7 +62,7 @@ def game_begin_analytics() -> None: _ba.increment_analytics_count('Co-op round start 4+ human players') elif isinstance(session, DualTeamSession): - _ba.set_analytics_screen('Teams Game: ' + activity.get_name()) + _ba.set_analytics_screen('Teams Game: ' + activity.getname()) _ba.increment_analytics_count('Teams round start') if len(activity.players) == 1: _ba.increment_analytics_count('Teams round start 1 human player') @@ -74,7 +74,7 @@ def game_begin_analytics() -> None: _ba.increment_analytics_count('Teams round start 8+ human players') elif isinstance(session, FreeForAllSession): - _ba.set_analytics_screen('FreeForAll Game: ' + activity.get_name()) + _ba.set_analytics_screen('FreeForAll Game: ' + activity.getname()) _ba.increment_analytics_count('Free-for-all round start') if len(activity.players) == 1: _ba.increment_analytics_count( diff --git a/assets/src/ba_data/python/ba/_gameactivity.py b/assets/src/ba_data/python/ba/_gameactivity.py index 1fdd940f..099ca094 100644 --- a/assets/src/ba_data/python/ba/_gameactivity.py +++ b/assets/src/ba_data/python/ba/_gameactivity.py @@ -56,7 +56,7 @@ class GameActivity(Activity[PlayerType, TeamType]): tips: List[Union[str, Dict[str, Any]]] = [] - # Default get_name() will return this if not None. + # Default getname() will return this if not None. name: Optional[str] = None # Default get_description() will return this if not None. @@ -112,7 +112,7 @@ class GameActivity(Activity[PlayerType, TeamType]): return cls.score_info if cls.score_info is not None else ScoreInfo() @classmethod - def get_name(cls) -> str: + def getname(cls) -> str: """Return a str name for this game type. This default implementation simply returns the 'name' class attr. @@ -123,9 +123,9 @@ class GameActivity(Activity[PlayerType, TeamType]): def get_display_string(cls, settings: Optional[Dict] = None) -> ba.Lstr: """Return a descriptive name for this game/settings combo. - Subclasses should override get_name(); not this. + Subclasses should override getname(); not this. """ - name = Lstr(translate=('gameNames', cls.get_name())) + name = Lstr(translate=('gameNames', cls.getname())) # A few substitutions for 'Epic', 'Solo' etc. modes. # FIXME: Should provide a way for game types to define filters of @@ -512,7 +512,7 @@ class GameActivity(Activity[PlayerType, TeamType]): # Store some basic info about players present at start time. self.initial_player_info = [ - PlayerInfo(name=p.get_name(full=True), character=p.character) + PlayerInfo(name=p.getname(full=True), character=p.character) for p in self.players ] @@ -924,7 +924,7 @@ class GameActivity(Activity[PlayerType, TeamType]): from ba._gameutils import animate from ba._coopsession import CoopSession from bastd.actor.playerspaz import PlayerSpaz - name = player.get_name() + name = player.getname() color = player.color highlight = player.highlight @@ -941,7 +941,7 @@ class GameActivity(Activity[PlayerType, TeamType]): # If this is co-op and we're on Courtyard or Runaround, add the # material that allows us to collide with the player-walls. # FIXME: Need to generalize this. - if isinstance(self.session, CoopSession) and self.map.get_name() in [ + if isinstance(self.session, CoopSession) and self.map.getname() in [ 'Courtyard', 'Tower D' ]: mat = self.map.preloaddata['collide_with_wall_material'] diff --git a/assets/src/ba_data/python/ba/_input.py b/assets/src/ba_data/python/ba/_input.py index b4d87cec..403e0a13 100644 --- a/assets/src/ba_data/python/ba/_input.py +++ b/assets/src/ba_data/python/ba/_input.py @@ -45,11 +45,11 @@ def get_device_value(device: ba.InputDevice, name: str) -> Any: useragentstring = app.user_agent_string platform = app.platform subplatform = app.subplatform - bs_config = _ba.app.config + appconfig = _ba.app.config # If there's an entry in our config for this controller, use it. - if 'Controllers' in bs_config: - ccfgs = bs_config['Controllers'] + if 'Controllers' in appconfig: + ccfgs = appconfig['Controllers'] if devicename in ccfgs: mapping = None if unique_id in ccfgs[devicename]: @@ -621,15 +621,15 @@ def get_last_player_name_from_input_device(device: ba.InputDevice) -> str: (generally the last one used there) """ - bs_config = _ba.app.config + appconfig = _ba.app.config # Look for a default player profile name for them; # otherwise default to their current random name. profilename = '_random' key_name = device.name + ' ' + device.unique_identifier - if ('Default Player Profiles' in bs_config - and key_name in bs_config['Default Player Profiles']): - profilename = bs_config['Default Player Profiles'][key_name] + if ('Default Player Profiles' in appconfig + and key_name in appconfig['Default Player Profiles']): + profilename = appconfig['Default Player Profiles'][key_name] if profilename == '_random': profilename = device.get_default_player_name() if profilename == '__account__': diff --git a/assets/src/ba_data/python/ba/_lobby.py b/assets/src/ba_data/python/ba/_lobby.py index 8d4716fe..efd5b084 100644 --- a/assets/src/ba_data/python/ba/_lobby.py +++ b/assets/src/ba_data/python/ba/_lobby.py @@ -455,7 +455,7 @@ class Chooser: def _do_nothing(self) -> None: """Does nothing! (hacky way to disable callbacks)""" - def _get_name(self, full: bool = False) -> str: + def _getname(self, full: bool = False) -> str: name_raw = name = self._profilenames[self._profileindex] clamp = False if name == '_random': @@ -569,8 +569,8 @@ class Chooser: _ba.app.config.commit() # Set this player's short and full name. - self._player.set_name(self._get_name(), - self._get_name(full=True), + self._player.set_name(self._getname(), + self._getname(full=True), real=True) self._ready = True self._update_text() @@ -685,12 +685,12 @@ class Chooser: # Once we're ready, we've saved the name, so lets ask the system # for it so we get appended numbers and stuff. - text = Lstr(value=self._player.get_name(full=True)) + text = Lstr(value=self._player.getname(full=True)) text = Lstr(value='${A} (${B})', subs=[('${A}', text), ('${B}', Lstr(resource='readyText'))]) else: - text = Lstr(value=self._get_name(full=True)) + text = Lstr(value=self._getname(full=True)) can_switch_teams = len(self.lobby.teams) > 1 diff --git a/assets/src/ba_data/python/ba/_map.py b/assets/src/ba_data/python/ba/_map.py index ead68a99..005c236f 100644 --- a/assets/src/ba_data/python/ba/_map.py +++ b/assets/src/ba_data/python/ba/_map.py @@ -192,7 +192,7 @@ class Map(Actor): return None @classmethod - def get_name(cls) -> str: + def getname(cls) -> str: """Return the unique name of this map, in English.""" return cls.name @@ -231,14 +231,14 @@ class Map(Actor): # Set area-of-interest bounds. aoi_bounds = self.get_def_bound_box('area_of_interest_bounds') if aoi_bounds is None: - print('WARNING: no "aoi_bounds" found for map:', self.get_name()) + print('WARNING: no "aoi_bounds" found for map:', self.getname()) aoi_bounds = (-1, -1, -1, 1, 1, 1) gnode.area_of_interest_bounds = aoi_bounds # Set map bounds. map_bounds = self.get_def_bound_box('map_bounds') if map_bounds is None: - print('WARNING: no "map_bounds" found for map:', self.get_name()) + print('WARNING: no "map_bounds" found for map:', self.getname()) map_bounds = (-30, -10, -30, 30, 100, 30) _ba.set_map_bounds(map_bounds) diff --git a/assets/src/ba_data/python/ba/_player.py b/assets/src/ba_data/python/ba/_player.py index ecc27b4d..a688deae 100644 --- a/assets/src/ba_data/python/ba/_player.py +++ b/assets/src/ba_data/python/ba/_player.py @@ -167,13 +167,13 @@ class Player(Generic[TeamType]): """ return self._sessionplayer.exists() - def get_name(self, full: bool = False, icon: bool = True) -> str: - """get_name(full: bool = False, icon: bool = True) -> str + def getname(self, full: bool = False, icon: bool = True) -> str: + """getname(full: bool = False, icon: bool = True) -> str Returns the player's name. If icon is True, the long version of the name may include an icon. """ - return self._sessionplayer.get_name(full=full, icon=icon) + return self._sessionplayer.getname(full=full, icon=icon) def is_alive(self) -> bool: """is_alive() -> bool diff --git a/assets/src/ba_data/python/ba/_profile.py b/assets/src/ba_data/python/ba/_profile.py index 86fa1c56..8448baae 100644 --- a/assets/src/ba_data/python/ba/_profile.py +++ b/assets/src/ba_data/python/ba/_profile.py @@ -50,15 +50,15 @@ def get_player_profile_icon(profilename: str) -> str: """ from ba._enums import SpecialChar - bs_config = _ba.app.config + appconfig = _ba.app.config icon: str try: - is_global = bs_config['Player Profiles'][profilename]['global'] + is_global = appconfig['Player Profiles'][profilename]['global'] except KeyError: is_global = False if is_global: try: - icon = bs_config['Player Profiles'][profilename]['icon'] + icon = appconfig['Player Profiles'][profilename]['icon'] except KeyError: icon = _ba.charstr(SpecialChar.LOGO) else: @@ -71,9 +71,9 @@ def get_player_profile_colors( profiles: Dict[str, Dict[str, Any]] = None ) -> Tuple[Tuple[float, float, float], Tuple[float, float, float]]: """Given a profile, return colors for them.""" - bs_config = _ba.app.config + appconfig = _ba.app.config if profiles is None: - profiles = bs_config['Player Profiles'] + profiles = appconfig['Player Profiles'] # Special case: when being asked for a random color in kiosk mode, # always return default purple. diff --git a/assets/src/ba_data/python/ba/_session.py b/assets/src/ba_data/python/ba/_session.py index 61154cca..e454dc62 100644 --- a/assets/src/ba_data/python/ba/_session.py +++ b/assets/src/ba_data/python/ba/_session.py @@ -238,7 +238,6 @@ class Session: def on_player_leave(self, sessionplayer: ba.SessionPlayer) -> None: """Called when a previously-accepted ba.SessionPlayer leaves.""" - # pylint: disable=too-many-branches if sessionplayer not in self.players: print('ERROR: Session.on_player_leave called' @@ -250,7 +249,8 @@ class Session: activity = self._activity_weak() if not sessionplayer.in_game: - # Ok, the player's still in the lobby. Simply remove them from it. + + # Ok, the player is still in the lobby; simply remove them. with _ba.Context(self): try: self.lobby.remove_chooser(sessionplayer) @@ -261,11 +261,10 @@ class Session: # teams/activities/etc. sessionteam = sessionplayer.team assert sessionteam is not None - assert sessionplayer in sessionteam.players _ba.screenmessage( Lstr(resource='playerLeftText', - subs=[('${PLAYER}', sessionplayer.get_name(full=True))])) + subs=[('${PLAYER}', sessionplayer.getname(full=True))])) # Remove them from their SessionTeam. if sessionplayer in sessionteam.players: @@ -287,38 +286,42 @@ class Session: # If we're a non-team session, remove their team too. if not self.use_teams: - - # They should have been the only one on their team. - assert not sessionteam.players - - # Remove their Team from the Activity. - if activity is not None: - if sessionteam.gameteam in activity.teams: - activity.remove_team(sessionteam) - else: - print('Team not found in Activity in on_player_leave.') - - # And then from the Session. - with _ba.Context(self): - if sessionteam in self.teams: - try: - self.teams.remove(sessionteam) - self.on_team_leave(sessionteam) - except Exception: - print_exception( - f'Error in on_team_leave for Session {self}.') - else: - print('Team no in Session teams in on_player_leave.') - try: - sessionteam.reset_sessiondata() - except Exception: - print_exception( - f'Error clearing sessiondata' - f' for team {sessionteam} in session {self}.') + self._remove_player_team(sessionteam, activity) # Now remove them from the session list. self.players.remove(sessionplayer) + def _remove_player_team(self, sessionteam: ba.SessionTeam, + activity: Optional[ba.Activity]) -> None: + """Remove the player-specific team in non-teams mode.""" + + # They should have been the only one on their team. + assert not sessionteam.players + + # Remove their Team from the Activity. + if activity is not None: + if sessionteam.gameteam in activity.teams: + activity.remove_team(sessionteam) + else: + print('Team not found in Activity in on_player_leave.') + + # And then from the Session. + with _ba.Context(self): + if sessionteam in self.teams: + try: + self.teams.remove(sessionteam) + self.on_team_leave(sessionteam) + except Exception: + print_exception( + f'Error in on_team_leave for Session {self}.') + else: + print('Team no in Session teams in on_player_leave.') + try: + sessionteam.reset_sessiondata() + except Exception: + print_exception(f'Error clearing sessiondata' + f' for team {sessionteam} in session {self}.') + def end(self) -> None: """Initiates an end to the session and a return to the main menu. @@ -408,6 +411,15 @@ class Session: return UNHANDLED + class _SetActivityLock: + + def __init__(self, session: ba.Session) -> None: + self._session = session + self._session._in_set_activity = True + + def __del__(self) -> None: + self._session._in_set_activity = False + def set_activity(self, activity: ba.Activity) -> None: """Assign a new current ba.Activity for the session. @@ -420,8 +432,7 @@ class Session: # Sanity test: make sure this doesn't get called recursively. if self._in_set_activity: - raise RuntimeError( - 'Session.set_activity() cannot be called recursively.') + raise RuntimeError('Session.set_activity() called recursively.') self._in_set_activity = True if activity.session is not _ba.getsession(): @@ -432,7 +443,7 @@ class Session: return if activity is self._activity_retained: - print_error('activity set to already-current activity') + print_error('Activity set to already-current activity.') return if self._next_activity is not None: @@ -640,7 +651,7 @@ class Session: _ba.screenmessage( Lstr(resource='playerDelayedJoinText', subs=[('${PLAYER}', - sessionplayer.get_name(full=True))]), + sessionplayer.getname(full=True))]), color=(0, 1, 0), ) @@ -654,7 +665,7 @@ class Session: sessionteam = SessionTeam( team_id=our_team_id, color=chooser.get_color(), - name=chooser.getplayer().get_name(full=True, icon=False), + name=chooser.getplayer().getname(full=True, icon=False), ) # Add player's team to the Session. diff --git a/assets/src/ba_data/python/ba/_stats.py b/assets/src/ba_data/python/ba/_stats.py index 7cfad6e9..091452f4 100644 --- a/assets/src/ba_data/python/ba/_stats.py +++ b/assets/src/ba_data/python/ba/_stats.py @@ -104,7 +104,7 @@ class PlayerRecord: raise SessionPlayerNotFoundError() return self._player - def get_name(self, full: bool = False) -> str: + def getname(self, full: bool = False) -> str: """Return the player entry's name.""" return self.name_full if full else self.name @@ -307,8 +307,8 @@ class Stats: def register_player(self, player: ba.SessionPlayer) -> None: """Register a player with this score-set.""" - name = player.get_name() - name_full = player.get_name(full=True) + name = player.getname() + name_full = player.getname(full=True) try: # If the player already exists, update his character and such as # it may have changed. @@ -327,13 +327,13 @@ class Stats: # corresponds to a player with that name. for record_id, record in self._player_records.items(): lastplayer = record.get_last_player() - if lastplayer and lastplayer.get_name() == record_id: + if lastplayer and lastplayer.getname() == record_id: records[record_id] = record return records def player_got_hit(self, player: ba.SessionPlayer) -> None: """Call this when a player got hit.""" - s_player = self._player_records[player.get_name()] + s_player = self._player_records[player.getname()] s_player.streak = 0 def player_scored(self, @@ -364,7 +364,7 @@ class Stats: from ba._gameactivity import GameActivity from ba._lang import Lstr del victim_player # Currently unused. - name = player.get_name() + name = player.getname() s_player = self._player_records[name] if kill: @@ -384,7 +384,7 @@ class Stats: assert self._activity is not None activity = self._activity() if isinstance(activity, GameActivity): - name_full = player.get_name(full=True, icon=False) + name_full = player.getname(full=True, icon=False) activity.show_zoom_message( Lstr(resource='nameScoresText', subs=[('${NAME}', name_full)]), @@ -450,7 +450,7 @@ class Stats: killer: ba.Player = None) -> None: """Should be called when a player is killed.""" from ba._lang import Lstr - name = player.get_name() + name = player.getname() prec = self._player_records[name] prec.streak = 0 if killed: @@ -468,7 +468,7 @@ class Stats: if killer.team is player.team: _ba.screenmessage(Lstr(resource='nameBetrayedText', subs=[('${NAME}', - killer.get_name()), + killer.getname()), ('${VICTIM}', name)]), top=True, color=killer.color, @@ -476,7 +476,7 @@ class Stats: else: _ba.screenmessage(Lstr(resource='nameKilledText', subs=[('${NAME}', - killer.get_name()), + killer.getname()), ('${VICTIM}', name)]), top=True, color=killer.color, diff --git a/assets/src/ba_data/python/bastd/activity/freeforallvictory.py b/assets/src/ba_data/python/bastd/activity/freeforallvictory.py index 72726d80..e0bcf462 100644 --- a/assets/src/ba_data/python/bastd/activity/freeforallvictory.py +++ b/assets/src/ba_data/python/bastd/activity/freeforallvictory.py @@ -61,12 +61,12 @@ class FreeForAllVictoryScoreScreenActivity(MultiTeamScoreScreenActivity): player_order_prev.sort( reverse=True, key=lambda p: - (p.team.sessiondata['previous_score'], p.get_name(full=True))) + (p.team.sessiondata['previous_score'], p.getname(full=True))) player_order = list(self.players) player_order.sort(reverse=True, key=lambda p: (p.team.sessiondata['score'], p.team.sessiondata[ - 'score'], p.get_name(full=True))) + 'score'], p.getname(full=True))) v_offs = -74.0 + spacing * len(player_order_prev) * 0.5 delay1 = 1.3 + 0.1 @@ -161,7 +161,7 @@ class FreeForAllVictoryScoreScreenActivity(MultiTeamScoreScreenActivity): 0: ts_h_offs - 72.0 * scale, transtime2: ts_h_offs - (72.0 + slide_amt) * scale })) - txt = Text(ba.Lstr(value=player.get_name(full=True)), + txt = Text(ba.Lstr(value=player.getname(full=True)), maxwidth=130.0, scale=0.75 * scale, position=(ts_h_offs - 50.0 * scale, diff --git a/assets/src/ba_data/python/bastd/activity/multiteamscore.py b/assets/src/ba_data/python/bastd/activity/multiteamscore.py index 8fd34a3e..75bf8e64 100644 --- a/assets/src/ba_data/python/bastd/activity/multiteamscore.py +++ b/assets/src/ba_data/python/bastd/activity/multiteamscore.py @@ -212,7 +212,7 @@ class MultiTeamScoreScreenActivity(ScoreScreenActivity): scale=(30.0 * scale, 30.0 * scale), transition=Image.Transition.IN_LEFT, transition_delay=tdelay).autoretain() - Text(ba.Lstr(value=playerrec.get_name(full=True)), + Text(ba.Lstr(value=playerrec.getname(full=True)), maxwidth=160, scale=0.75 * scale, position=(ts_h_offs + 10.0 * scale, diff --git a/assets/src/ba_data/python/bastd/activity/multiteamvictory.py b/assets/src/ba_data/python/bastd/activity/multiteamvictory.py index e4146da3..5742bedb 100644 --- a/assets/src/ba_data/python/bastd/activity/multiteamvictory.py +++ b/assets/src/ba_data/python/bastd/activity/multiteamvictory.py @@ -80,7 +80,7 @@ class TeamSeriesVictoryScoreScreenActivity(MultiTeamScoreScreenActivity): if prec.player.in_game: player_entries.append( (prec.player.team.sessiondata['score'], - prec.get_name(full=True), prec)) + prec.getname(full=True), prec)) player_entries.sort(reverse=True, key=lambda x: x[0]) else: for _pkey, prec in self.stats.get_records().items(): @@ -364,7 +364,7 @@ class TeamSeriesVictoryScoreScreenActivity(MultiTeamScoreScreenActivity): assert i.node ba.animate(i.node, 'opacity', {0.0: 0.0, 0.25: 1.0}) ZoomText(ba.Lstr( - value=team.players[0].get_name(full=True, icon=False)), + value=team.players[0].getname(full=True, icon=False)), position=(0, 97 + offs_v), color=team.color, scale=1.15, diff --git a/assets/src/ba_data/python/bastd/actor/respawnicon.py b/assets/src/ba_data/python/bastd/actor/respawnicon.py index b2c7adba..965174c8 100644 --- a/assets/src/ba_data/python/bastd/actor/respawnicon.py +++ b/assets/src/ba_data/python/bastd/actor/respawnicon.py @@ -88,7 +88,7 @@ class RespawnIcon: attrs={ 'v_attach': 'top', 'h_attach': 'right' if on_right else 'left', - 'text': ba.Lstr(value=player.get_name()), + 'text': ba.Lstr(value=player.getname()), 'maxwidth': 100, 'h_align': 'center', 'v_align': 'center', diff --git a/assets/src/ba_data/python/bastd/game/elimination.py b/assets/src/ba_data/python/bastd/game/elimination.py index 3bebe0d2..a2acd319 100644 --- a/assets/src/ba_data/python/bastd/game/elimination.py +++ b/assets/src/ba_data/python/bastd/game/elimination.py @@ -75,7 +75,7 @@ class Icon(ba.Actor): 'text', owner=self.node, attrs={ - 'text': ba.Lstr(value=player.get_name()), + 'text': ba.Lstr(value=player.getname()), 'color': ba.safecolor(player.team.color), 'h_align': 'center', 'v_align': 'center', @@ -276,7 +276,7 @@ class EliminationGame(ba.TeamGameActivity[Player, Team]): player.team.survival_seconds = 0 ba.screenmessage( ba.Lstr(resource='playerDelayedJoinText', - subs=[('${PLAYER}', player.get_name(full=True))]), + subs=[('${PLAYER}', player.getname(full=True))]), color=(0, 1, 0), ) return diff --git a/assets/src/ba_data/python/bastd/game/meteorshower.py b/assets/src/ba_data/python/bastd/game/meteorshower.py index ac269515..c9887da8 100644 --- a/assets/src/ba_data/python/bastd/game/meteorshower.py +++ b/assets/src/ba_data/python/bastd/game/meteorshower.py @@ -117,7 +117,7 @@ class MeteorShowerGame(ba.TeamGameActivity[Player, Team]): if self.has_begun(): ba.screenmessage( ba.Lstr(resource='playerDelayedJoinText', - subs=[('${PLAYER}', player.get_name(full=True))]), + subs=[('${PLAYER}', player.getname(full=True))]), color=(0, 1, 0), ) # For score purposes, mark them as having died right as the diff --git a/assets/src/ba_data/python/bastd/game/onslaught.py b/assets/src/ba_data/python/bastd/game/onslaught.py index 2ba9846d..84a77e74 100644 --- a/assets/src/ba_data/python/bastd/game/onslaught.py +++ b/assets/src/ba_data/python/bastd/game/onslaught.py @@ -901,7 +901,7 @@ class OnslaughtGame(ba.CoopGameActivity[Player, Team]): in [Preset.ENDLESS, Preset.ENDLESS_TOURNAMENT] or (player.respawn_wave <= len(self._waves)))): rtxt = ba.Lstr(resource='onslaughtRespawnText', - subs=[('${PLAYER}', player.get_name()), + subs=[('${PLAYER}', player.getname()), ('${WAVE}', str(player.respawn_wave)) ]) text = ba.Lstr(value='${A}${B}\n', diff --git a/assets/src/ba_data/python/bastd/game/race.py b/assets/src/ba_data/python/bastd/game/race.py index f28d2736..48056066 100644 --- a/assets/src/ba_data/python/bastd/game/race.py +++ b/assets/src/ba_data/python/bastd/game/race.py @@ -253,7 +253,7 @@ class RaceGame(ba.TeamGameActivity[Player, Team]): ba.screenmessage(ba.Lstr( translate=('statements', 'Killing ${NAME} for' ' skipping part of the track!'), - subs=[('${NAME}', player.get_name(full=True))]), + subs=[('${NAME}', player.getname(full=True))]), color=(1, 0, 0)) else: # If this player is in first, note that this is the @@ -368,7 +368,7 @@ class RaceGame(ba.TeamGameActivity[Player, Team]): translate=('statements', '${TEAM} is disqualified because ${PLAYER} left'), subs=[('${TEAM}', player.team.name), - ('${PLAYER}', player.get_name(full=True))]), + ('${PLAYER}', player.getname(full=True))]), color=(1, 1, 0)) player.team.finished = True player.team.time = None diff --git a/assets/src/ba_data/python/bastd/game/targetpractice.py b/assets/src/ba_data/python/bastd/game/targetpractice.py index 7a94f331..7832b038 100644 --- a/assets/src/ba_data/python/bastd/game/targetpractice.py +++ b/assets/src/ba_data/python/bastd/game/targetpractice.py @@ -354,7 +354,7 @@ class Target(ba.Actor): # names and colors so they know who got the hit. if len(activity.players) > 1: popupcolor = ba.safecolor(player.color, target_intensity=0.75) - popupstr += ' ' + player.get_name() + popupstr += ' ' + player.getname() PopupText(popupstr, position=self._position, color=popupcolor, diff --git a/assets/src/ba_data/python/bastd/ui/coop/browser.py b/assets/src/ba_data/python/bastd/ui/coop/browser.py index 8bf89822..721f4c6d 100644 --- a/assets/src/ba_data/python/bastd/ui/coop/browser.py +++ b/assets/src/ba_data/python/bastd/ui/coop/browser.py @@ -935,7 +935,7 @@ class CoopBrowserWindow(ba.Window): # add all custom user levels here.. # items += [ - # 'User:' + l.get_name() + # 'User:' + l.getname() # for l in get_campaign('User').get_levels() # ] diff --git a/assets/src/ba_data/python/bastd/ui/kiosk.py b/assets/src/ba_data/python/bastd/ui/kiosk.py index 724113d3..f1f7d88a 100644 --- a/assets/src/ba_data/python/bastd/ui/kiosk.py +++ b/assets/src/ba_data/python/bastd/ui/kiosk.py @@ -389,20 +389,20 @@ class KioskWindow(ba.Window): pass else: # Also make sure there's no player profiles. - bs_config = ba.app.config - bs_config['Player Profiles'] = {} + appconfig = ba.app.config + appconfig['Player Profiles'] = {} def _do_game(self, mode: str) -> None: self._save_state() if mode in ['epic', 'ctf', 'hockey']: - bs_config = ba.app.config - if 'Team Tournament Playlists' not in bs_config: - bs_config['Team Tournament Playlists'] = {} - if 'Free-for-All Playlists' not in bs_config: - bs_config['Free-for-All Playlists'] = {} - bs_config['Show Tutorial'] = False + appconfig = ba.app.config + if 'Team Tournament Playlists' not in appconfig: + appconfig['Team Tournament Playlists'] = {} + if 'Free-for-All Playlists' not in appconfig: + appconfig['Free-for-All Playlists'] = {} + appconfig['Show Tutorial'] = False if mode == 'epic': - bs_config['Free-for-All Playlists']['Just Epic Elim'] = [{ + appconfig['Free-for-All Playlists']['Just Epic Elim'] = [{ 'settings': { 'Epic Mode': 1, 'Lives Per Player': 1, @@ -412,7 +412,7 @@ class KioskWindow(ba.Window): }, 'type': 'bs_elimination.EliminationGame' }] - bs_config['Free-for-All Playlist Selection'] = 'Just Epic Elim' + appconfig['Free-for-All Playlist Selection'] = 'Just Epic Elim' _ba.fade_screen(False, endcall=ba.Call( ba.pushcall, @@ -420,7 +420,7 @@ class KioskWindow(ba.Window): ba.FreeForAllSession))) else: if mode == 'ctf': - bs_config['Team Tournament Playlists']['Just CTF'] = [{ + appconfig['Team Tournament Playlists']['Just CTF'] = [{ 'settings': { 'Epic Mode': False, 'Flag Idle Return Time': 30, @@ -432,10 +432,10 @@ class KioskWindow(ba.Window): }, 'type': 'bs_capture_the_flag.CTFGame' }] - bs_config[ + appconfig[ 'Team Tournament Playlist Selection'] = 'Just CTF' else: - bs_config['Team Tournament Playlists']['Just Hockey'] = [{ + appconfig['Team Tournament Playlists']['Just Hockey'] = [{ 'settings': { 'Respawn Times': 1.0, 'Score to Win': 1, @@ -444,8 +444,8 @@ class KioskWindow(ba.Window): }, 'type': 'bs_hockey.HockeyGame' }] - bs_config['Team Tournament Playlist Selection'] = \ - 'Just Hockey' + appconfig['Team Tournament Playlist Selection'] = ( + 'Just Hockey') _ba.fade_screen(False, endcall=ba.Call( ba.pushcall, diff --git a/assets/src/ba_data/python/bastd/ui/mainmenu.py b/assets/src/ba_data/python/bastd/ui/mainmenu.py index 177b7b1a..bbc4dd5c 100644 --- a/assets/src/ba_data/python/bastd/ui/mainmenu.py +++ b/assets/src/ba_data/python/bastd/ui/mainmenu.py @@ -708,7 +708,7 @@ class MainMenuWindow(ba.Window): # Player name if applicable. if self._input_player: - player_name = self._input_player.get_name() + player_name = self._input_player.getname() h, v, scale = positions[self._p_index] v += 35 ba.textwidget(parent=self._root_widget, diff --git a/assets/src/ba_data/python/bastd/ui/playlist/browser.py b/assets/src/ba_data/python/bastd/ui/playlist/browser.py index c081fe62..2311eebd 100644 --- a/assets/src/ba_data/python/bastd/ui/playlist/browser.py +++ b/assets/src/ba_data/python/bastd/ui/playlist/browser.py @@ -338,7 +338,7 @@ class PlaylistBrowserWindow(ba.Window): v_align='center') index = 0 - bs_config = ba.app.config + appconfig = ba.app.config model_opaque = ba.getmodel('level_select_button_opaque') model_transparent = ba.getmodel('level_select_button_transparent') @@ -418,13 +418,13 @@ class PlaylistBrowserWindow(ba.Window): raise Exception('unrecognized session-type: ' + str(self._sessiontype)) else: - if name not in bs_config[self._pvars.config_name + + if name not in appconfig[self._pvars.config_name + ' Playlists']: print( 'NOT FOUND ERR', - bs_config[self._pvars.config_name + + appconfig[self._pvars.config_name + ' Playlists']) - playlist = bs_config[self._pvars.config_name + + playlist = appconfig[self._pvars.config_name + ' Playlists'][name] playlist = filter_playlist(playlist, self._sessiontype, diff --git a/assets/src/ba_data/python/bastd/ui/playlist/edit.py b/assets/src/ba_data/python/bastd/ui/playlist/edit.py index 7675928d..ae279f93 100644 --- a/assets/src/ba_data/python/bastd/ui/playlist/edit.py +++ b/assets/src/ba_data/python/bastd/ui/playlist/edit.py @@ -110,7 +110,7 @@ class PlaylistEditWindow(ba.Window): parent=self._root_widget, position=(210 + x_inset, v + 7), size=(self._scroll_width - 53, 43), - text=self._editcontroller.get_name(), + text=self._editcontroller.getname(), h_align='left', v_align='center', max_chars=40, diff --git a/assets/src/ba_data/python/bastd/ui/playlist/editcontroller.py b/assets/src/ba_data/python/bastd/ui/playlist/editcontroller.py index 52fc2aef..2e6753ac 100644 --- a/assets/src/ba_data/python/bastd/ui/playlist/editcontroller.py +++ b/assets/src/ba_data/python/bastd/ui/playlist/editcontroller.py @@ -44,7 +44,7 @@ class PlaylistEditController: from bastd.ui import playlist as playlistui from bastd.ui.playlist import edit as peditui - bs_config = ba.app.config + appconfig = ba.app.config # Since we may be showing our map list momentarily, # lets go ahead and preload all map preview textures. @@ -58,8 +58,8 @@ class PlaylistEditController: self._config_name_full = self._pvars.config_name + ' Playlists' # Make sure config exists. - if self._config_name_full not in bs_config: - bs_config[self._config_name_full] = {} + if self._config_name_full not in appconfig: + appconfig[self._config_name_full] = {} self._selected_index = 0 if existing_playlist_name: @@ -67,7 +67,7 @@ class PlaylistEditController: # Filter out invalid games. self._playlist = filter_playlist( - bs_config[self._pvars.config_name + + appconfig[self._pvars.config_name + ' Playlists'][existing_playlist_name], sessiontype=sessiontype, remove_unowned=False) @@ -87,7 +87,7 @@ class PlaylistEditController: self._name = ( self._pvars.default_new_list_name.evaluate() + ((' ' + str(i)) if i > 1 else '')) - if self._name not in bs_config[self._pvars.config_name + + if self._name not in appconfig[self._pvars.config_name + ' Playlists']: break i += 1 @@ -115,7 +115,7 @@ class PlaylistEditController: """(internal)""" self._edit_ui_selection = selection - def get_name(self) -> str: + def getname(self) -> str: """(internal)""" return self._name diff --git a/assets/src/ba_data/python/bastd/ui/profile/edit.py b/assets/src/ba_data/python/bastd/ui/profile/edit.py index 53a681ff..d1c520b6 100644 --- a/assets/src/ba_data/python/bastd/ui/profile/edit.py +++ b/assets/src/ba_data/python/bastd/ui/profile/edit.py @@ -41,7 +41,7 @@ class EditProfileWindow(ba.Window): """Transitions out and recreates ourself.""" ba.containerwidget(edit=self._root_widget, transition='out_left') ba.app.main_menu_window = EditProfileWindow( - self.get_name(), self._in_main_menu).get_root_widget() + self.getname(), self._in_main_menu).get_root_widget() def __init__(self, existing_profile: Optional[str], @@ -605,7 +605,7 @@ class EditProfileWindow(ba.Window): def _update_clipped_name(self) -> None: if not self._clipped_name_text: return - name = self.get_name() + name = self.getname() if name == '__account__': name = (_ba.get_account_name() if _ba.get_account_state() == 'signed_in' else '???') @@ -630,7 +630,7 @@ class EditProfileWindow(ba.Window): if self._icon_button_label: ba.textwidget(edit=self._icon_button_label, text=self._icon) - def get_name(self) -> str: + def getname(self) -> str: """Return the current profile name value.""" if self._is_account_profile: new_name = '__account__' @@ -643,7 +643,7 @@ class EditProfileWindow(ba.Window): def save(self, transition_out: bool = True) -> bool: """Save has been selected.""" from bastd.ui.profile import browser as pbrowser - new_name = self.get_name().strip() + new_name = self.getname().strip() if not new_name: ba.screenmessage(ba.Lstr(resource='nameNotEmptyText')) diff --git a/assets/src/ba_data/python/bastd/ui/profile/upgrade.py b/assets/src/ba_data/python/bastd/ui/profile/upgrade.py index 50ca401e..86ccaf07 100644 --- a/assets/src/ba_data/python/bastd/ui/profile/upgrade.py +++ b/assets/src/ba_data/python/bastd/ui/profile/upgrade.py @@ -48,7 +48,7 @@ class ProfileUpgradeWindow(ba.Window): self._base_scale = (2.05 if ba.app.small_ui else 1.5 if ba.app.med_ui else 1.2) self._upgrade_start_time: Optional[float] = None - self._name = edit_profile_window.get_name() + self._name = edit_profile_window.getname() self._edit_profile_window = weakref.ref(edit_profile_window) top_extra = 15 if ba.app.small_ui else 15 diff --git a/assets/src/ba_data/python/bastd/ui/settings/keyboard.py b/assets/src/ba_data/python/bastd/ui/settings/keyboard.py index 7ca300f1..b7c04984 100644 --- a/assets/src/ba_data/python/bastd/ui/settings/keyboard.py +++ b/assets/src/ba_data/python/bastd/ui/settings/keyboard.py @@ -55,7 +55,6 @@ class ConfigKeyboardWindow(ba.Window): stack_offset=(0, -10) if ba.app.small_ui else (0, 0), transition=transition)) - # don't ask to config joysticks while we're in here.. self._rebuild_ui() def _rebuild_ui(self) -> None: @@ -63,7 +62,7 @@ class ConfigKeyboardWindow(ba.Window): for widget in self._root_widget.get_children(): widget.delete() - # fill our temp config with present values + # Fill our temp config with present values. self._settings: Dict[str, int] = {} for button in [ 'buttonJump', 'buttonPunch', 'buttonBomb', 'buttonPickUp', @@ -197,8 +196,10 @@ class ConfigKeyboardWindow(ba.Window): label='', color=color) - # do this deferred so it shows up on top of other buttons + # Do this deferred so it shows up on top of other buttons. (ew.) def doit() -> None: + if not self._root_widget: + return uiscale = 0.66 * scale * 2.0 maxwidth = 76.0 * scale txt = ba.textwidget(parent=self._root_widget, @@ -288,17 +289,14 @@ class AwaitKeyboardInputWindow(ba.Window): color=(1, 1, 1, 0.3), text=str(self._counter)) self._decrement_timer: Optional[ba.Timer] = ba.Timer( - 1.0, - ba.Call(self._decrement), - repeat=True, - timetype=ba.TimeType.REAL) + 1.0, self._decrement, repeat=True, timetype=ba.TimeType.REAL) _ba.capture_keyboard_input(ba.WeakCall(self._button_callback)) def __del__(self) -> None: _ba.release_keyboard_input() def _die(self) -> None: - # this strong-refs us; killing it allow us to die now + # This strong-refs us; killing it allows us to die now. self._decrement_timer = None if self._root_widget: ba.containerwidget(edit=self._root_widget, transition='out_left') diff --git a/assets/src/ba_data/python/bastd/ui/soundtrack/edit.py b/assets/src/ba_data/python/bastd/ui/soundtrack/edit.py index cf0507ab..7373bf18 100644 --- a/assets/src/ba_data/python/bastd/ui/soundtrack/edit.py +++ b/assets/src/ba_data/python/bastd/ui/soundtrack/edit.py @@ -39,7 +39,7 @@ class SoundtrackEditWindow(ba.Window): existing_soundtrack: Optional[Union[str, Dict[str, Any]]], transition: str = 'in_right'): # pylint: disable=too-many-statements - bs_config = ba.app.config + appconfig = ba.app.config self._r = 'editSoundtrackWindow' self._folder_tex = ba.gettexture('folder') self._file_tex = ba.gettexture('file') @@ -81,8 +81,8 @@ class SoundtrackEditWindow(ba.Window): v_align='center', maxwidth=280) v = self._height - 110 - if 'Soundtracks' not in bs_config: - bs_config['Soundtracks'] = {} + if 'Soundtracks' not in appconfig: + appconfig['Soundtracks'] = {} self._soundtrack_name: Optional[str] self._existing_soundtrack_name: Optional[str] @@ -90,7 +90,7 @@ class SoundtrackEditWindow(ba.Window): # if they passed just a name, pull info from that soundtrack if isinstance(existing_soundtrack, str): self._soundtrack = copy.deepcopy( - bs_config['Soundtracks'][existing_soundtrack]) + appconfig['Soundtracks'][existing_soundtrack]) self._soundtrack_name = existing_soundtrack self._existing_soundtrack_name = existing_soundtrack self._last_edited_song_type = None @@ -129,7 +129,7 @@ class SoundtrackEditWindow(ba.Window): while True: self._soundtrack_name = st_name_text.replace( '${COUNT}', str(i)) - if self._soundtrack_name not in bs_config['Soundtracks']: + if self._soundtrack_name not in appconfig['Soundtracks']: break i += 1 diff --git a/assets/src/ba_data/python/bastd/ui/teamnamescolors.py b/assets/src/ba_data/python/bastd/ui/teamnamescolors.py index 8af30be8..543dce62 100644 --- a/assets/src/ba_data/python/bastd/ui/teamnamescolors.py +++ b/assets/src/ba_data/python/bastd/ui/teamnamescolors.py @@ -48,16 +48,16 @@ class TeamNamesColorsWindow(popup.PopupWindow): size=(self._width, self._height), scale=scale) - bs_config = ba.app.config + appconfig = ba.app.config self._names = list( - bs_config.get('Custom Team Names', DEFAULT_TEAM_NAMES)) + appconfig.get('Custom Team Names', DEFAULT_TEAM_NAMES)) # We need to flatten the translation since it will be an # editable string. self._names = [ ba.Lstr(translate=('teamNames', n)).evaluate() for n in self._names ] self._colors = list( - bs_config.get('Custom Team Colors', DEFAULT_TEAM_COLORS)) + appconfig.get('Custom Team Colors', DEFAULT_TEAM_COLORS)) self._color_buttons: List[ba.Widget] = [] self._color_text_fields: List[ba.Widget] = [] diff --git a/docs/ba_module.md b/docs/ba_module.md index ae19599f..777f081a 100644 --- a/docs/ba_module.md +++ b/docs/ba_module.md @@ -1,5 +1,5 @@ -

last updated on 2020-05-30 for Ballistica version 1.5.0 build 20035

+

last updated on 2020-05-30 for Ballistica version 1.5.0 build 20036

This page documents the Python classes and functions in the 'ba' module, which are the ones most relevant to modding in Ballistica. If you come across something you feel should be included here or could be better explained, please let me know. Happy modding!


@@ -1595,7 +1595,7 @@ start_long_action(callback_when_done=ba.ContextC

Methods Inherited:

-
add_actor_weak_ref(), add_player(), add_team(), begin(), continue_or_end_game(), create_player(), create_settings_ui(), create_team(), dep_is_present(), destroy(), end(), end_game(), get_description(), get_description_display_string(), get_display_string(), get_dynamic_deps(), get_game_settings(), get_instance_description(), get_instance_description_short(), get_instance_display_string(), get_instance_scoreboard_display_string(), get_name(), get_score_info(), get_settings_display_string(), get_supported_maps(), get_team_display_string(), handlemessage(), has_begun(), has_ended(), has_transitioned_in(), is_transitioning_out(), is_waiting_for_continue(), on_continue(), on_expire(), on_player_join(), on_player_leave(), on_team_join(), on_team_leave(), on_transition_in(), on_transition_out(), remove_player(), remove_team(), respawn_player(), retain_actor(), set_has_ended(), setup_standard_powerup_drops(), setup_standard_time_limit(), show_zoom_message(), spawn_player(), spawn_player_if_exists(), transition_in(), transition_out()
+
add_actor_weak_ref(), add_player(), add_team(), begin(), continue_or_end_game(), create_player(), create_settings_ui(), create_team(), dep_is_present(), destroy(), end(), end_game(), get_description(), get_description_display_string(), get_display_string(), get_dynamic_deps(), get_game_settings(), get_instance_description(), get_instance_description_short(), get_instance_display_string(), get_instance_scoreboard_display_string(), get_score_info(), get_settings_display_string(), get_supported_maps(), get_team_display_string(), getname(), handlemessage(), has_begun(), has_ended(), has_transitioned_in(), is_transitioning_out(), is_waiting_for_continue(), on_continue(), on_expire(), on_player_join(), on_player_leave(), on_team_join(), on_team_leave(), on_transition_in(), on_transition_out(), remove_player(), remove_team(), respawn_player(), retain_actor(), set_has_ended(), setup_standard_powerup_drops(), setup_standard_time_limit(), show_zoom_message(), spawn_player(), spawn_player_if_exists(), transition_in(), transition_out()

Methods Defined or Overridden:

<constructor>, celebrate(), fade_to_red(), get_score_type(), on_begin(), setup_low_life_warning_sound(), spawn_player_spaz(), supports_session_type()
@@ -2182,7 +2182,7 @@ its time with lingering corpses, sound effects, etc.

Methods Inherited:

add_actor_weak_ref(), add_player(), add_team(), begin(), create_player(), create_team(), dep_is_present(), destroy(), get_dynamic_deps(), has_begun(), has_ended(), has_transitioned_in(), is_transitioning_out(), on_expire(), on_player_leave(), on_team_join(), on_team_leave(), on_transition_out(), remove_player(), remove_team(), retain_actor(), set_has_ended(), transition_in(), transition_out()

Methods Defined or Overridden:

-
<constructor>, continue_or_end_game(), create_settings_ui(), end(), end_game(), get_description(), get_description_display_string(), get_display_string(), get_game_settings(), get_instance_description(), get_instance_description_short(), get_instance_display_string(), get_instance_scoreboard_display_string(), get_name(), get_score_info(), get_settings_display_string(), get_supported_maps(), get_team_display_string(), handlemessage(), is_waiting_for_continue(), on_begin(), on_continue(), on_player_join(), on_transition_in(), respawn_player(), setup_standard_powerup_drops(), setup_standard_time_limit(), show_zoom_message(), spawn_player(), spawn_player_if_exists(), spawn_player_spaz(), supports_session_type()
+
<constructor>, continue_or_end_game(), create_settings_ui(), end(), end_game(), get_description(), get_description_display_string(), get_display_string(), get_game_settings(), get_instance_description(), get_instance_description_short(), get_instance_display_string(), get_instance_scoreboard_display_string(), get_score_info(), get_settings_display_string(), get_supported_maps(), get_team_display_string(), getname(), handlemessage(), is_waiting_for_continue(), on_begin(), on_continue(), on_player_join(), on_transition_in(), respawn_player(), setup_standard_powerup_drops(), setup_standard_time_limit(), show_zoom_message(), spawn_player(), spawn_player_if_exists(), spawn_player_spaz(), supports_session_type()

<constructor>

ba.GameActivity(settings: Dict[str, Any])

@@ -2265,7 +2265,7 @@ can override this method.

Return a descriptive name for this game/settings combo.

-

Subclasses should override get_name(); not this.

+

Subclasses should override getname(); not this.

get_game_settings()

@@ -2397,15 +2397,6 @@ with the first value, ${ARG2} with the second, etc.

This name is used above the game scoreboard in the corner of the screen, so it should be as concise as possible.

-
-

get_name()

-
<class method>
-

get_name() -> str

- -

Return a str name for this game type.

- -

This default implementation simply returns the 'name' class attr.

-

get_score_info()

<class method>
@@ -2439,6 +2430,15 @@ for this game-type for the given ba.Session type

Given a team name, returns a localized version of it.

+
+

getname()

+
<class method>
+

getname() -> str

+ +

Return a str name for this game type.

+ +

This default implementation simply returns the 'name' class attr.

+

handlemessage()

handlemessage(self, msg: Any) -> Any

@@ -3021,7 +3021,7 @@ etc.

Methods Inherited:

autoretain(), getactivity(), is_alive(), on_expire()

Methods Defined or Overridden:

-
<constructor>, exists(), get_def_bound_box(), get_def_point(), get_def_points(), get_ffa_start_position(), get_flag_position(), get_music_type(), get_name(), get_play_types(), get_preview_texture_name(), get_start_position(), handlemessage(), is_point_near_edge(), on_preload(), preload()
+
<constructor>, exists(), get_def_bound_box(), get_def_point(), get_def_points(), get_ffa_start_position(), get_flag_position(), get_music_type(), get_play_types(), get_preview_texture_name(), get_start_position(), getname(), handlemessage(), is_point_near_edge(), on_preload(), preload()

<constructor>

ba.Map(vr_overlay_offset: Optional[Sequence[float]] = None)

@@ -3096,13 +3096,6 @@ as far from these players as possible.

If None is returned, default music will be used.

-
-

get_name()

-
<class method>
-

get_name() -> str

- -

Return the unique name of this map, in English.

-

get_play_types()

<class method>
@@ -3123,6 +3116,13 @@ as far from these players as possible.

Return a random starting position for the given team index.

+
+

getname()

+
<class method>
+

getname() -> str

+ +

Return the unique name of this map, in English.

+

handlemessage()

handlemessage(self, msg: Any) -> Any

@@ -3590,7 +3590,7 @@ a live node in the game.

Node reference (sometimes used as attr values/etc).

Methods:

-
add_death_action(), connectattr(), delete(), exists(), get_name(), getdelegate(), getnodetype(), handlemessage()
+
add_death_action(), connectattr(), delete(), exists(), getdelegate(), getname(), getnodetype(), handlemessage()

add_death_action()

add_death_action(action: Callable[[], None]) -> None

@@ -3633,12 +3633,6 @@ idea to check this.

functionality, so a statement such as "if mynode" will do the right thing both for Node objects and values of None.

-
-

get_name()

-

get_name() -> str

- -

Return the name assigned to a Node; used mainly for debugging

-

getdelegate()

getdelegate(type: Type, doraise: bool = False) -> <varies>

@@ -3649,6 +3643,12 @@ the right thing both for Node objects and values of None.

type, then None will be returned. If 'doraise' is True, then an ba.DelegateNotFoundError will be raised instead.

+
+

getname()

+

getname() -> str

+ +

Return the name assigned to a Node; used mainly for debugging

+

getnodetype()

getnodetype() -> str

@@ -3874,7 +3874,7 @@ even if myactor is set to None.

Methods:

-
assign_input_call(), exists(), get_icon(), get_name(), is_alive(), reset_input()
+
assign_input_call(), exists(), get_icon(), getname(), is_alive(), reset_input()

assign_input_call()

assign_input_call(self, inputtype: Union[str, Tuple[str, ...]], call: Callable) -> None

@@ -3910,10 +3910,10 @@ the right thing both for Player objects and values of None.

Returns the character's icon (images, colors, etc contained in a dict)

-

get_name()

-

get_name(self, full: bool = False, icon: bool = True) -> str

+

getname()

+

getname(self, full: bool = False, icon: bool = True) -> str

-

get_name(full: bool = False, icon: bool = True) -> str

+

getname(full: bool = False, icon: bool = True) -> str

Returns the player's name. If icon is True, the long version of the name may include an icon.

@@ -4047,7 +4047,7 @@ the type-checker properly identifies the returned value as one.

Methods:

-
<constructor>, associate_with_player(), cancel_multi_kill_timer(), get_icon(), get_last_player(), get_name(), getactivity(), submit_kill()
+
<constructor>, associate_with_player(), cancel_multi_kill_timer(), get_icon(), get_last_player(), getactivity(), getname(), submit_kill()

<constructor>

ba.PlayerRecord(name: str, name_full: str, player: ba.SessionPlayer, stats: ba.Stats)

@@ -4076,12 +4076,6 @@ the type-checker properly identifies the returned value as one.

Return the last ba.Player we were associated with.

-
-

get_name()

-

get_name(self, full: bool = False) -> str

- -

Return the player entry's name.

-

getactivity()

getactivity(self) -> Optional[ba.Activity]

@@ -4090,6 +4084,12 @@ the type-checker properly identifies the returned value as one.

Returns None if the activity no longer exists.

+
+

getname()

+

getname(self, full: bool = False) -> str

+ +

Return the player entry's name.

+

submit_kill()

submit_kill(self, showpoints: bool = True) -> None

@@ -4568,7 +4568,7 @@ is still in its lobby selecting a team/etc. then a

Methods:

-
assign_input_call(), exists(), get_account_id(), get_icon(), get_name(), remove_from_game(), reset_input(), set_name()
+
assign_input_call(), exists(), get_account_id(), get_icon(), getname(), remove_from_game(), reset_input(), set_name()

assign_input_call()

assign_input_call(type: Union[str, Tuple[str, ...]], @@ -4606,8 +4606,8 @@ joins (while verification occurs).

Returns the character's icon (images, colors, etc contained in a dict)

-

get_name()

-

get_name(full: bool = False, icon: bool = True) -> str

+

getname()

+

getname(full: bool = False, icon: bool = True) -> str

Returns the player's name. If icon is True, the long version of the name may include an icon.

@@ -5061,7 +5061,7 @@ of the session.

Methods Inherited:

-
add_actor_weak_ref(), add_player(), add_team(), begin(), continue_or_end_game(), create_player(), create_settings_ui(), create_team(), dep_is_present(), destroy(), end_game(), get_description(), get_description_display_string(), get_display_string(), get_dynamic_deps(), get_game_settings(), get_instance_description(), get_instance_description_short(), get_instance_display_string(), get_instance_scoreboard_display_string(), get_name(), get_score_info(), get_settings_display_string(), get_supported_maps(), get_team_display_string(), handlemessage(), has_begun(), has_ended(), has_transitioned_in(), is_transitioning_out(), is_waiting_for_continue(), on_continue(), on_expire(), on_player_join(), on_player_leave(), on_team_join(), on_team_leave(), on_transition_out(), remove_player(), remove_team(), respawn_player(), retain_actor(), set_has_ended(), setup_standard_powerup_drops(), setup_standard_time_limit(), show_zoom_message(), spawn_player(), spawn_player_if_exists(), transition_in(), transition_out()
+
add_actor_weak_ref(), add_player(), add_team(), begin(), continue_or_end_game(), create_player(), create_settings_ui(), create_team(), dep_is_present(), destroy(), end_game(), get_description(), get_description_display_string(), get_display_string(), get_dynamic_deps(), get_game_settings(), get_instance_description(), get_instance_description_short(), get_instance_display_string(), get_instance_scoreboard_display_string(), get_score_info(), get_settings_display_string(), get_supported_maps(), get_team_display_string(), getname(), handlemessage(), has_begun(), has_ended(), has_transitioned_in(), is_transitioning_out(), is_waiting_for_continue(), on_continue(), on_expire(), on_player_join(), on_player_leave(), on_team_join(), on_team_leave(), on_transition_out(), remove_player(), remove_team(), respawn_player(), retain_actor(), set_has_ended(), setup_standard_powerup_drops(), setup_standard_time_limit(), show_zoom_message(), spawn_player(), spawn_player_if_exists(), transition_in(), transition_out()

Methods Defined or Overridden:

<constructor>, end(), on_begin(), on_transition_in(), spawn_player_spaz(), supports_session_type()