group initializers

This commit is contained in:
Snarling 2022-10-01 15:49:23 -04:00
parent 94a8c7ca64
commit ab56d18e1e
2 changed files with 3 additions and 4 deletions

@ -1,11 +1,13 @@
import React from "react";
import { SourceFile } from "./SourceFile";
import { IMap } from "../types";
import { initBitNodes } from "../BitNode/BitNode";
import { initBitNodes, initBitNodeMultipliers } from "../BitNode/BitNode";
export const SourceFiles: IMap<SourceFile> = {};
/** Engine initializer for SourceFiles, BitNodes, and BitNodeMultipliers. Run once at engine load. */
export function initSourceFiles() {
initBitNodes();
initBitNodeMultipliers();
SourceFiles["SourceFile1"] = new SourceFile(
1,
(

@ -4,7 +4,6 @@
import { convertTimeMsToTimeElapsedString } from "./utils/StringHelperFunctions";
import { initAugmentations } from "./Augmentation/AugmentationHelpers";
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
import { initBitNodeMultipliers } from "./BitNode/BitNode";
import { initSourceFiles } from "./SourceFile/SourceFiles";
import { initDarkWebItems } from "./DarkWeb/DarkWebItems";
import { generateRandomContract } from "./CodingContractGenerator";
@ -232,7 +231,6 @@ const Engine: {
if (loadGame(saveString)) {
ThemeEvents.emit();
initSourceFiles();
initBitNodeMultipliers();
initDarkWebItems();
initAugmentations(); // Also calls Player.reapplyAllAugmentations()
Player.reapplyAllSourceFiles();
@ -372,7 +370,6 @@ const Engine: {
} else {
// No save found, start new game
initSourceFiles();
initBitNodeMultipliers();
initDarkWebItems();
Engine.start(); // Run main game loop and Scripts loop
Player.init();