From dd25067271e2538ebafa33a49fed4fd2e1919aec Mon Sep 17 00:00:00 2001 From: Aktanusa Date: Thu, 10 Mar 2016 19:48:42 -0500 Subject: [PATCH] Updated README, added option to change bulk buildings colors between the single buildings colors or calculated colors (Issue #59 and #63) --- CookieMonster.js | 8 +++++--- README.md | 2 +- src/Config.js | 1 + src/Disp.js | 5 +++-- src/Main.js | 2 +- 5 files changed, 11 insertions(+), 7 deletions(-) diff --git a/CookieMonster.js b/CookieMonster.js index de50e13..3f821bd 100644 --- a/CookieMonster.js +++ b/CookieMonster.js @@ -349,6 +349,7 @@ CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Build CM.ConfigData.TimerBar = {label: ['Timer Bar OFF', 'Timer Bar ON'], desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy', toggle: true, func: function() {CM.Disp.ToggleTimerBar();}}; CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', toggle: false, func: function() {CM.Disp.ToggleTimerBarPos();}}; CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', toggle: true, func: function() {CM.Disp.UpdateBuildings();}}; +CM.ConfigData.BulkBuildColor = {label: ['Bulk Building Colors (Single Buildings Color)', 'Bulk Building Colors (Calculated Color)'], desc: 'Color code bulk buildings based on single buildings color or calculated bulk value color', toggle: false, func: function() {CM.Disp.UpdateBuildings();}}; CM.ConfigData.UpBarColor = {label: ['Upgrade Bar/Colors OFF', 'Upgrade Bar/Colors ON'], desc: 'Color code upgrades and add a counter', toggle: true, func: function() {CM.Disp.ToggleUpBarColor();}}; CM.ConfigData.Colors = {desc: {Blue: 'Color Blue. Used to show better than best ROI building, for Click Frenzy bar, and for various labels', Green: 'Color Green. Used to show best ROI building, for Blood Frenzy bar, and for various labels', Yellow: 'Color Yellow. Used to show between best and worst ROI buildings closer to best, for Frenzy bar, and for various labels', Orange: 'Color Orange. Used to show between best and worst ROI buildings closer to worst, for Next Reindeer bar, and for various labels', Red: 'Color Red. Used to show worst ROI building, for Clot bar, and for various labels', Purple: 'Color Purple. Used to show worse than worst ROI building, for Next Cookie bar, and for various labels', Gray: 'Color Gray. Used to show negative or infinity ROI, and for Next Cookie/Next Reindeer bar', Pink: 'Color Pink. Used for Dragonflight bar', Brown: 'Color Brown. Used for Dragon Harvest bar'}, func: function() {CM.Disp.UpdateColors();}}; CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup', toggle: true}; @@ -828,10 +829,10 @@ CM.Disp.UpdateBotTimerBarDisplay = function() { CM.Disp.UpdateBuildings = function() { if (CM.Config.BuildColor == 1 && Game.buyMode == 1) { var target = ''; - if (Game.buyBulk == 10) { + if (Game.buyBulk == 10 && CM.Config.BulkBuildColor == 1) { target = 'Objects10'; } - else if (Game.buyBulk == 100) { + else if (Game.buyBulk == 100 && CM.Config.BulkBuildColor == 1) { target = 'Objects100'; } else { @@ -1238,6 +1239,7 @@ CM.Disp.AddMenuPref = function(title) { frag.appendChild(listing('TimerBar')); frag.appendChild(listing('TimerBarPos')); frag.appendChild(listing('BuildColor')); + frag.appendChild(listing('BulkBuildColor')); frag.appendChild(listing('UpBarColor')); for (var i = 0; i < CM.Disp.colors.length; i++) { var div = document.createElement('div'); @@ -2293,7 +2295,7 @@ CM.DelayInit = function() { Game.Win('Third-party'); } -CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, UpBarColor: 1, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWarnCautBon: 0, ToolWrink: 1, Stats: 1, UpStats: 1, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; +CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWarnCautBon: 0, ToolWrink: 1, Stats: 1, UpStats: 1, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2'; diff --git a/README.md b/README.md index b24faf3..644d65a 100644 --- a/README.md +++ b/README.md @@ -134,5 +134,5 @@ All suggestions are welcome, even the smallest ones. * **[Alderi Tokori](http://forum.dashnet.org/profile/Alderi)**: ROI calculations (unused now) * **[Alhifar](https://github.com/Alhifar)**: Missed Golden Cookie Stat * **[BlackenedGem](https://github.com/BlackenedGem)**: Golden/Wrath Cookie Favicons -* **[Sandworm](https://github.com/svschouw)**: Modified ROI Calculation to account for cookies in bank already +* **[Sandworm](https://github.com/svschouw)**: Modified ROI calculation * **[Aktanusa](https://github.com/Aktanusa)**: Current maintainer \ No newline at end of file diff --git a/src/Config.js b/src/Config.js index a6ea9ff..6e511bf 100644 --- a/src/Config.js +++ b/src/Config.js @@ -118,6 +118,7 @@ CM.ConfigData.BotBar = {label: ['Bottom Bar OFF', 'Bottom Bar ON'], desc: 'Build CM.ConfigData.TimerBar = {label: ['Timer Bar OFF', 'Timer Bar ON'], desc: 'Timers of Golden Cookie, Season Popup, Frenzy (Normal, Clot, Elder), Click Frenzy', toggle: true, func: function() {CM.Disp.ToggleTimerBar();}}; CM.ConfigData.TimerBarPos = {label: ['Timer Bar Position (Top Left)', 'Timer Bar Position (Bottom)'], desc: 'Placement of the Timer Bar', toggle: false, func: function() {CM.Disp.ToggleTimerBarPos();}}; CM.ConfigData.BuildColor = {label: ['Building Colors OFF', 'Building Colors ON'], desc: 'Color code buildings', toggle: true, func: function() {CM.Disp.UpdateBuildings();}}; +CM.ConfigData.BulkBuildColor = {label: ['Bulk Building Colors (Single Buildings Color)', 'Bulk Building Colors (Calculated Color)'], desc: 'Color code bulk buildings based on single buildings color or calculated bulk value color', toggle: false, func: function() {CM.Disp.UpdateBuildings();}}; CM.ConfigData.UpBarColor = {label: ['Upgrade Bar/Colors OFF', 'Upgrade Bar/Colors ON'], desc: 'Color code upgrades and add a counter', toggle: true, func: function() {CM.Disp.ToggleUpBarColor();}}; CM.ConfigData.Colors = {desc: {Blue: 'Color Blue. Used to show better than best ROI building, for Click Frenzy bar, and for various labels', Green: 'Color Green. Used to show best ROI building, for Blood Frenzy bar, and for various labels', Yellow: 'Color Yellow. Used to show between best and worst ROI buildings closer to best, for Frenzy bar, and for various labels', Orange: 'Color Orange. Used to show between best and worst ROI buildings closer to worst, for Next Reindeer bar, and for various labels', Red: 'Color Red. Used to show worst ROI building, for Clot bar, and for various labels', Purple: 'Color Purple. Used to show worse than worst ROI building, for Next Cookie bar, and for various labels', Gray: 'Color Gray. Used to show negative or infinity ROI, and for Next Cookie/Next Reindeer bar', Pink: 'Color Pink. Used for Dragonflight bar', Brown: 'Color Brown. Used for Dragon Harvest bar'}, func: function() {CM.Disp.UpdateColors();}}; CM.ConfigData.Flash = {label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie/Season Popup', toggle: true}; diff --git a/src/Disp.js b/src/Disp.js index cddb867..660b363 100644 --- a/src/Disp.js +++ b/src/Disp.js @@ -445,10 +445,10 @@ CM.Disp.UpdateBotTimerBarDisplay = function() { CM.Disp.UpdateBuildings = function() { if (CM.Config.BuildColor == 1 && Game.buyMode == 1) { var target = ''; - if (Game.buyBulk == 10) { + if (Game.buyBulk == 10 && CM.Config.BulkBuildColor == 1) { target = 'Objects10'; } - else if (Game.buyBulk == 100) { + else if (Game.buyBulk == 100 && CM.Config.BulkBuildColor == 1) { target = 'Objects100'; } else { @@ -855,6 +855,7 @@ CM.Disp.AddMenuPref = function(title) { frag.appendChild(listing('TimerBar')); frag.appendChild(listing('TimerBarPos')); frag.appendChild(listing('BuildColor')); + frag.appendChild(listing('BulkBuildColor')); frag.appendChild(listing('UpBarColor')); for (var i = 0; i < CM.Disp.colors.length; i++) { var div = document.createElement('div'); diff --git a/src/Main.js b/src/Main.js index 0076180..9fec7ae 100644 --- a/src/Main.js +++ b/src/Main.js @@ -168,7 +168,7 @@ CM.DelayInit = function() { Game.Win('Third-party'); } -CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, UpBarColor: 1, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWarnCautBon: 0, ToolWrink: 1, Stats: 1, UpStats: 1, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; +CM.ConfigDefault = {BotBar: 1, TimerBar: 1, TimerBarPos: 0, BuildColor: 1, BulkBuildColor: 0, UpBarColor: 1, Flash: 1, Sound: 1, Volume: 100, GCSoundURL: 'http://freesound.org/data/previews/66/66717_931655-lq.mp3', SeaSoundURL: 'http://www.freesound.org/data/previews/121/121099_2193266-lq.mp3', GCTimer: 1, Title: 1, Favicon: 1, Tooltip: 1, TooltipAmor: 0, ToolWarnCaut: 1, ToolWarnCautPos: 1, ToolWarnCautBon: 0, ToolWrink: 1, Stats: 1, UpStats: 1, SayTime: 1, Scale: 2, StatsPref: {Lucky: 1, Chain: 1, Prestige: 1, Wrink: 1, Sea: 1, Misc: 1}, Colors : {Blue: '#4bb8f0', Green: '#00ff00', Yellow: '#ffff00', Orange: '#ff7f00', Red: '#ff0000', Purple: '#ff00ff', Gray: '#b3b3b3', Pink: '#ff1493', Brown: '#8b4513'}}; CM.ConfigPrefix = 'CMConfig'; CM.VersionMajor = '2';