Additional fixes for #707

This commit is contained in:
Daniël van Noord committed 2021-04-04 14:04:56 +02:00
1 parent 444462ae53
commit 3f08ed3e2d
7 files changed
+32 -14

No files matched your search

+1 -2
View File
@@ -30,14 +30,13 @@ import CheckMagicMeter from './CheckStates/Grimoire';
import CheckSeasonPopup from './CheckStates/Season';
import CheckTickerFortune from './CheckStates/Ticker';
import CheckWrinklerCount from './CheckStates/Wrinkler';
import { DateAtBeginLoop, LastModCount } from './VariablesAndData';
import { LastModCount } from './VariablesAndData';
/**
* Main loop of Cookie Monster
* CM.init registers it to the "logic" hook provided by the modding api
*/
export default function CMLoopHook() {
DateAtBeginLoop = Date.now();
if (LastAscendState !== Game.OnAscend) {
LastAscendState = Game.OnAscend;
UpdateAscendState();
@@ -13,7 +13,11 @@ import UpdateTooltipLocation from '../../Disp/Tooltips/PositionLocation';
import { CMSayTime, Title } from '../../Disp/VariablesAndData';
import { SimDoSims } from '../../Sim/VariablesAndData';
import ReplaceTooltipUpgrade from '../ReplaceGameElements/TooltipUpgrades';
import { BackupFunctions } from '../VariablesAndData';
import {
BackupFunctions,
CenturyDateAtBeginLoop,
CycliusDateAtBeginLoop,
} from '../VariablesAndData';
import FixMouseY from './FixMouse';
/**
@@ -29,6 +33,8 @@ export default function ReplaceNative() {
Game.CalculateGains = function () {
BackupFunctions.CalculateGains();
SimDoSims = 1;
CycliusDateAtBeginLoop = Date.now();
CenturyDateAtBeginLoop = Date.now();
};
BackupFunctions.tooltip = {};
+6 -3
View File
@@ -22,7 +22,10 @@ export let LastMagicBarFull;
export let CurrSpawnedGoldenCookieState;
export let LastWrinklerCount;
/** Stores the date at the beginning of a Main loop
* Calculations depending on time (God Cyclius) will all use same time
/** Stores the date at Game.CalculateGains for God Cyclius
*/
export let DateAtBeginLoop;
export let CycliusDateAtBeginLoop;
/** Stores the date at Game.CalculateGains for the Century egg
*/
export let CenturyDateAtBeginLoop;