File diff suppressed because one or more lines are too long
@@ -80,6 +80,9 @@ class CMAvgQueue {
|
||||
for (let i = this.queue.length - 1; i >= 0 && i > this.queue.length - 1 - timePeriod; i--) {
|
||||
ret += this.queue[i];
|
||||
}
|
||||
if (ret === 0) {
|
||||
return 0;
|
||||
}
|
||||
return ret / timePeriod;
|
||||
}
|
||||
}
|
||||
@@ -346,7 +349,6 @@ CM.Cache.CacheSeaSpec = function () {
|
||||
* @global {number} CM.Cache.HCPerSecond The Heavenly Chips per second in the last five seconds
|
||||
*/
|
||||
CM.Cache.CacheHeavenlyChipsPS = function () {
|
||||
CM.Cache.HCPerSecond = 0; // Mainly there to not throw errors during initialization
|
||||
const currDate = Math.floor(Date.now() / 1000);
|
||||
// Only calculate every new second
|
||||
if ((Game.T / Game.fps) % 1 === 0) {
|
||||
|
||||
@@ -1214,7 +1214,7 @@ CM.Disp.Tooltip = function (type, name) {
|
||||
else if (type === 'ha') l('tooltip').innerHTML = Game.ObjectsById[2].minigame.toolTooltip(1)(); // Harvest all button in garden
|
||||
|
||||
// Adds area for extra tooltip-sections
|
||||
if ((type === 'b' && Game.buyMode === 1) || type === 'u' || type === 's' || type === 'g' || type === 'p' || type === 'ha') {
|
||||
if ((type === 'b' && Game.buyMode === 1) || type === 'u' || type === 's' || type === 'g' || (type === 'p' && !Game.keys[16]) || type === 'ha') {
|
||||
const area = document.createElement('div');
|
||||
area.id = 'CMTooltipArea';
|
||||
l('tooltip').appendChild(area);
|
||||
@@ -1584,7 +1584,7 @@ CM.Disp.UpdateTooltipGrimoire = function () {
|
||||
*/
|
||||
CM.Disp.UpdateTooltipGardenPlots = function () {
|
||||
const minigame = Game.Objects.Farm.minigame;
|
||||
if (CM.Options.TooltipLump && minigame.plot[CM.Disp.tooltipName[1]][CM.Disp.tooltipName[0]][0] !== 0) {
|
||||
if (CM.Options.TooltipPlots && minigame.plot[CM.Disp.tooltipName[1]][CM.Disp.tooltipName[0]][0] !== 0) {
|
||||
const mature = minigame.plot[CM.Disp.tooltipName[1]][CM.Disp.tooltipName[0]][1] > minigame.plantsById[minigame.plot[CM.Disp.tooltipName[1]][CM.Disp.tooltipName[0]][0] - 1].matureBase;
|
||||
const plantName = minigame.plantsById[minigame.plot[CM.Disp.tooltipName[1]][CM.Disp.tooltipName[0]][0] - 1].name;
|
||||
l('CMTooltipBorder').appendChild(CM.Disp.TooltipCreateHeader('Reward (Current / Maximum)'));
|
||||
|
||||
@@ -170,7 +170,7 @@ CM.Main.ReplaceNative = function () {
|
||||
* If the options is 1 (on) bulkPrice is under cookies you can't buy the building.
|
||||
*/
|
||||
Game.ClickProduct = function (what) {
|
||||
if (!CM.Options.BulkBuyBlock || Game.ObjectsById[what].bulkPrice < Game.cookies) {
|
||||
if (!CM.Options.BulkBuyBlock || (Game.ObjectsById[what].bulkPrice < Game.cookies || Game.buyMode === -1)) {
|
||||
CM.Backup.ClickProduct(what);
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user