File tree Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Expand file tree Collapse file tree 3 files changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -1051,12 +1051,11 @@ def load_players(self):
1051
1051
1052
1052
# Economic Breakdown Tab
1053
1053
if isinstance (player .income_graph , Graph ):
1054
- # TODO: Is this algorithm right?
1055
1054
values = player .income_graph .values
1056
- player .income_rate = sum (values )/ len (values )
1055
+ player .resource_collection_rate = sum (values )/ len (values )
1057
1056
else :
1058
1057
# In old s2gs files the field with this name was actually a number not a graph
1059
- player .income_rate = player .income_graph
1058
+ player .resource_collection_rate = player .income_graph
1060
1059
player .income_graph = None
1061
1060
1062
1061
player .avg_unspent_resources = stats .get ('Average Unspent Resources' , None )
Original file line number Diff line number Diff line change 12
12
13
13
def test_a_WoL_s2gs ():
14
14
summary = sc2reader .load_game_summary ("test_s2gs/s2gs1.s2gs" )
15
+ assert summary .players [0 ].resource_collection_rate == 1276
15
16
16
17
def test_a_HotS_s2gs ():
17
18
summary = sc2reader .load_game_summary ("test_s2gs/hots1.s2gs" )
19
+ assert summary .players [0 ].resource_collection_rate == 1599
You can’t perform that action at this time.
0 commit comments