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
"""
use_teams = False
use_team_colors = True
use_team_colors = False
_playlist_selection_var = 'Free-for-All Playlist Selection'
_playlist_randomize_var = 'Free-for-All Playlist Randomize'
_playlists_var = 'Free-for-All Playlists'

View File

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