Complete overhaul of code structure and relevant files (#639)

This commit is contained in:
Daniël van Noord
2021-03-14 00:41:14 +01:00
committed by GitHub
parent bb34bce9a5
commit 1bffb58782
163 changed files with 7369 additions and 10882 deletions

View File

@@ -0,0 +1,21 @@
import { SimObjects } from '../VariablesAndData';
/**
* This function checks for the current God level in the sim data
* It functions similarly to Game.hasGod()
* @param {string} what Name of the achievement
*/
export default function SimHasGod(what) {
if (Game.hasGod) {
if (SimObjects.Temple.minigame === undefined) {
SimObjects.Temple.minigame = Game.Objects.Temple.minigame;
}
const god = SimObjects.Temple.minigame.gods[what];
for (let i = 0; i < 3; i++) {
if (SimObjects.Temple.minigame.slot[i] === god.id) {
return i + 1;
}
}
}
return false;
}