mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-20 13:15:48 +01:00
Remove more execute-on-import code
This commit is contained in:
parent
1ac57d2e48
commit
88e2cdf09c
@ -1,9 +1,10 @@
|
|||||||
import { DarkWebItem } from "./DarkWebItem";
|
import { DarkWebItem } from "./DarkWebItem";
|
||||||
import { IMap } from "../types";
|
import { IMap } from "../types";
|
||||||
import { Programs } from "../Programs/Programs";
|
import { Programs, initPrograms } from "../Programs/Programs";
|
||||||
|
|
||||||
export const DarkWebItems: IMap<DarkWebItem> = {};
|
export const DarkWebItems: IMap<DarkWebItem> = {};
|
||||||
export function initDarkWebItems() {
|
export function initDarkWebItems() {
|
||||||
|
initPrograms();
|
||||||
Object.assign(DarkWebItems, {
|
Object.assign(DarkWebItems, {
|
||||||
BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, "Opens up SSH Ports."),
|
BruteSSHProgram: new DarkWebItem(Programs.BruteSSHProgram.name, 500e3, "Opens up SSH Ports."),
|
||||||
FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, "Opens up FTP Ports."),
|
FTPCrackProgram: new DarkWebItem(Programs.FTPCrackProgram.name, 1500e3, "Opens up FTP Ports."),
|
||||||
|
@ -3,7 +3,8 @@ import { programsMetadata } from "./data/ProgramsMetadata";
|
|||||||
import { IMap } from "../types";
|
import { IMap } from "../types";
|
||||||
|
|
||||||
export const Programs: IMap<Program> = {};
|
export const Programs: IMap<Program> = {};
|
||||||
|
export function initPrograms() {
|
||||||
for (const params of programsMetadata) {
|
for (const params of programsMetadata) {
|
||||||
Programs[params.key] = new Program(params.name, params.create, params.run);
|
Programs[params.key] = new Program(params.name, params.create, params.run);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user