New categorizations: is_premium, tank_type, tank_nation

This commit is contained in:
Jylpah committed 2020-11-27 00:00:58 +02:00
1 parent dc46423048
commit fd81866af8
1 file changed
+14 -8
+14 -8
View File
@@ -127,9 +127,12 @@ class BattleCategorizationList():
'total' : [ 'TOTAL', 'total' ], 'total' : [ 'TOTAL', 'total' ],
'battle_result' : [ 'Result', 'category', [ 'Loss', 'Win', 'Draw']], 'battle_result' : [ 'Result', 'category', [ 'Loss', 'Win', 'Draw']],
'battle_type' : [ 'Battle Type', 'category', [ 'Encounter', 'Supremacy']], 'battle_type' : [ 'Battle Type', 'category', [ 'Encounter', 'Supremacy']],
'tank_tier' : [ 'Tank Tier', 'number' ],
'top_tier' : [ 'Tier', 'category', [ 'Bottom tier', 'Top tier']],
'room_type' : [ 'Battle Mode', 'category', _BATTLE_MODES ], 'room_type' : [ 'Battle Mode', 'category', _BATTLE_MODES ],
'top_tier' : [ 'Tier', 'category', [ 'Bottom tier', 'Top tier']],
'tank_tier' : [ 'Tank Tier', 'number' ],
'is_premium' : [ 'Tank Type', 'category', [ 'Tech tree', 'Premium']],
'tank_type' : [ 'Tank Class', 'category', WG.TANK_TYPE_STR],
'tank_nation' : [ 'Nation', 'category', WG.NATION_STR],
'mastery_badge' : [ 'Battle Medal', 'category', ['-', '3rd Class', '2nd Class', '1st Class', 'Mastery' ]], 'mastery_badge' : [ 'Battle Medal', 'category', ['-', '3rd Class', '2nd Class', '1st Class', 'Mastery' ]],
'team_result' : [ 'Team Result', 'string' ], 'team_result' : [ 'Team Result', 'string' ],
'player_wins' : [ 'Player WR', 'bucket', [ 0, .35, .45, .50, .55, .65], '%' ], 'player_wins' : [ 'Player WR', 'bucket', [ 0, .35, .45, .50, .55, .65], '%' ],
@@ -140,11 +143,11 @@ class BattleCategorizationList():
'enemies_spotted' : [ 'Player Spots', 'number'], 'enemies_spotted' : [ 'Player Spots', 'number'],
'hit_rate' : [ 'Player Hit Rate', 'bucket', [ 0, .25, .5, .6, .7, .8, .9, .95 ], '%' ], 'hit_rate' : [ 'Player Hit Rate', 'bucket', [ 0, .25, .5, .6, .7, .8, .9, .95 ], '%' ],
'pen_rate' : [ 'Player Pen Rate', 'bucket', [ 0, .25, .5, .6, .7, .8, .9, .95 ], '%' ], 'pen_rate' : [ 'Player Pen Rate', 'bucket', [ 0, .25, .5, .6, .7, .8, .9, .95 ], '%' ],
'map_name' : [ 'Map', 'string' ], 'player_name' : [ 'Player', 'string' ],
'tank_name' : [ 'Tank', 'string' ], 'protagonist' : [ 'account_id', 'number' ],
'player_name' : [ 'Player', 'string' ], 'tank_name' : [ 'Tank', 'string' ],
'protagonist' : [ 'account_id', 'number' ], 'map_name' : [ 'Map', 'string' ],
'battle_i' : [ 'Battle #', 'number' ] 'battle_i' : [ 'Battle #', 'number' ]
} }
_categorizations_default = [ _categorizations_default = [
@@ -2123,7 +2126,10 @@ async def read_replay_JSON(replay_json: dict, args : argparse.Namespace) -> dict
tmp['account_id'] = account_id tmp['account_id'] = account_id
tmp['tank_id'] = player['vehicle_descr'] tmp['tank_id'] = player['vehicle_descr']
tmp['tank_tier'] = player_tank_tier tmp['tank_tier'] = player_tank_tier
tmp['tank_name'] = wg.get_tank_data(tmp['tank_id'], 'name') tmp['tank_name'] = wg.get_tank_name(tmp['tank_id'])
tmp['tank_type'] = wg.get_tank_type_id(tmp['tank_id'])
tmp['tank_nation'] = wg.get_tank_nation_id(tmp['tank_id'])
tmp['is_premium'] = int(wg.is_premium(tmp['tank_id']))
tmp['squad_index'] = player['squad_index'] tmp['squad_index'] = player['squad_index']
for key in replay_details_flds: for key in replay_details_flds:
tmp[key] = player[key] tmp[key] = player[key]