diff --git a/dist/bitburner.d.ts b/dist/bitburner.d.ts index 9b6fe3938..302f39b43 100644 --- a/dist/bitburner.d.ts +++ b/dist/bitburner.d.ts @@ -856,13 +856,13 @@ export declare interface Corporation extends WarehouseAPI, OfficeAPI { * Create a Corporation * @param divisionName - Name of the division * @param selfFund - If you should self fund, defaults to true, false will only work on Bitnode 3 - * @returns true if created and false if not + * @returns true if created and false if not */ createCorporation(corporationName: string, selfFund: boolean): boolean; /** * Check if you have a one time unlockable upgrade * @param upgradeName - Name of the upgrade - * @returns true if unlocked and false if not + * @returns true if unlocked and false if not */ hasUnlockUpgrade(upgradeName: string): boolean; /** @@ -958,6 +958,14 @@ export declare interface Corporation extends WarehouseAPI, OfficeAPI { * @param percent - Percent of profit to issue as dividends. */ issueDividends(percent: number): void; + /** + * Buyback Shares + */ + buyBackShares(amt: number): void; + /** + * Sell Shares + */ + sellShares(amt: number): void; } /** @@ -4727,10 +4735,10 @@ export declare interface Product { pCost: number; /** Sell cost, can be "MP+5" */ sCost: string | number; - /** Data refers to the production, sale, and quantity of the products - * These values are specific to a city + /** Data refers to the production, sale, and quantity of the products + * These values are specific to a city * For each city, the data is [qty, prod, sell] */ - cityData: {[key: string]:number[]}; + cityData: { [key: string]: number[] }; /** Creation progress - A number between 0-100 representing percentage */ developmentProgress: number; } @@ -6601,6 +6609,14 @@ export declare interface WarehouseAPI { * @param amt - Amount of material to buy */ buyMaterial(divisionName: string, cityName: string, materialName: string, amt: number): void; + /** + * Set material to bulk buy + * @param divisionName - Name of the division + * @param cityName - Name of the city + * @param materialName - Name of the material + * @param amt - Amount of material to buy + */ + bulkPurchase(divisionName: string, cityName: string, materialName: string, amt: number): void; /** * Get warehouse data * @param divisionName - Name of the division diff --git a/input/bitburner.api.json b/input/bitburner.api.json index 0d49c5fb9..ee34ae265 100644 --- a/input/bitburner.api.json +++ b/input/bitburner.api.json @@ -5464,6 +5464,50 @@ ], "name": "bribe" }, + { + "kind": "MethodSignature", + "canonicalReference": "bitburner!Corporation#buyBackShares:member(1)", + "docComment": "/**\n * Buyback Shares\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "buyBackShares(amt: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "amt", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "buyBackShares" + }, { "kind": "MethodSignature", "canonicalReference": "bitburner!Corporation#createCorporation:member(1)", @@ -6124,6 +6168,50 @@ ], "name": "levelUpgrade" }, + { + "kind": "MethodSignature", + "canonicalReference": "bitburner!Corporation#sellShares:member(1)", + "docComment": "/**\n * Sell Shares\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "sellShares(amt: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "amt", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + } + ], + "name": "sellShares" + }, { "kind": "MethodSignature", "canonicalReference": "bitburner!Corporation#unlockUpgrade:member(1)", @@ -25596,7 +25684,7 @@ }, { "kind": "Content", - "text": "{[key: string]:number[]}" + "text": "{ [key: string]: number[] }" }, { "kind": "Content", @@ -32831,6 +32919,95 @@ "releaseTag": "Public", "name": "WarehouseAPI", "members": [ + { + "kind": "MethodSignature", + "canonicalReference": "bitburner!WarehouseAPI#bulkPurchase:member(1)", + "docComment": "/**\n * Set material to bulk buy\n *\n * @param divisionName - Name of the division\n *\n * @param cityName - Name of the city\n *\n * @param materialName - Name of the material\n *\n * @param amt - Amount of material to buy\n */\n", + "excerptTokens": [ + { + "kind": "Content", + "text": "bulkPurchase(divisionName: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", cityName: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", materialName: " + }, + { + "kind": "Content", + "text": "string" + }, + { + "kind": "Content", + "text": ", amt: " + }, + { + "kind": "Content", + "text": "number" + }, + { + "kind": "Content", + "text": "): " + }, + { + "kind": "Content", + "text": "void" + }, + { + "kind": "Content", + "text": ";" + } + ], + "isOptional": false, + "returnTypeTokenRange": { + "startIndex": 9, + "endIndex": 10 + }, + "releaseTag": "Public", + "overloadIndex": 1, + "parameters": [ + { + "parameterName": "divisionName", + "parameterTypeTokenRange": { + "startIndex": 1, + "endIndex": 2 + } + }, + { + "parameterName": "cityName", + "parameterTypeTokenRange": { + "startIndex": 3, + "endIndex": 4 + } + }, + { + "parameterName": "materialName", + "parameterTypeTokenRange": { + "startIndex": 5, + "endIndex": 6 + } + }, + { + "parameterName": "amt", + "parameterTypeTokenRange": { + "startIndex": 7, + "endIndex": 8 + } + } + ], + "name": "bulkPurchase" + }, { "kind": "MethodSignature", "canonicalReference": "bitburner!WarehouseAPI#buyMaterial:member(1)", diff --git a/markdown/bitburner.corporation.buybackshares.md b/markdown/bitburner.corporation.buybackshares.md new file mode 100644 index 000000000..2d5e31129 --- /dev/null +++ b/markdown/bitburner.corporation.buybackshares.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [buyBackShares](./bitburner.corporation.buybackshares.md) + +## Corporation.buyBackShares() method + +Buyback Shares + +Signature: + +```typescript +buyBackShares(amt: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| amt | number | | + +Returns: + +void + diff --git a/markdown/bitburner.corporation.sellshares.md b/markdown/bitburner.corporation.sellshares.md new file mode 100644 index 000000000..087826e6c --- /dev/null +++ b/markdown/bitburner.corporation.sellshares.md @@ -0,0 +1,24 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [Corporation](./bitburner.corporation.md) > [sellShares](./bitburner.corporation.sellshares.md) + +## Corporation.sellShares() method + +Sell Shares + +Signature: + +```typescript +sellShares(amt: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| amt | number | | + +Returns: + +void + diff --git a/markdown/bitburner.warehouseapi.bulkpurchase.md b/markdown/bitburner.warehouseapi.bulkpurchase.md new file mode 100644 index 000000000..3f55a3cac --- /dev/null +++ b/markdown/bitburner.warehouseapi.bulkpurchase.md @@ -0,0 +1,27 @@ + + +[Home](./index.md) > [bitburner](./bitburner.md) > [WarehouseAPI](./bitburner.warehouseapi.md) > [bulkPurchase](./bitburner.warehouseapi.bulkpurchase.md) + +## WarehouseAPI.bulkPurchase() method + +Set material to bulk buy + +Signature: + +```typescript +bulkPurchase(divisionName: string, cityName: string, materialName: string, amt: number): void; +``` + +## Parameters + +| Parameter | Type | Description | +| --- | --- | --- | +| divisionName | string | Name of the division | +| cityName | string | Name of the city | +| materialName | string | Name of the material | +| amt | number | Amount of material to buy | + +Returns: + +void + diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 6a57f4ff5..c57c9ed37 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -6385,13 +6385,13 @@ export interface Corporation extends WarehouseAPI, OfficeAPI { * Create a Corporation * @param divisionName - Name of the division * @param selfFund - If you should self fund, defaults to true, false will only work on Bitnode 3 - * @returns true if created and false if not + * @returns true if created and false if not */ createCorporation(corporationName: string, selfFund: boolean): boolean; /** * Check if you have a one time unlockable upgrade * @param upgradeName - Name of the upgrade - * @returns true if unlocked and false if not + * @returns true if unlocked and false if not */ hasUnlockUpgrade(upgradeName: string): boolean; /** @@ -6569,10 +6569,10 @@ interface Product { pCost: number; /** Sell cost, can be "MP+5" */ sCost: string | number; - /** Data refers to the production, sale, and quantity of the products - * These values are specific to a city + /** Data refers to the production, sale, and quantity of the products + * These values are specific to a city * For each city, the data is [qty, prod, sell] */ - cityData: {[key: string]:number[]}; + cityData: { [key: string]: number[] }; /** Creation progress - A number between 0-100 representing percentage */ developmentProgress: number; }