This commit is contained in:
Roman Trapeznikov 2021-07-10 22:47:40 +03:00
parent fa0036f14c
commit 5c3b707710
4 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<component name="ProjectDictionaryState">
<dictionary name="roman">
<words>
<w>gamename</w>
<w>maxlen</w>
<w>pagename</w>
</words>

View File

@ -158,7 +158,6 @@ class CoopSession(Session):
if _ba.app.server is not None:
# If we're in server mode, end game and show results.
activity = self.getactivity()
_ba.timer(2.0, WeakCall(self._end_activity_if_empty))
else:
# Otherwise, if all our players leave

View File

@ -299,6 +299,7 @@ class ServerController:
def _launch_server_session(self) -> None:
"""Kick off a host-session based on the current server config."""
# pylint: disable=too-many-branches
app = _ba.app
appcfg = app.config
sessiontype = self._get_session_type()
@ -348,7 +349,8 @@ class ServerController:
appcfg['Team Tournament Playlist Randomize'] = (
self._config.playlist_shuffle)
elif sessiontype is CoopSession:
campaignname, levelname = self._coop_game_name.split(':')
gamename = self._coop_game_name or 'Default:Onslaught Training'
campaignname, levelname = gamename.split(':')
app.coop_session_args = {
'campaign': campaignname,
'level': levelname,

View File

@ -510,7 +510,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
with ba.Context(self):
self.end({'outcome': 'restart'})
def _safe_assign(self, player: EmptyPlayer) -> None:
def _safe_assign(self, player: ba.Player) -> None:
# (Only for headless builds).
# Just to be extra careful, don't assign if we're transitioning out.
@ -521,7 +521,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
ba.InputType.BOMB_PRESS, ba.InputType.PICK_UP_PRESS),
self._player_press)
def on_player_join(self, player: PlayerType) -> None:
def on_player_join(self, player: ba.Player) -> None:
super().on_player_join(player)
if ba.app.server is not None: