mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-25 18:50:56 +02:00
DARKNET: Prevent blocked ram on the "darkweb" server (#2468)
This commit is contained in:
committed by
GitHub
parent
a29f2945c5
commit
6ca7c677a9
@@ -52,11 +52,14 @@ export type DarknetServerOptions = {
|
||||
difficulty: number;
|
||||
depth: number;
|
||||
leftOffset: number;
|
||||
name?: string;
|
||||
preventBlockedRam?: boolean;
|
||||
};
|
||||
|
||||
export const DnetServerBuilder = (options: DarknetServerOptions, name = generateDarknetServerName()): DarknetServer => {
|
||||
export const DnetServerBuilder = (options: DarknetServerOptions): DarknetServer => {
|
||||
const maxRam = 16 * 2 ** Math.floor(options.difficulty / 4);
|
||||
const ramBlock = getRamBlock(maxRam);
|
||||
const ramBlock = options.preventBlockedRam ? 0 : getRamBlock(maxRam);
|
||||
const name = options.name ?? generateDarknetServerName();
|
||||
|
||||
const labDetails = getLabyrinthDetails();
|
||||
const labDifficulty = labDetails.cha;
|
||||
|
||||
Reference in New Issue
Block a user