mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 09:23:12 +08:00
tidying
This commit is contained in:
parent
fa0036f14c
commit
5c3b707710
1
.idea/dictionaries/roman.xml
generated
1
.idea/dictionaries/roman.xml
generated
@ -1,6 +1,7 @@
|
||||
<component name="ProjectDictionaryState">
|
||||
<dictionary name="roman">
|
||||
<words>
|
||||
<w>gamename</w>
|
||||
<w>maxlen</w>
|
||||
<w>pagename</w>
|
||||
</words>
|
||||
|
||||
@ -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
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user