#NEWLINE# def __init__( self , frames , data , build ) : #NEWLINE# #INDENT# super ( PlayerStatsEvent , self ) . __init__ ( frames ) #NEWLINE# self . pid = data [ 0 ] #NEWLINE# self . player = None #NEWLINE# self . stats = data [ 1 ] #NEWLINE# self . minerals_current = clamp ( self . stats [ 0 ] ) #NEWLINE# self . vespene_current = clamp ( self . stats [ 1 ] ) #NEWLINE# self . minerals_collection_rate = clamp ( self . stats [ 2 ] ) #NEWLINE# self . vespene_collection_rate = clamp ( self . stats [ 3 ] ) #NEWLINE# self . workers_active_count = clamp ( self . stats [ 4 ] ) #NEWLINE# self . minerals_used_in_progress_army = clamp ( self . stats [ 5 ] ) #NEWLINE# self . minerals_used_in_progress_economy = clamp ( self . stats [ 6 ] ) #NEWLINE# self . minerals_used_in_progress_technology = clamp ( self . stats [ 7 ] ) #NEWLINE# self . minerals_used_in_progress = ( ( self . minerals_used_in_progress_army + self . minerals_used_in_progress_economy ) + self . minerals_used_in_progress_technology ) #NEWLINE# self . vespene_used_in_progress_army = clamp ( self . stats [ 8 ] ) #NEWLINE# self . vespene_used_in_progress_economy = clamp ( self . stats [ 9 ] ) #NEWLINE# self . vespene_used_in_progress_technology = clamp ( self . stats [ 10 ] ) #NEWLINE# self . vespene_used_in_progress = ( ( self . vespene_used_in_progress_army + self . vespene_used_in_progress_economy ) + self . vespene_used_in_progress_technology ) #NEWLINE# self . resources_used_in_progress = ( self . minerals_used_in_progress + self . vespene_used_in_progress ) #NEWLINE# self . minerals_used_current_army = clamp ( self . stats [ 11 ] ) #NEWLINE# self . minerals_used_current_economy = clamp ( self . stats [ 12 ] ) #NEWLINE# self . minerals_used_current_technology = clamp ( self . stats [ 13 ] ) #NEWLINE# self . minerals_used_current = ( ( self . minerals_used_current_army + self . minerals_used_current_economy ) + self . minerals_used_current_technology ) #NEWLINE# self . vespene_used_current_army = clamp ( self . stats [ 14 ] ) #NEWLINE# self . vespene_used_current_economy = clamp ( self . stats [ 15 ] ) #NEWLINE# self . vespene_used_current_technology = clamp ( self . stats [ 16 ] ) #NEWLINE# self . vespene_used_current = ( ( self . vespene_used_current_army + self . vespene_used_current_economy ) + self . vespene_used_current_technology ) #NEWLINE# self . resources_used_current = ( self . minerals_used_current + self . vespene_used_current ) #NEWLINE# self . minerals_lost_army = clamp ( self . stats [ 17 ] ) #NEWLINE# self . minerals_lost_economy = clamp ( self . stats [ 18 ] ) #NEWLINE# self . minerals_lost_technology = clamp ( self . stats [ 19 ] ) #NEWLINE# self . minerals_lost = ( ( self . minerals_lost_army + self . minerals_lost_economy ) + self . minerals_lost_technology ) #NEWLINE# self . vespene_lost_army = clamp ( self . stats [ 20 ] ) #NEWLINE# self . vespene_lost_economy = clamp ( self . stats [ 21 ] ) #NEWLINE# self . vespene_lost_technology = clamp ( self . stats [ 22 ] ) #NEWLINE# self . vespene_lost = ( ( self . vespene_lost_army + self . vespene_lost_economy ) + self . vespene_lost_technology ) #NEWLINE# self . resources_lost = ( self . minerals_lost + self . vespene_lost ) #NEWLINE# self . minerals_killed_army = clamp ( self . stats [ 23 ] ) #NEWLINE# self . minerals_killed_economy = clamp ( self . stats [ 24 ] ) #NEWLINE# self . minerals_killed_technology = clamp ( self . stats [ 25 ] ) #NEWLINE# self . minerals_killed = ( ( self . minerals_killed_army + self . minerals_killed_economy ) + self . minerals_killed_technology ) #NEWLINE# self . vespene_killed_army = clamp ( self . stats [ 26 ] ) #NEWLINE# self . vespene_killed_economy = clamp ( self . stats [ 27 ] ) #NEWLINE# self . vespene_killed_technology = clamp ( self . stats [ 28 ] ) #NEWLINE# self . vespene_killed = ( ( self . vespene_killed_army + self . vespene_killed_economy ) + self . vespene_killed_technology ) #NEWLINE# self . resources_killed = ( self . minerals_killed + self . vespene_killed ) #NEWLINE# self . food_used = ( clamp ( self . stats [ 29 ] ) / 4096.0 ) #NEWLINE# self . food_made = ( clamp ( self . stats [ 30 ] ) / 4096.0 ) #NEWLINE# self . minerals_used_active_forces = clamp ( self . stats [ 31 ] ) #NEWLINE# self . vespene_used_active_forces = clamp ( self . stats [ 32 ] ) #NEWLINE# self . ff_minerals_lost_army = ( clamp ( self . stats [ 33 ] ) if ( self >= 26490 ) else None ) #NEWLINE# self . ff_minerals_lost_economy = ( clamp ( self . stats [ 34 ] ) if ( build >= 26490 ) else None ) #NEWLINE# self . ff_minerals_lost_technology = ( clamp ( self . stats [ 35 ] ) if ( build >= 26490 ) else None ) #NEWLINE# self . ff_vespene_lost_army = ( clamp ( self . stats [ 36 ] ) if ( build >= 26490 ) else None ) #NEWLINE# self . ff_vespene_lost_economy = ( clamp ( self . stats [ 37 ] ) if ( build >= 26490 ) else None ) #NEWLINE# self . ff_vespene_lost_technology = ( clamp ( self . stats [ 38 ] ) if ( build >= 26490 ) else None )