mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +01:00
group initializers
This commit is contained in:
parent
94a8c7ca64
commit
ab56d18e1e
@ -1,11 +1,13 @@
|
|||||||
import React from "react";
|
import React from "react";
|
||||||
import { SourceFile } from "./SourceFile";
|
import { SourceFile } from "./SourceFile";
|
||||||
import { IMap } from "../types";
|
import { IMap } from "../types";
|
||||||
import { initBitNodes } from "../BitNode/BitNode";
|
import { initBitNodes, initBitNodeMultipliers } from "../BitNode/BitNode";
|
||||||
|
|
||||||
export const SourceFiles: IMap<SourceFile> = {};
|
export const SourceFiles: IMap<SourceFile> = {};
|
||||||
|
/** Engine initializer for SourceFiles, BitNodes, and BitNodeMultipliers. Run once at engine load. */
|
||||||
export function initSourceFiles() {
|
export function initSourceFiles() {
|
||||||
initBitNodes();
|
initBitNodes();
|
||||||
|
initBitNodeMultipliers();
|
||||||
SourceFiles["SourceFile1"] = new SourceFile(
|
SourceFiles["SourceFile1"] = new SourceFile(
|
||||||
1,
|
1,
|
||||||
(
|
(
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
import { convertTimeMsToTimeElapsedString } from "./utils/StringHelperFunctions";
|
import { convertTimeMsToTimeElapsedString } from "./utils/StringHelperFunctions";
|
||||||
import { initAugmentations } from "./Augmentation/AugmentationHelpers";
|
import { initAugmentations } from "./Augmentation/AugmentationHelpers";
|
||||||
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
import { AugmentationNames } from "./Augmentation/data/AugmentationNames";
|
||||||
import { initBitNodeMultipliers } from "./BitNode/BitNode";
|
|
||||||
import { initSourceFiles } from "./SourceFile/SourceFiles";
|
import { initSourceFiles } from "./SourceFile/SourceFiles";
|
||||||
import { initDarkWebItems } from "./DarkWeb/DarkWebItems";
|
import { initDarkWebItems } from "./DarkWeb/DarkWebItems";
|
||||||
import { generateRandomContract } from "./CodingContractGenerator";
|
import { generateRandomContract } from "./CodingContractGenerator";
|
||||||
@ -232,7 +231,6 @@ const Engine: {
|
|||||||
if (loadGame(saveString)) {
|
if (loadGame(saveString)) {
|
||||||
ThemeEvents.emit();
|
ThemeEvents.emit();
|
||||||
initSourceFiles();
|
initSourceFiles();
|
||||||
initBitNodeMultipliers();
|
|
||||||
initDarkWebItems();
|
initDarkWebItems();
|
||||||
initAugmentations(); // Also calls Player.reapplyAllAugmentations()
|
initAugmentations(); // Also calls Player.reapplyAllAugmentations()
|
||||||
Player.reapplyAllSourceFiles();
|
Player.reapplyAllSourceFiles();
|
||||||
@ -372,7 +370,6 @@ const Engine: {
|
|||||||
} else {
|
} else {
|
||||||
// No save found, start new game
|
// No save found, start new game
|
||||||
initSourceFiles();
|
initSourceFiles();
|
||||||
initBitNodeMultipliers();
|
|
||||||
initDarkWebItems();
|
initDarkWebItems();
|
||||||
Engine.start(); // Run main game loop and Scripts loop
|
Engine.start(); // Run main game loop and Scripts loop
|
||||||
Player.init();
|
Player.init();
|
||||||
|
Loading…
Reference in New Issue
Block a user