Merge pull request #40 from Dliwk/profile-colors-fix

Fixed profile colors in ffa session and a bit cleanup
This commit is contained in:
Eric Froemling 2020-05-20 19:00:02 -07:00 committed by GitHub
commit 4bb41535ab
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -38,7 +38,7 @@ class FreeForAllSession(MultiTeamSession):
Category: Gameplay Classes Category: Gameplay Classes
""" """
use_teams = False use_teams = False
use_team_colors = True use_team_colors = False
_playlist_selection_var = 'Free-for-All Playlist Selection' _playlist_selection_var = 'Free-for-All Playlist Selection'
_playlist_randomize_var = 'Free-for-All Playlist Randomize' _playlist_randomize_var = 'Free-for-All Playlist Randomize'
_playlists_var = 'Free-for-All Playlists' _playlists_var = 'Free-for-All Playlists'

View File

@ -54,12 +54,12 @@ def get_player_profile_icon(profilename: str) -> str:
icon: str icon: str
try: try:
is_global = bs_config['Player Profiles'][profilename]['global'] is_global = bs_config['Player Profiles'][profilename]['global']
except Exception: except KeyError:
is_global = False is_global = False
if is_global: if is_global:
try: try:
icon = bs_config['Player Profiles'][profilename]['icon'] icon = bs_config['Player Profiles'][profilename]['icon']
except Exception: except KeyError:
icon = _ba.charstr(SpecialChar.LOGO) icon = _ba.charstr(SpecialChar.LOGO)
else: else:
icon = '' icon = ''
@ -84,7 +84,7 @@ def get_player_profile_colors(
try: try:
assert profilename is not None assert profilename is not None
color = profiles[profilename]['color'] color = profiles[profilename]['color']
except Exception: except (KeyError, AssertionError):
# key off name if possible # key off name if possible
if profilename is None: if profilename is None:
# first 6 are bright-ish # first 6 are bright-ish
@ -96,7 +96,7 @@ def get_player_profile_colors(
try: try:
assert profilename is not None assert profilename is not None
highlight = profiles[profilename]['highlight'] highlight = profiles[profilename]['highlight']
except Exception: except (KeyError, AssertionError):
# key off name if possible # key off name if possible
if profilename is None: if profilename is None:
# last 2 are grey and white; ignore those or we # last 2 are grey and white; ignore those or we