FEATURE: BitNode options (#1411)

This commit is contained in:
catloversg
2024-07-15 04:30:30 +07:00
committed by GitHub
parent 0e1e8a9862
commit 783120c886
71 changed files with 1315 additions and 308 deletions

View File

@@ -1,4 +1,4 @@
import type { Player as IPlayer } from "@nsdefs";
import type { BitNodeOptions, Player as IPlayer } from "@nsdefs";
import type { PlayerAchievement } from "../../Achievements/Achievements";
import type { Bladeburner } from "../../Bladeburner/Bladeburner";
import type { Corporation } from "../../Corporation/Corporation";
@@ -74,6 +74,22 @@ export class PlayerObject extends Person implements IPlayer {
entropy = 0;
bitNodeOptions: BitNodeOptions = {
sourceFileOverrides: new JSONMap<number, number>(),
intelligenceOverride: undefined,
restrictHomePCUpgrade: false,
disableGang: false,
disableCorporation: false,
disableBladeburner: false,
disable4SData: false,
disableHacknetServer: false,
disableSleeveExpAndAugmentation: false,
};
get activeSourceFiles(): JSONMap<number, number> {
return new JSONMap([...this.sourceFiles, ...this.bitNodeOptions.sourceFileOverrides]);
}
// Player-specific methods
init = generalMethods.init;
startWork = workMethods.startWork;
@@ -129,6 +145,7 @@ export class PlayerObject extends Person implements IPlayer {
setBitNodeNumber = generalMethods.setBitNodeNumber;
canAccessCotMG = generalMethods.canAccessCotMG;
sourceFileLvl = generalMethods.sourceFileLvl;
activeSourceFileLvl = generalMethods.activeSourceFileLvl;
applyEntropy = augmentationMethods.applyEntropy;
focusPenalty = generalMethods.focusPenalty;