mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-29 04:17:05 +02:00
DARKNET: Improve documentation; remove requirement that getBlockedRam and getDepth be called on a darknet server (#2472)
This commit is contained in:
committed by
GitHub
parent
a16706a33b
commit
0eae02adcf
@@ -595,7 +595,6 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
|
||||
(ctx) =>
|
||||
(_host): number => {
|
||||
const targetHost = helpers.string(ctx, "host", _host ?? ctx.workerScript.hostname);
|
||||
expectRunningOnDarknetServer(ctx);
|
||||
const onlineConnectionCheck = getFailureResult(ctx, targetHost);
|
||||
if (!onlineConnectionCheck.success) {
|
||||
return 0;
|
||||
@@ -606,7 +605,6 @@ export function NetscriptDarknet(): InternalAPI<DarknetAPI> {
|
||||
(ctx) =>
|
||||
(_host): number => {
|
||||
const targetHost = helpers.string(ctx, "host", _host ?? ctx.workerScript.hostname);
|
||||
expectRunningOnDarknetServer(ctx);
|
||||
const onlineConnectionCheck = getFailureResult(ctx, targetHost);
|
||||
if (!onlineConnectionCheck.success) {
|
||||
return -1;
|
||||
|
||||
Reference in New Issue
Block a user