@@ -518,6 +518,7 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
518518 replayminerals : { teams : [ ] , entities : [ ] } ,
519519 replaygas : { teams : [ ] , entities : [ ] } ,
520520 replayworkers : { teams : [ ] , entities : [ ] } ,
521+ replayworkerscap : { teams : [ ] , entities : [ ] } ,
521522 } ;
522523
523524 // Generate army chart series from armies?
@@ -568,6 +569,14 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
568569// console.log("statarray", result);
569570 return result ;
570571 }
572+
573+ supply = function ( supplyusage ) {
574+ var currentSupply = [ ] ;
575+ for ( var frame = 0 ; frame < supplyusage . length ; frame ++ ) {
576+ currentSupply . push ( supplyusage [ frame ] [ 0 ] ) ;
577+ }
578+ return currentSupply ;
579+ }
571580
572581 // console.log("in series getter, this.armies = ", this.armies);
573582
@@ -602,6 +611,8 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
602611 this . _series . replayminerals . entities [ _entity ] = $ . extend ( { data : statx ( this . MineralsCurrent [ entity . identity . id ] ) } , base_series ) ;
603612 this . _series . replaygas . entities [ _entity ] = $ . extend ( { data : statx ( this . VespeneCurrent [ entity . identity . id ] ) } , base_series ) ;
604613 this . _series . replayworkers . entities [ _entity ] = $ . extend ( { data : statx ( this . WorkersActiveCount [ entity . identity . id ] ) } , base_series ) ;
614+ this . _series . replayworkerscap . entities [ _entity ] = $ . extend ( { data : statx ( supply ( this . SupplyUsage [ entity . identity . id ] ) ) } , base_series ) ;
615+ console . log ( this . _series . replayworkerscap . entities [ _entity ] ) ;
605616
606617 if ( entity . identity . id in this . MineralsCollectionRate ) {
607618 zippedIncome = _ . zip ( this . MineralsCollectionRate [ entity . identity . id ] , this . VespeneCollectionRate [ entity . identity . id ] ) ;
@@ -681,7 +692,7 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc
681692 // Add the team series
682693 for ( var _team in this . teams ) {
683694
684- _keys = [ 'summary_army' , 'summary_income' , 'summary_workersactive' , 'summary_upgradespending' , 'apm' , 'wpm' , 'creep_spread' , 'replayincome' , 'replaygasincome' , 'replaylost' , 'replayminerals' , 'replaygas' , 'replayworkers' , 'replaytotalincome' ] ;
695+ _keys = [ 'summary_army' , 'summary_income' , 'summary_workersactive' , 'summary_upgradespending' , 'apm' , 'wpm' , 'creep_spread' , 'replayincome' , 'replaygasincome' , 'replaylost' , 'replayminerals' , 'replaygas' , 'replayworkers' , 'replayworkerscap' , ' replaytotalincome'] ;
685696 for ( var _stype in _keys ) {
686697 _stype = _keys [ _stype ] ;
687698
0 commit comments