From a3f9a5c21ea0b8e9a6350c8f002684d2cb2e0098 Mon Sep 17 00:00:00 2001 From: Caldwell <115591472+Caldwell-74@users.noreply.github.com> Date: Wed, 24 Apr 2024 02:00:28 +0200 Subject: [PATCH] update and fix (#1225) Co-authored-by: Caldwell <15591472+Caldwell-74@users.noreply.github.com> --- markdown/bitburner.corporation.md | 1 + .../bitburner.corporation.selldivision.md | 28 +++++++++++++++++++ .../Sleeve/Work/SleeveInfiltrateWork.ts | 7 +++++ 3 files changed, 36 insertions(+) create mode 100644 markdown/bitburner.corporation.selldivision.md diff --git a/markdown/bitburner.corporation.md b/markdown/bitburner.corporation.md index 7b34ad02e..123f6aa02 100644 --- a/markdown/bitburner.corporation.md +++ b/markdown/bitburner.corporation.md @@ -41,5 +41,6 @@ export interface Corporation extends WarehouseAPI, OfficeAPI | [levelUpgrade(upgradeName)](./bitburner.corporation.levelupgrade.md) | Level an upgrade. | | [nextUpdate()](./bitburner.corporation.nextupdate.md) | Sleep until the next Corporation update has happened. | | [purchaseUnlock(upgradeName)](./bitburner.corporation.purchaseunlock.md) | Unlock an upgrade | +| [sellDivision(divisionName)](./bitburner.corporation.selldivision.md) | Sell a division | | [sellShares(amount)](./bitburner.corporation.sellshares.md) | Sell Shares. Transfer shares from the CEO to public traders to receive money in the player's wallet. | diff --git a/markdown/bitburner.corporation.selldivision.md b/markdown/bitburner.corporation.selldivision.md new file mode 100644 index 000000000..6b041c1d7 --- /dev/null +++ b/markdown/bitburner.corporation.selldivision.md @@ -0,0 +1,28 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [sellDivision](./bitburner.corporation.selldivision.md) + +## Corporation.sellDivision() method + +Sell a division + +**Signature:** + +```typescript +sellDivision(divisionName: string): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| divisionName | string | Name of the division | + +**Returns:** + +void + +## Remarks + +RAM cost: 20 GB + diff --git a/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts b/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts index ac02da50a..d7e940906 100644 --- a/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts +++ b/src/PersonObjects/Sleeve/Work/SleeveInfiltrateWork.ts @@ -34,6 +34,13 @@ export class SleeveInfiltrateWork extends SleeveWorkClass { this.nextCompletionPair.promise = new Promise((r) => (this.nextCompletionPair.resolve = r)); return this.nextCompletionPair.promise; } + finish() { + if (this.nextCompletionPair.resolve) { + this.nextCompletionPair.resolve(); + this.nextCompletionPair.resolve = null; + this.nextCompletionPair.promise = null; + } + } APICopy() { return {