From 2d8223d6421eb4ad54aa760da52f574e5343344f Mon Sep 17 00:00:00 2001 From: dsjoerg Date: Fri, 13 Nov 2015 11:15:32 -0500 Subject: [PATCH 1/6] note no Archon mode --- app/views/home/replay_problems.html.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/views/home/replay_problems.html.erb b/app/views/home/replay_problems.html.erb index 63f9502..1ee3ae2 100644 --- a/app/views/home/replay_problems.html.erb +++ b/app/views/home/replay_problems.html.erb @@ -8,8 +8,8 @@

Sorry, we had trouble reading the replays you uploaded.

-

If these were ordinary ladder WoL/HotS Starcraft 2 replay files, please let me know and I'll take a closer look.

-

LotV is not supported, but it will be in time for the official launch.

+

If these were ordinary ladder Starcraft 2 replay files, please let me know and I'll take a closer look.

+

(Note that Archon mode is not supported TT)
















dont click hereor here
From 3c4cf6ffa5ed7ed242af30146464b1a6ddbaae17 Mon Sep 17 00:00:00 2001 From: dsjoerg Date: Tue, 17 Nov 2015 10:11:38 -0500 Subject: [PATCH 2/6] update stats to be for LotV instead of HotS. remove desrow and WCS from main menu --- app/views/home/economy_stats.html | 2 +- app/views/home/economy_stats2.html | 2 +- app/views/layouts/application.html.erb | 2 -- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/app/views/home/economy_stats.html b/app/views/home/economy_stats.html index 5ef4c3a..62098c2 100644 --- a/app/views/home/economy_stats.html +++ b/app/views/home/economy_stats.html @@ -67,7 +67,7 @@

See more about Saturation Speed here.

-

All games are 1v1 HotS Ladder, vs-AI excluded, from May 8, 2013 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

+

All games are 1v1 LotV Ladder, vs-AI excluded, from Nov 9, 2015 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

Stats are updated once per day.

Alternate view: all matchups, one league

diff --git a/app/views/home/economy_stats2.html b/app/views/home/economy_stats2.html index 40a25bc..05e6657 100644 --- a/app/views/home/economy_stats2.html +++ b/app/views/home/economy_stats2.html @@ -66,7 +66,7 @@

See more about Saturation Speed here.

-

All games are 1v1 HotS Ladder, vs-AI excluded, from May 8, 2013 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

+

All games are 1v1 LotV Ladder, vs-AI excluded, from Nov 9, 2015 to {{ es['PvP'][1].retrieval_time | date:'MMM d, y'}}.

Stats are updated once per day.

Alternate view: one matchup, all leagues

diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 2c40ee3..b309504 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -135,8 +135,6 @@ _\%_____/\%_____/\%_____/\%_/ /\%___fx/\%_____/\__/ /\%_____/\__/ /.com_
  • Spending Skill Stats
  • Economy Stats
  • TheStaircase Benchmarks
  • -
  •  Gold Speed Ahead with desRow
  • -
  • WCS matches
  •  
  • Frequently Asked Questions
  • From 7706245151bd92954763723fc4425520adb1af11 Mon Sep 17 00:00:00 2001 From: dsjoerg Date: Wed, 13 Apr 2016 09:04:45 -0400 Subject: [PATCH 3/6] only do setdocdomain when we have an actual hostname, not just an IP address --- app/assets/javascripts/setdocdomain.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/assets/javascripts/setdocdomain.js b/app/assets/javascripts/setdocdomain.js index 388db33..e192408 100644 --- a/app/assets/javascripts/setdocdomain.js +++ b/app/assets/javascripts/setdocdomain.js @@ -1,4 +1,8 @@ // Proxino.log("gg.js domain was " + document.domain); // weird, was ggtracker.com even though script was served via CDN -document.domain = /(\w+)(.\w+)?$/.exec(location.hostname)[0]; +if (location.hostname.match(/^[0-9.]*$/) == null) { + // only set document.domain if our location is a hostname like ggtracker.com or + // ggtracker.test. But if it's an IP address, dont bother. + document.domain = /(\w+)(.\w+)?$/.exec(location.hostname)[0]; +} // Proxino.log("now gg.js domain is " + document.domain); From a3ae4ff35bccddff79d0ff5c7c00f39e3fabca1c Mon Sep 17 00:00:00 2001 From: Anders Nickelsen Date: Sat, 16 Apr 2016 00:14:25 +0200 Subject: [PATCH 4/6] Fix time on lotv army chart. --- .../javascripts/angular/controllers/match.js | 2 +- .../javascripts/angular/directives/armychart.js | 4 ++-- app/assets/javascripts/angular/helpers/sc2.js | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/app/assets/javascripts/angular/controllers/match.js b/app/assets/javascripts/angular/controllers/match.js index fbc359a..e3737d2 100644 --- a/app/assets/javascripts/angular/controllers/match.js +++ b/app/assets/javascripts/angular/controllers/match.js @@ -44,7 +44,7 @@ function($scope, $window, $route, $location, $element, Match) { // console.log("matchscope", $scope); $scope.$watch('current_frame', function(v) { if(v) { - $scope.current_time = Sc2.frameToTime(v); + $scope.current_time = Sc2.frameToTime(v, $scope.match.expansion); $scope.time_has_been_set = true } }); diff --git a/app/assets/javascripts/angular/directives/armychart.js b/app/assets/javascripts/angular/directives/armychart.js index ea790bd..fc01823 100644 --- a/app/assets/javascripts/angular/directives/armychart.js +++ b/app/assets/javascripts/angular/directives/armychart.js @@ -115,7 +115,7 @@ gg.directive('armychart', ['$location', '$timeout', function($location, $timeout scope.freeze = function(frame, updateURL) { switch(typeof frame) { case "number": frame = frame; break; - case "string": frame = Sc2.timeToFrame(frame); break; + case "string": frame = Sc2.timeToFrame(frame, scope.match.expansion); break; default: return false; } @@ -162,7 +162,7 @@ gg.directive('armychart', ['$location', '$timeout', function($location, $timeout if(typeof e == "number") { frame = e; } else if(typeof e == "string") { - frame = Sc2.timeToFrame(e); + frame = Sc2.timeToFrame(e, scope.match.expansion); } else { // If clicked on the background, we have xAxis on the event, if clicked // on a series, we'll have the point. diff --git a/app/assets/javascripts/angular/helpers/sc2.js b/app/assets/javascripts/angular/helpers/sc2.js index e9e4233..0a27c9a 100644 --- a/app/assets/javascripts/angular/helpers/sc2.js +++ b/app/assets/javascripts/angular/helpers/sc2.js @@ -258,9 +258,13 @@ for (var expansion_tag in Sc2.armyUnits) { // I'd rather stuff these here, than in Match -Sc2.frameToTime = function(frame) { - minute = Math.floor(frame / (60 * 16)); - second = Math.floor((frame / 16) % 60).toString(); +Sc2.frameToTime = function(frame, expansion) { + fps = 16; + if (expansion >= 2) { + fps *= 1.4; + } + minute = Math.floor(frame / (60 * fps)); + second = Math.floor((frame / fps) % 60).toString(); if (second.length < 2) { second = "0" + second; } @@ -271,7 +275,11 @@ Sc2.timeToFrame = function(time) { parts = time.split(':'); seconds = parseInt(parts[parts.length-1]); minutes = parseInt(parts[parts.length-2]); - frame = ((minutes*60) + seconds) * 16; + fps = 16; + if (expansion >= 2) { + fps *= 1.4; + } + frame = ((minutes*60) + seconds) * fps; return frame; } From f86d0d6a2a7c768ba1bab7b66f1b50b3a94a829b Mon Sep 17 00:00:00 2001 From: dsjoerg Date: Sun, 17 Apr 2016 15:01:59 -0400 Subject: [PATCH 5/6] fix time handling for the below-charts that come from periodic tracker events --- app/assets/javascripts/angular/helpers/sc2.js | 19 ++++++++++++++----- .../javascripts/angular/resources/match.js | 6 +++++- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/app/assets/javascripts/angular/helpers/sc2.js b/app/assets/javascripts/angular/helpers/sc2.js index e9e4233..dcc36bd 100644 --- a/app/assets/javascripts/angular/helpers/sc2.js +++ b/app/assets/javascripts/angular/helpers/sc2.js @@ -256,11 +256,15 @@ for (var expansion_tag in Sc2.armyUnits) { } } -// I'd rather stuff these here, than in Match +Sc2.LOTV_SPEEDUP = 1.4; -Sc2.frameToTime = function(frame) { - minute = Math.floor(frame / (60 * 16)); - second = Math.floor((frame / 16) % 60).toString(); +Sc2.frameToTime = function(frame, expansion) { + fps = 16; + if (expansion >= 2) { + fps *= Sc2.LOTV_SPEEDUP; + } + minute = Math.floor(frame / (60 * fps)); + second = Math.floor((frame / fps) % 60).toString(); if (second.length < 2) { second = "0" + second; } @@ -271,7 +275,11 @@ Sc2.timeToFrame = function(time) { parts = time.split(':'); seconds = parseInt(parts[parts.length-1]); minutes = parseInt(parts[parts.length-2]); - frame = ((minutes*60) + seconds) * 16; + fps = 16; + if (expansion >= 2) { + fps *= Sc2.LOTV_SPEEDUP; + } + frame = ((minutes*60) + seconds) * fps; return frame; } @@ -282,3 +290,4 @@ Sc2.armyInfo = function(expansion_tag, unitname, infonum) { Sc2.isArmyUnit = function(unitname) { return (unitname in Sc2.armyUnits['LotV']); } + diff --git a/app/assets/javascripts/angular/resources/match.js b/app/assets/javascripts/angular/resources/match.js index 7a795d1..3826be5 100644 --- a/app/assets/javascripts/angular/resources/match.js +++ b/app/assets/javascripts/angular/resources/match.js @@ -568,10 +568,14 @@ gg.factory('Match', ['$ggResource', '$compile', 'Matchnote', function($ggResourc statx = function(statarray) { result = []; + seconds_between_stat_updates = 10.0; + if (this.expansion_tag == 'LotV') { + seconds_between_stat_updates /= Sc2.LOTV_SPEEDUP; + } now_seconds = 0; _.each(statarray, function(stat) { result.push([now_seconds / 60.0, stat]); - now_seconds = now_seconds + 10.0; + now_seconds = now_seconds + seconds_between_stat_updates; }); // console.log("statarray", result); return result; From 43df33edcc7eaf4c50f98871a02dbc251ba19fc9 Mon Sep 17 00:00:00 2001 From: dsjoerg Date: Tue, 19 Apr 2016 09:30:22 -0400 Subject: [PATCH 6/6] update descrip of econ stats --- app/views/home/econ_staircase.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/home/econ_staircase.html b/app/views/home/econ_staircase.html index d2c5d6a..329ab27 100644 --- a/app/views/home/econ_staircase.html +++ b/app/views/home/econ_staircase.html @@ -51,7 +51,7 @@

    See more about TheStaircase and Saturation Speed.

    -

    Games are 1v1 HotS Ladder, vs-AI excluded, from May 8, 2013 to {{ es['now'] | date:'MMM d, y'}}.

    +

    Games are 1v1 LotV Ladder, vs-AI excluded, over the past 180 days.

    Benchmarks are set by calculating the median time for the given matchup and league. The times are then adjusted to the best-fit line from Silver to Masters using a standard least-squares regression. (In the rare case when the best-fit line slopes the wrong way, we use the Masters time for all leagues)

    Stats are updated once per day.