From 61bba8e299dcb95987f9b27843c2c69c2526b8c9 Mon Sep 17 00:00:00 2001 From: Christophe Marchal Date: Sun, 7 Sep 2014 01:50:10 -0300 Subject: [PATCH] Adding supply cap information I have added a graphic showing the supply. I need to improve variable names in javascript and sperate the graphic for both player. For each player I still have to remove the engagement highlight and put one for supply block. --- app/assets/javascripts/angular/resources/match.js | 13 ++++++++++++- app/views/matches/show.html.erb | 3 +++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/angular/resources/match.js b/app/assets/javascripts/angular/resources/match.js index 7d51600..2ae3c9f 100644 --- a/app/assets/javascripts/angular/resources/match.js +++ b/app/assets/javascripts/angular/resources/match.js @@ -518,6 +518,7 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc replayminerals: {teams: [], entities: []}, replaygas: {teams: [], entities: []}, replayworkers: {teams: [], entities: []}, + replayworkerscap: {teams: [], entities: []}, }; // Generate army chart series from armies? @@ -568,6 +569,14 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc // console.log("statarray", result); return result; } + + supply = function(supplyusage){ + var currentSupply = []; + for (var frame=0; frame workers active + + Supply + <% if @match.summaries? %>