Formatting fixes

This commit is contained in:
Aktanusa
2016-02-19 21:26:56 -05:00
parent c03c1c44d7
commit 44447d71c3
4 changed files with 14 additions and 14 deletions

View File

@@ -666,7 +666,7 @@ CM.Disp.ToggleTimerBarPos = function() {
CM.Disp.UpdateTimerBar = function() { CM.Disp.UpdateTimerBar = function() {
if (CM.Config.TimerBar == 1) { if (CM.Config.TimerBar == 1) {
// label width: 83 timer width: 26 div margin: 20 // label width: 83, timer width: 26, div margin: 20
var maxWidth = CM.Disp.TimerBar.offsetWidth - 129; var maxWidth = CM.Disp.TimerBar.offsetWidth - 129;
var count = 0; var count = 0;
@@ -919,13 +919,13 @@ CM.Disp.UpdateUpgrades = function() {
CM.Disp.UpdateColors = function() { CM.Disp.UpdateColors = function() {
var str = ''; var str = '';
for (var i = 0; i < CM.Disp.colors.length; i++) { for (var i = 0; i < CM.Disp.colors.length; i++) {
str += '.' + CM.Disp.colorTextPre + CM.Disp.colors[i] + ' { color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }'; str += '.' + CM.Disp.colorTextPre + CM.Disp.colors[i] + ' { color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }\n';
} }
for (var i = 0; i < CM.Disp.colors.length; i++) { for (var i = 0; i < CM.Disp.colors.length; i++) {
str += '.' + CM.Disp.colorBackPre + CM.Disp.colors[i] + ' { background-color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }'; str += '.' + CM.Disp.colorBackPre + CM.Disp.colors[i] + ' { background-color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }\n';
} }
for (var i = 0; i < CM.Disp.colors.length; i++) { for (var i = 0; i < CM.Disp.colors.length; i++) {
str += '.' + CM.Disp.colorBorderPre + CM.Disp.colors[i] + ' { border: 1px solid ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }'; str += '.' + CM.Disp.colorBorderPre + CM.Disp.colors[i] + ' { border: 1px solid ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }\n';
} }
CM.Disp.Css.textContent = str; CM.Disp.Css.textContent = str;
CM.Disp.UpdateBuildings(); // Class has been already set CM.Disp.UpdateBuildings(); // Class has been already set
@@ -1966,7 +1966,7 @@ CM.Disp.colorOrange = 'Orange';
CM.Disp.colorRed = 'Red'; CM.Disp.colorRed = 'Red';
CM.Disp.colorPurple = 'Purple'; CM.Disp.colorPurple = 'Purple';
CM.Disp.colorGray = 'Gray'; CM.Disp.colorGray = 'Gray';
CM.Disp.colors = [ CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray]; CM.Disp.colors = [CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray];
CM.Disp.lastGoldenCookieState = 'none'; CM.Disp.lastGoldenCookieState = 'none';
CM.Disp.lastAscendState = -1; CM.Disp.lastAscendState = -1;
@@ -2144,7 +2144,7 @@ CM.DelayInit = function() {
CM.Disp.lastAscendState = Game.OnAscend; CM.Disp.lastAscendState = Game.OnAscend;
if (Game.prefs.popups) Game.Popup('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!'); if (Game.prefs.popups) Game.Popup('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!');
else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!','','',1, 1); else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!', '', '', 1, 1);
Game.Win('Third-party'); Game.Win('Third-party');
} }
@@ -2401,7 +2401,7 @@ CM.Sim.CheckOtherAchiev = function() {
if (CM.Sim.Objects[i].amount < Math.min(128, Math.pow(2, (Game.ObjectsById.length - Game.Objects[i].id) - 1))) mathematician = 0; if (CM.Sim.Objects[i].amount < Math.min(128, Math.pow(2, (Game.ObjectsById.length - Game.Objects[i].id) - 1))) mathematician = 0;
} }
if (!CM.Sim.HasAchiev('Base 10')) { if (!CM.Sim.HasAchiev('Base 10')) {
if (CM.Sim.Objects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id)*10) base10 = 0; if (CM.Sim.Objects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id) * 10) base10 = 0;
} }
} }
if (minAmount >= 1) CM.Sim.Win('One with everything'); if (minAmount >= 1) CM.Sim.Win('One with everything');

View File

@@ -328,7 +328,7 @@ CM.Disp.ToggleTimerBarPos = function() {
CM.Disp.UpdateTimerBar = function() { CM.Disp.UpdateTimerBar = function() {
if (CM.Config.TimerBar == 1) { if (CM.Config.TimerBar == 1) {
// label width: 83 timer width: 26 div margin: 20 // label width: 83, timer width: 26, div margin: 20
var maxWidth = CM.Disp.TimerBar.offsetWidth - 129; var maxWidth = CM.Disp.TimerBar.offsetWidth - 129;
var count = 0; var count = 0;
@@ -581,13 +581,13 @@ CM.Disp.UpdateUpgrades = function() {
CM.Disp.UpdateColors = function() { CM.Disp.UpdateColors = function() {
var str = ''; var str = '';
for (var i = 0; i < CM.Disp.colors.length; i++) { for (var i = 0; i < CM.Disp.colors.length; i++) {
str += '.' + CM.Disp.colorTextPre + CM.Disp.colors[i] + ' { color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }'; str += '.' + CM.Disp.colorTextPre + CM.Disp.colors[i] + ' { color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }\n';
} }
for (var i = 0; i < CM.Disp.colors.length; i++) { for (var i = 0; i < CM.Disp.colors.length; i++) {
str += '.' + CM.Disp.colorBackPre + CM.Disp.colors[i] + ' { background-color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }'; str += '.' + CM.Disp.colorBackPre + CM.Disp.colors[i] + ' { background-color: ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }\n';
} }
for (var i = 0; i < CM.Disp.colors.length; i++) { for (var i = 0; i < CM.Disp.colors.length; i++) {
str += '.' + CM.Disp.colorBorderPre + CM.Disp.colors[i] + ' { border: 1px solid ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }'; str += '.' + CM.Disp.colorBorderPre + CM.Disp.colors[i] + ' { border: 1px solid ' + CM.Config.Colors[CM.Disp.colors[i]] + '; }\n';
} }
CM.Disp.Css.textContent = str; CM.Disp.Css.textContent = str;
CM.Disp.UpdateBuildings(); // Class has been already set CM.Disp.UpdateBuildings(); // Class has been already set
@@ -1628,7 +1628,7 @@ CM.Disp.colorOrange = 'Orange';
CM.Disp.colorRed = 'Red'; CM.Disp.colorRed = 'Red';
CM.Disp.colorPurple = 'Purple'; CM.Disp.colorPurple = 'Purple';
CM.Disp.colorGray = 'Gray'; CM.Disp.colorGray = 'Gray';
CM.Disp.colors = [ CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray]; CM.Disp.colors = [CM.Disp.colorBlue, CM.Disp.colorGreen, CM.Disp.colorYellow, CM.Disp.colorOrange, CM.Disp.colorRed, CM.Disp.colorPurple, CM.Disp.colorGray];
CM.Disp.lastGoldenCookieState = 'none'; CM.Disp.lastGoldenCookieState = 'none';
CM.Disp.lastAscendState = -1; CM.Disp.lastAscendState = -1;

View File

@@ -158,7 +158,7 @@ CM.DelayInit = function() {
CM.Disp.lastAscendState = Game.OnAscend; CM.Disp.lastAscendState = Game.OnAscend;
if (Game.prefs.popups) Game.Popup('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!'); if (Game.prefs.popups) Game.Popup('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!');
else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!','','',1, 1); else Game.Notify('Cookie Monster version ' + CM.VersionMajor + '.' + CM.VersionMinor + ' loaded!', '', '', 1, 1);
Game.Win('Third-party'); Game.Win('Third-party');
} }

View File

@@ -244,7 +244,7 @@ CM.Sim.CheckOtherAchiev = function() {
if (CM.Sim.Objects[i].amount < Math.min(128, Math.pow(2, (Game.ObjectsById.length - Game.Objects[i].id) - 1))) mathematician = 0; if (CM.Sim.Objects[i].amount < Math.min(128, Math.pow(2, (Game.ObjectsById.length - Game.Objects[i].id) - 1))) mathematician = 0;
} }
if (!CM.Sim.HasAchiev('Base 10')) { if (!CM.Sim.HasAchiev('Base 10')) {
if (CM.Sim.Objects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id)*10) base10 = 0; if (CM.Sim.Objects[i].amount < (Game.ObjectsById.length - Game.Objects[i].id) * 10) base10 = 0;
} }
} }
if (minAmount >= 1) CM.Sim.Win('One with everything'); if (minAmount >= 1) CM.Sim.Win('One with everything');