Latest public/internal sync.

This commit is contained in:
Eric 2024-03-01 20:11:05 -08:00
parent 1f811a2f52
commit 4a9dd247b6
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
3 changed files with 18 additions and 18 deletions

View File

@ -310,9 +310,7 @@ class ServerController:
typename = (
'teams'
if result['playlistType'] == 'Team Tournament'
else 'ffa'
if result['playlistType'] == 'Free-for-All'
else '??'
else 'ffa' if result['playlistType'] == 'Free-for-All' else '??'
)
plistname = result['playlistName']
print(f'{Clr.SBLU}Got playlist: "{plistname}" ({typename}).{Clr.RST}')
@ -390,14 +388,14 @@ class ServerController:
if sessiontype is bascenev1.FreeForAllSession:
appcfg['Free-for-All Playlist Selection'] = self._playlist_name
appcfg[
'Free-for-All Playlist Randomize'
] = self._config.playlist_shuffle
appcfg['Free-for-All Playlist Randomize'] = (
self._config.playlist_shuffle
)
elif sessiontype is bascenev1.DualTeamSession:
appcfg['Team Tournament Playlist Selection'] = self._playlist_name
appcfg[
'Team Tournament Playlist Randomize'
] = self._config.playlist_shuffle
appcfg['Team Tournament Playlist Randomize'] = (
self._config.playlist_shuffle
)
elif sessiontype is bascenev1.CoopSession:
classic.coop_session_args = {
'campaign': self._config.coop_campaign,

View File

@ -232,7 +232,9 @@ from bascenev1._settings import (
Setting,
)
from bascenev1._session import (
Session, set_player_rejoin_cooldown, set_max_players_override
Session,
set_player_rejoin_cooldown,
set_max_players_override,
)
from bascenev1._stats import PlayerScoredMessage, PlayerRecord, Stats
from bascenev1._team import SessionTeam, Team, EmptyTeam

View File

@ -146,9 +146,7 @@ class PlayOptionsWindow(PopupWindow):
scale = (
1.69
if uiscale is bui.UIScale.SMALL
else 1.1
if uiscale is bui.UIScale.MEDIUM
else 0.85
else 1.1 if uiscale is bui.UIScale.MEDIUM else 0.85
)
# Creates our _root_widget.
super().__init__(
@ -285,9 +283,11 @@ class PlayOptionsWindow(PopupWindow):
position=(100, 200 + y_offs + y_offs2),
configkey=(
'FFA' if self._sessiontype is bs.FreeForAllSession else 'Teams'
) + ' Series Length',
)
+ ' Series Length',
displayname=bui.Lstr(
resource=self._r + (
resource=self._r
+ (
'.pointsToWinText'
if self._sessiontype is bs.FreeForAllSession
else '.seriesLengthText'
@ -329,9 +329,9 @@ class PlayOptionsWindow(PopupWindow):
def _cb_callback(val: bool) -> None:
self._do_randomize_val = val
cfg = bui.app.config
cfg[
self._pvars.config_name + ' Playlist Randomize'
] = self._do_randomize_val
cfg[self._pvars.config_name + ' Playlist Randomize'] = (
self._do_randomize_val
)
cfg.commit()
if show_shuffle_check_box: