mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-29 02:23:22 +08:00
Merge pull request #40 from Dliwk/profile-colors-fix
Fixed profile colors in ffa session and a bit cleanup
This commit is contained in:
commit
4bb41535ab
@ -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'
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user