From 1a36b6056568a3a18115d3813c865dc992e2003f Mon Sep 17 00:00:00 2001 From: Cal Corum Date: Mon, 27 Mar 2023 16:48:50 -0500 Subject: [PATCH] Update helpers.py Added new PD graphics --- helpers.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/helpers.py b/helpers.py index b2843f2..b965746 100644 --- a/helpers.py +++ b/helpers.py @@ -64,6 +64,7 @@ IMAGES = { 'mvp-hype': f'{PD_CARD_URL}/mvp.png', 'pack-sta': f'{PD_CARD_URL}/pack-standard.png', 'pack-pre': f'{PD_CARD_URL}/pack-premium.png', + 'pack-mar': f'{PD_CARD_URL}/mario/mario-gauntlet.png', 'mvp': { 'Arizona Diamondbacks': f'{PD_CARD_URL}/mvp/arizona-diamondbacks.gif', 'Atlanta Braves': f'{PD_CARD_URL}/mvp/atlanta-braves.gif', @@ -97,7 +98,8 @@ IMAGES = { 'Texas Rangers': f'{PD_CARD_URL}/mvp/texas-rangers.gif', 'Toronto Blue Jays': f'{PD_CARD_URL}/mvp/toronto-blue-jays.gif', 'Washington Nationals': f'{PD_CARD_URL}/mvp/washington-nationals.gif', - } + }, + 'gauntlets': f'{PD_CARD_URL}/gauntlets.png' } INFIELD_X_CHART = { 'si1': { @@ -1345,7 +1347,7 @@ def get_all_pos(player): all_pos = [] for x in range(1, 8): - if player[f'pos_{x}'] and player[f'pos_{x}'] != 'CP': + if player[f'pos_{x}']: all_pos.append(player[f'pos_{x}']) return all_pos @@ -2539,6 +2541,8 @@ def get_pack_cover(pack): return IMAGES['pack-pre'] elif pack['pack_type']['name'] == 'Standard': return IMAGES['pack-sta'] + elif pack['pack_type']['name'] == 'Mario': + return IMAGES['pack-mar'] else: return None