Fixed break when Temple is not loaded

This commit is contained in:
Daniël van Noord
2021-04-04 22:15:05 +02:00
parent 90be659c13
commit 86678b0871
4 changed files with 4 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -17,6 +17,7 @@ import {
* @returns {number} CM.Sim.cookiesPs - Game.cookiesPs The bonus cps and the price of the change * @returns {number} CM.Sim.cookiesPs - Game.cookiesPs The bonus cps and the price of the change
*/ */
export default function CalculateChangeGod(god, slot) { export default function CalculateChangeGod(god, slot) {
if (!Game.Objects.Temple.minigameLoaded) return 0;
CopyData(); CopyData();
const { minigame } = Game.Objects.Temple; const { minigame } = Game.Objects.Temple;
const CurrentSlot = minigame.godsById[god].slot; const CurrentSlot = minigame.godsById[god].slot;