mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-07 16:13:23 +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
|
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'
|
||||||
|
|||||||
@ -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
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user