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,17 @@
/* eslint-disable no-unused-vars */
import { SimAchievements, SimAchievementsOwned } from '../VariablesAndData';
/**
* This function "wins" an achievement in the current sim data
* It functions similarly to Game.Win()
* It is not created by CM.Sim.CreateSimFunctions() in order to avoid spamming pop-ups upon winning
* @param {string} what Name of the achievement
*/
export default function SimWin(what) {
if (SimAchievements[what]) {
if (SimAchievements[what].won === 0) {
SimAchievements[what].won = 1;
if (Game.Achievements[what].pool !== 'shadow') SimAchievementsOwned++;
}
}
}