Add missed GC clicks stat with preference, create a section header for misc stats

This commit is contained in:
Alhifar
2016-02-13 23:36:07 -05:00
parent 348c47e1dc
commit 4dd498cc4d
4 changed files with 26 additions and 2 deletions

View File

@@ -872,6 +872,7 @@ CM.Disp.AddMenuPref = function(title) {
frag.appendChild(header('Statistics'));
frag.appendChild(listing('Stats'));
frag.appendChild(listing('MissedGCs'));
frag.appendChild(listing('UpStats'));
frag.appendChild(listing('SayTime'));
@@ -1199,6 +1200,16 @@ CM.Disp.AddMenuStats = function(title) {
choEggTotal *= 0.05;
stats.appendChild(listing(choEggTitleFrag, document.createTextNode(Beautify(choEggTotal))));
}
var miscStatsNeeded = CM.Config.MissedGCs; //meaningless for now, only matters if extra misc stats are added
if (miscStatsNeeded) {
stats.appendChild(header('Misc Stats', 'Misc'));
if (CM.Config.StatsPref.Misc) {
if (CM.Config.MissedGCs) {
stats.appendChild(listing('Missed Golden Cookies', document.createTextNode(Beautify(Game.missedGoldenClicks))));
}
}
}
}
}