mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-06 15:47:06 +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">
|
<component name="ProjectDictionaryState">
|
||||||
<dictionary name="roman">
|
<dictionary name="roman">
|
||||||
<words>
|
<words>
|
||||||
|
<w>gamename</w>
|
||||||
<w>maxlen</w>
|
<w>maxlen</w>
|
||||||
<w>pagename</w>
|
<w>pagename</w>
|
||||||
</words>
|
</words>
|
||||||
|
|||||||
@ -158,7 +158,6 @@ class CoopSession(Session):
|
|||||||
|
|
||||||
if _ba.app.server is not None:
|
if _ba.app.server is not None:
|
||||||
# If we're in server mode, end game and show results.
|
# If we're in server mode, end game and show results.
|
||||||
activity = self.getactivity()
|
|
||||||
_ba.timer(2.0, WeakCall(self._end_activity_if_empty))
|
_ba.timer(2.0, WeakCall(self._end_activity_if_empty))
|
||||||
else:
|
else:
|
||||||
# Otherwise, if all our players leave
|
# Otherwise, if all our players leave
|
||||||
|
|||||||
@ -299,6 +299,7 @@ class ServerController:
|
|||||||
|
|
||||||
def _launch_server_session(self) -> None:
|
def _launch_server_session(self) -> None:
|
||||||
"""Kick off a host-session based on the current server config."""
|
"""Kick off a host-session based on the current server config."""
|
||||||
|
# pylint: disable=too-many-branches
|
||||||
app = _ba.app
|
app = _ba.app
|
||||||
appcfg = app.config
|
appcfg = app.config
|
||||||
sessiontype = self._get_session_type()
|
sessiontype = self._get_session_type()
|
||||||
@ -348,7 +349,8 @@ class ServerController:
|
|||||||
appcfg['Team Tournament Playlist Randomize'] = (
|
appcfg['Team Tournament Playlist Randomize'] = (
|
||||||
self._config.playlist_shuffle)
|
self._config.playlist_shuffle)
|
||||||
elif sessiontype is CoopSession:
|
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 = {
|
app.coop_session_args = {
|
||||||
'campaign': campaignname,
|
'campaign': campaignname,
|
||||||
'level': levelname,
|
'level': levelname,
|
||||||
|
|||||||
@ -510,7 +510,7 @@ class CoopScoreScreen(ba.Activity[ba.Player, ba.Team]):
|
|||||||
with ba.Context(self):
|
with ba.Context(self):
|
||||||
self.end({'outcome': 'restart'})
|
self.end({'outcome': 'restart'})
|
||||||
|
|
||||||
def _safe_assign(self, player: EmptyPlayer) -> None:
|
def _safe_assign(self, player: ba.Player) -> None:
|
||||||
# (Only for headless builds).
|
# (Only for headless builds).
|
||||||
|
|
||||||
# Just to be extra careful, don't assign if we're transitioning out.
|
# 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),
|
ba.InputType.BOMB_PRESS, ba.InputType.PICK_UP_PRESS),
|
||||||
self._player_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)
|
super().on_player_join(player)
|
||||||
|
|
||||||
if ba.app.server is not None:
|
if ba.app.server is not None:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user