mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
Actually format + lint
This commit is contained in:
parent
7a384d53f4
commit
e192ad53ec
@ -202,7 +202,7 @@ const base: InternalAPI<NS> = {
|
||||
},
|
||||
sleep:
|
||||
(ctx) =>
|
||||
async (_time = 0) => {
|
||||
(_time = 0) => {
|
||||
const time = helpers.number(ctx, "time", _time);
|
||||
if (time === undefined) {
|
||||
throw helpers.makeRuntimeErrorMsg(ctx, "Takes 1 argument.");
|
||||
@ -212,15 +212,16 @@ const base: InternalAPI<NS> = {
|
||||
return Promise.resolve(true);
|
||||
});
|
||||
},
|
||||
asleep: (ctx) =>
|
||||
function (_time = 0) {
|
||||
asleep:
|
||||
(ctx) =>
|
||||
(_time = 0) => {
|
||||
const time = helpers.number(ctx, "time", _time);
|
||||
helpers.log(ctx, () => `Sleeping for ${time} milliseconds`);
|
||||
return new Promise((resolve) => setTimeout(() => resolve(true), time));
|
||||
},
|
||||
grow:
|
||||
(ctx) =>
|
||||
async (_hostname, opts = {}) => {
|
||||
(_hostname, opts = {}) => {
|
||||
const hostname = helpers.string(ctx, "hostname", _hostname);
|
||||
const optsValidator: BasicHGWOptions = {};
|
||||
assertObjectType(ctx, "opts", opts, optsValidator);
|
||||
@ -384,7 +385,7 @@ const base: InternalAPI<NS> = {
|
||||
const coreBonus = 1 + (cores - 1) / 16;
|
||||
return CONSTANTS.ServerWeakenAmount * threads * coreBonus * BitNodeMultipliers.ServerWeakenRate;
|
||||
},
|
||||
share: (ctx) => async (): Promise<void> => {
|
||||
share: (ctx) => () => {
|
||||
helpers.log(ctx, () => "Sharing this computer.");
|
||||
const end = StartSharing(
|
||||
ctx.workerScript.scriptRef.threads * calculateIntelligenceBonus(Player.skills.intelligence, 2),
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user