Show in title if GC/Reindeer can spawn #73
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -151,7 +151,7 @@ CM.Data.Config.AvgClicksHist = {type: 'bool', group: 'Calculation', label: ['Ave
|
||||
CM.Data.Config.ToolWarnBon = {type: 'bool', group: 'Calculation', label: ['Calculate Tooltip Warning With Bonus CPS OFF', 'Calculate Tooltip Warning With Bonus CPS ON'], desc: 'Calculate the warning with or without the bonus CPS you get from buying', toggle: true};
|
||||
|
||||
// Notification
|
||||
CM.Data.Config.Title = {type: 'bool', group: 'NotificationGeneral', label: ['Title OFF', 'Title ON', 'Title Pinned Tab Highlight'], desc: 'Update title with Golden Cookie/Season Popup timers; pinned tab highlight only changes the title when a Golden Cookie/Season Popup spawns', toggle: true};
|
||||
CM.Data.Config.Title = {type: 'bool', group: 'NotificationGeneral', label: ['Title OFF', 'Title ON', 'Title Pinned Tab Highlight'], desc: 'Update title with Golden Cookie/Season Popup timers; pinned tab highlight only changes the title when a Golden Cookie/Season Popup spawns; "!" means that Golden Cookie/Reindeer can spawn', toggle: true};
|
||||
CM.Data.Config.GeneralSound = {type: 'bool', group: 'NotificationGeneral', label: ['Consider Game Volume Setting OFF', 'Consider Game Volume Setting ON'], desc: 'Turning this toggle to "off" makes Cookie Monster no longer consider the volume setting of the base game, allowing mod notifications to play with base game volume turned down', toggle: true};
|
||||
CM.Data.Config.GCNotification = {type: 'bool', group: 'NotificationGC', label: ['Notification OFF', 'Notification ON'], desc: 'Create a notification when Golden Cookie spawns', toggle: true, func: function () {CM.Config.CheckNotificationPermissions(CM.Options.GCNotification);}};
|
||||
CM.Data.Config.GCFlash = {type: 'bool', group: 'NotificationGC', label: ['Flash OFF', 'Flash ON'], desc: 'Flash screen on Golden Cookie', toggle: true};
|
||||
|
||||
17
src/Disp.js
17
src/Disp.js
@@ -1090,11 +1090,11 @@ CM.Disp.UpdateTitle = function() {
|
||||
let titleSP;
|
||||
|
||||
if (CM.Cache.spawnedGoldenShimmer) {
|
||||
if (CM.Cache.spawnedGoldenShimmer.wrath) titleGC = '[W ' + Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps) + ']';
|
||||
else titleGC = '[G ' + Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps) + ']';
|
||||
if (CM.Cache.spawnedGoldenShimmer.wrath) titleGC = `[W${Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps)}]`;
|
||||
else titleGC = `[G${Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps)}]`;
|
||||
}
|
||||
else if (!Game.Has('Golden switch [off]')) {
|
||||
titleGC = '[' + Math.ceil((Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.time) / Game.fps) + ']';
|
||||
titleGC = `[${Number(l('CMTimerBarGCMinBar').textContent) < 0 ? "!" : ""}${Math.ceil((Game.shimmerTypes.golden.maxTime - Game.shimmerTypes.golden.time) / Game.fps)}]`;
|
||||
}
|
||||
else titleGC = '[GS]';
|
||||
|
||||
@@ -1105,9 +1105,10 @@ CM.Disp.UpdateTitle = function() {
|
||||
|
||||
if (Game.season === 'christmas') {
|
||||
addSP = true;
|
||||
if (CM.Main.lastSeasonPopupState) titleSP = '[R ' + Math.ceil(CM.Cache.seasonPopShimmer.life / Game.fps) + ']';
|
||||
if (CM.Main.lastSeasonPopupState) titleSP = `[R${Math.ceil(CM.Cache.seasonPopShimmer.life / Game.fps)}]`;
|
||||
else {
|
||||
titleSP = '[' + Math.ceil((Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time) / Game.fps) + ']';
|
||||
|
||||
titleSP = `[${Number(l('CMTimerBarRenMinBar').textContent) < 0 ? "!" : ""}${Math.ceil((Game.shimmerTypes.reindeer.maxTime - Game.shimmerTypes.reindeer.time) / Game.fps)}]`;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1123,15 +1124,15 @@ CM.Disp.UpdateTitle = function() {
|
||||
let spawn = false;
|
||||
if (CM.Cache.spawnedGoldenShimmer) {
|
||||
spawn = true;
|
||||
if (CM.Cache.spawnedGoldenShimmer.wrath) str += '[W ' + Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps) + ']';
|
||||
else str += '[G ' + Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps) + ']';
|
||||
if (CM.Cache.spawnedGoldenShimmer.wrath) str += `[W${Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps)}]`;
|
||||
else str += `[G${Math.ceil(CM.Cache.spawnedGoldenShimmer.life / Game.fps)}]`;
|
||||
}
|
||||
if (CM.Main.lastTickerFortuneState) {
|
||||
spawn = true;
|
||||
str += '[F]';
|
||||
}
|
||||
if (Game.season === 'christmas' && CM.Main.lastSeasonPopupState) {
|
||||
str += '[R ' + Math.ceil(CM.Cache.seasonPopShimmer.life / Game.fps) + ']';
|
||||
str += `[R${Math.ceil(CM.Cache.seasonPopShimmer.life / Game.fps)}]`;
|
||||
spawn = true;
|
||||
}
|
||||
if (spawn) str += ' - ';
|
||||
|
||||
Reference in New Issue
Block a user