From a9cb46606c88a7735a6b5b654ad9fc36dafb40a3 Mon Sep 17 00:00:00 2001 From: catloversg <152669316+catloversg@users.noreply.github.com> Date: Fri, 16 Aug 2024 16:02:23 +0700 Subject: [PATCH] DOCUMENTATION: Update documentation of Corporation API (#1587) --- ...urner.corporation.acceptinvestmentoffer.md | 6 +- markdown/bitburner.corporation.bribe.md | 8 +- .../bitburner.corporation.buybackshares.md | 6 +- ...bitburner.corporation.createcorporation.md | 14 +- markdown/bitburner.corporation.expandcity.md | 6 +- .../bitburner.corporation.expandindustry.md | 6 +- .../bitburner.corporation.getbonustime.md | 6 +- .../bitburner.corporation.getconstants.md | 8 +- .../bitburner.corporation.getcorporation.md | 6 +- markdown/bitburner.corporation.getdivision.md | 6 +- .../bitburner.corporation.getindustrydata.md | 10 +- ...itburner.corporation.getinvestmentoffer.md | 6 +- .../bitburner.corporation.getmaterialdata.md | 10 +- .../bitburner.corporation.getunlockcost.md | 8 +- .../bitburner.corporation.getupgradelevel.md | 8 +- ...tburner.corporation.getupgradelevelcost.md | 8 +- markdown/bitburner.corporation.gopublic.md | 8 +- .../bitburner.corporation.hascorporation.md | 6 +- markdown/bitburner.corporation.hasunlock.md | 6 +- .../bitburner.corporation.issuedividends.md | 6 +- .../bitburner.corporation.issuenewshares.md | 8 +- .../bitburner.corporation.levelupgrade.md | 6 +- markdown/bitburner.corporation.md | 50 +- markdown/bitburner.corporation.nextupdate.md | 10 +- .../bitburner.corporation.purchaseunlock.md | 6 +- .../bitburner.corporation.selldivision.md | 2 +- markdown/bitburner.corporation.sellshares.md | 6 +- markdown/bitburner.officeapi.buytea.md | 6 +- .../bitburner.officeapi.gethireadvertcost.md | 4 + .../bitburner.officeapi.gethireadvertcount.md | 4 + markdown/bitburner.officeapi.getoffice.md | 6 +- ...rner.officeapi.getofficesizeupgradecost.md | 6 +- .../bitburner.officeapi.getresearchcost.md | 8 +- markdown/bitburner.officeapi.hasresearched.md | 6 +- markdown/bitburner.officeapi.hireadvert.md | 4 + markdown/bitburner.officeapi.hireemployee.md | 4 + markdown/bitburner.officeapi.md | 18 +- markdown/bitburner.officeapi.research.md | 6 +- ...itburner.officeapi.setautojobassignment.md | 6 +- markdown/bitburner.officeapi.throwparty.md | 6 +- .../bitburner.officeapi.upgradeofficesize.md | 4 + .../bitburner.warehouseapi.bulkpurchase.md | 6 +- .../bitburner.warehouseapi.buymaterial.md | 6 +- ...urner.warehouseapi.cancelexportmaterial.md | 6 +- ...tburner.warehouseapi.discontinueproduct.md | 4 + .../bitburner.warehouseapi.exportmaterial.md | 6 +- .../bitburner.warehouseapi.getmaterial.md | 8 +- markdown/bitburner.warehouseapi.getproduct.md | 8 +- ...er.warehouseapi.getupgradewarehousecost.md | 10 +- .../bitburner.warehouseapi.getwarehouse.md | 8 +- .../bitburner.warehouseapi.haswarehouse.md | 8 +- ...er.warehouseapi.limitmaterialproduction.md | 6 +- ...ner.warehouseapi.limitproductproduction.md | 6 +- .../bitburner.warehouseapi.makeproduct.md | 6 +- markdown/bitburner.warehouseapi.md | 40 +- ...itburner.warehouseapi.purchasewarehouse.md | 6 +- .../bitburner.warehouseapi.sellmaterial.md | 4 + .../bitburner.warehouseapi.sellproduct.md | 4 + ...urner.warehouseapi.setmaterialmarketta1.md | 8 +- ...urner.warehouseapi.setmaterialmarketta2.md | 8 +- ...burner.warehouseapi.setproductmarketta1.md | 8 +- ...burner.warehouseapi.setproductmarketta2.md | 8 +- .../bitburner.warehouseapi.setsmartsupply.md | 8 +- ...urner.warehouseapi.setsmartsupplyoption.md | 8 +- ...bitburner.warehouseapi.upgradewarehouse.md | 8 +- src/Netscript/RamCostGenerator.ts | 20 +- src/Script/RamCalculations.ts | 2 +- src/Script/RunningScript.ts | 2 +- src/ScriptEditor/NetscriptDefinitions.d.ts | 551 ++++++++++++++---- 69 files changed, 841 insertions(+), 256 deletions(-) diff --git a/markdown/bitburner.corporation.acceptinvestmentoffer.md b/markdown/bitburner.corporation.acceptinvestmentoffer.md index 113dd81ea..f4a2b6708 100644 --- a/markdown/bitburner.corporation.acceptinvestmentoffer.md +++ b/markdown/bitburner.corporation.acceptinvestmentoffer.md @@ -4,7 +4,7 @@ ## Corporation.acceptInvestmentOffer() method -Accept investment based on you companies current valuation +Accept the investment offer. The value of offer is based on current corporation valuation. **Signature:** @@ -15,9 +15,9 @@ acceptInvestmentOffer(): boolean; boolean -An offer of investment +true if you successfully accept the offer, false if not ## Remarks -Is based on current valuation and will not honer a specific Offer +RAM cost: 20 GB diff --git a/markdown/bitburner.corporation.bribe.md b/markdown/bitburner.corporation.bribe.md index e5dd26136..03a420d1a 100644 --- a/markdown/bitburner.corporation.bribe.md +++ b/markdown/bitburner.corporation.bribe.md @@ -4,7 +4,7 @@ ## Corporation.bribe() method -Bribe a faction +Bribe a faction. **Signature:** @@ -23,5 +23,9 @@ bribe(factionName: string, amountCash: number): boolean; boolean -True if successful, false if not +true if successful, false if not + +## Remarks + +RAM cost: 20 GB diff --git a/markdown/bitburner.corporation.buybackshares.md b/markdown/bitburner.corporation.buybackshares.md index 6faa0f583..d84f31f6b 100644 --- a/markdown/bitburner.corporation.buybackshares.md +++ b/markdown/bitburner.corporation.buybackshares.md @@ -4,7 +4,7 @@ ## Corporation.buyBackShares() method -Buyback Shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. +Buyback shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. **Signature:** @@ -22,3 +22,7 @@ buyBackShares(amount: number): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.createcorporation.md b/markdown/bitburner.corporation.createcorporation.md index da6be8f27..22f3710a5 100644 --- a/markdown/bitburner.corporation.createcorporation.md +++ b/markdown/bitburner.corporation.createcorporation.md @@ -4,7 +4,7 @@ ## Corporation.createCorporation() method -Create a Corporation +Create a Corporation. **Signature:** @@ -17,7 +17,7 @@ createCorporation(corporationName: string, selfFund: boolean): boolean; | Parameter | Type | Description | | --- | --- | --- | | corporationName | string | Name of the corporation | -| selfFund | boolean | If you should self fund, defaults to true, false will only work on BitNode 3 | +| selfFund | boolean | If you want to self-fund. Defaults to true, false will only work in BitNode 3. | **Returns:** @@ -25,3 +25,13 @@ boolean true if created and false if not +## Remarks + +RAM cost: 20 GB + +This function throws an error if: + +- Try to self-fund outside BitNode 3. + +- Be in a BitNode that has CorporationSoftcap (a BN modifier) less than 0.15. Use [getBitNodeMultipliers](./bitburner.ns.getbitnodemultipliers.md) to get the value of this modifier. + diff --git a/markdown/bitburner.corporation.expandcity.md b/markdown/bitburner.corporation.expandcity.md index bc728e26d..479a993fb 100644 --- a/markdown/bitburner.corporation.expandcity.md +++ b/markdown/bitburner.corporation.expandcity.md @@ -4,7 +4,7 @@ ## Corporation.expandCity() method -Expand to a new city +Expand to a new city. **Signature:** @@ -23,3 +23,7 @@ expandCity(divisionName: string, city: CityName | `${CityName}`): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.expandindustry.md b/markdown/bitburner.corporation.expandindustry.md index 61969295e..6b25c7f96 100644 --- a/markdown/bitburner.corporation.expandindustry.md +++ b/markdown/bitburner.corporation.expandindustry.md @@ -4,7 +4,7 @@ ## Corporation.expandIndustry() method -Expand to a new industry +Expand to a new industry. **Signature:** @@ -23,3 +23,7 @@ expandIndustry(industryType: CorpIndustryName, divisionName: string): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.getbonustime.md b/markdown/bitburner.corporation.getbonustime.md index 2bf3385e1..36285f010 100644 --- a/markdown/bitburner.corporation.getbonustime.md +++ b/markdown/bitburner.corporation.getbonustime.md @@ -4,7 +4,7 @@ ## Corporation.getBonusTime() method -Get bonus time. “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. “Bonus time” makes the game progress faster. +Get bonus time. Bonus time is accumulated when the game is offline or if the game is inactive in the browser. Bonus time makes the corporation progress faster. **Signature:** @@ -17,3 +17,7 @@ number Bonus time for the Corporation mechanic in milliseconds. +## Remarks + +RAM cost: 0 GB + diff --git a/markdown/bitburner.corporation.getconstants.md b/markdown/bitburner.corporation.getconstants.md index 4c571737c..165ec9667 100644 --- a/markdown/bitburner.corporation.getconstants.md +++ b/markdown/bitburner.corporation.getconstants.md @@ -4,7 +4,7 @@ ## Corporation.getConstants() method -Get corporation related constants +Get corporation-related constants. **Signature:** @@ -15,5 +15,9 @@ getConstants(): CorpConstants; [CorpConstants](./bitburner.corpconstants.md) -corporation related constants +Corporation-related constants + +## Remarks + +RAM cost: 0 GB diff --git a/markdown/bitburner.corporation.getcorporation.md b/markdown/bitburner.corporation.getcorporation.md index aba545650..82791194a 100644 --- a/markdown/bitburner.corporation.getcorporation.md +++ b/markdown/bitburner.corporation.getcorporation.md @@ -4,7 +4,7 @@ ## Corporation.getCorporation() method -Get corporation data +Get corporation data. **Signature:** @@ -17,3 +17,7 @@ getCorporation(): CorporationInfo; Corporation data +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.corporation.getdivision.md b/markdown/bitburner.corporation.getdivision.md index 40a891dff..dd47cd1a3 100644 --- a/markdown/bitburner.corporation.getdivision.md +++ b/markdown/bitburner.corporation.getdivision.md @@ -4,7 +4,7 @@ ## Corporation.getDivision() method -Get division data +Get division data. **Signature:** @@ -24,3 +24,7 @@ getDivision(divisionName: string): Division; Division data +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.corporation.getindustrydata.md b/markdown/bitburner.corporation.getindustrydata.md index 7e951fb37..f743ddd9e 100644 --- a/markdown/bitburner.corporation.getindustrydata.md +++ b/markdown/bitburner.corporation.getindustrydata.md @@ -4,7 +4,7 @@ ## Corporation.getIndustryData() method -Get constant industry definition data for a specific industry +Get constant data of an industry. **Signature:** @@ -16,9 +16,15 @@ getIndustryData(industryName: CorpIndustryName): CorpIndustryData; | Parameter | Type | Description | | --- | --- | --- | -| industryName | [CorpIndustryName](./bitburner.corpindustryname.md) | | +| industryName | [CorpIndustryName](./bitburner.corpindustryname.md) | Name of the industry | **Returns:** [CorpIndustryData](./bitburner.corpindustrydata.md) +Industry data + +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.corporation.getinvestmentoffer.md b/markdown/bitburner.corporation.getinvestmentoffer.md index d483edbdd..52eb948b1 100644 --- a/markdown/bitburner.corporation.getinvestmentoffer.md +++ b/markdown/bitburner.corporation.getinvestmentoffer.md @@ -4,7 +4,7 @@ ## Corporation.getInvestmentOffer() method -Get an offer for investment based on you companies current valuation +Get an offer for investment based on current corporation valuation. **Signature:** @@ -17,3 +17,7 @@ getInvestmentOffer(): InvestmentOffer; An offer of investment +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.corporation.getmaterialdata.md b/markdown/bitburner.corporation.getmaterialdata.md index d11ea1372..d6a6008ad 100644 --- a/markdown/bitburner.corporation.getmaterialdata.md +++ b/markdown/bitburner.corporation.getmaterialdata.md @@ -4,7 +4,7 @@ ## Corporation.getMaterialData() method -Get constant data for a specific material +Get constant data of a material. **Signature:** @@ -16,9 +16,15 @@ getMaterialData(materialName: CorpMaterialName): CorpMaterialConstantData; | Parameter | Type | Description | | --- | --- | --- | -| materialName | [CorpMaterialName](./bitburner.corpmaterialname.md) | | +| materialName | [CorpMaterialName](./bitburner.corpmaterialname.md) | Name of the material | **Returns:** [CorpMaterialConstantData](./bitburner.corpmaterialconstantdata.md) +Material data + +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.corporation.getunlockcost.md b/markdown/bitburner.corporation.getunlockcost.md index d879909b0..7bcc58a6e 100644 --- a/markdown/bitburner.corporation.getunlockcost.md +++ b/markdown/bitburner.corporation.getunlockcost.md @@ -4,7 +4,7 @@ ## Corporation.getUnlockCost() method -Gets the cost to unlock a one time unlockable upgrade +Get the cost to unlock a one-time unlockable upgrade. **Signature:** @@ -22,5 +22,9 @@ getUnlockCost(upgradeName: string): number; number -cost of the upgrade +Cost of the upgrade + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.corporation.getupgradelevel.md b/markdown/bitburner.corporation.getupgradelevel.md index ddc26969f..6ee37dec2 100644 --- a/markdown/bitburner.corporation.getupgradelevel.md +++ b/markdown/bitburner.corporation.getupgradelevel.md @@ -4,7 +4,7 @@ ## Corporation.getUpgradeLevel() method -Get the level of a levelable upgrade +Get the level of a levelable upgrade. **Signature:** @@ -22,5 +22,9 @@ getUpgradeLevel(upgradeName: string): number; number -the level of the upgrade +The level of the upgrade + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.corporation.getupgradelevelcost.md b/markdown/bitburner.corporation.getupgradelevelcost.md index fda135c56..4b42ca424 100644 --- a/markdown/bitburner.corporation.getupgradelevelcost.md +++ b/markdown/bitburner.corporation.getupgradelevelcost.md @@ -4,7 +4,7 @@ ## Corporation.getUpgradeLevelCost() method -Gets the cost to unlock the next level of a levelable upgrade +Get the cost to unlock the next level of a levelable upgrade. **Signature:** @@ -22,5 +22,9 @@ getUpgradeLevelCost(upgradeName: string): number; number -cost of the upgrade +Cost of the upgrade + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.corporation.gopublic.md b/markdown/bitburner.corporation.gopublic.md index 44dae0129..2906e2c97 100644 --- a/markdown/bitburner.corporation.gopublic.md +++ b/markdown/bitburner.corporation.gopublic.md @@ -4,7 +4,7 @@ ## Corporation.goPublic() method -Go public +Go public. **Signature:** @@ -16,7 +16,7 @@ goPublic(numShares: number): boolean; | Parameter | Type | Description | | --- | --- | --- | -| numShares | number | number of shares you would like to issue for your IPO | +| numShares | number | Number of shares you would like to issue for your IPO | **Returns:** @@ -24,3 +24,7 @@ boolean true if you successfully go public, false if not +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.hascorporation.md b/markdown/bitburner.corporation.hascorporation.md index 2b938791b..a7e4a1be3 100644 --- a/markdown/bitburner.corporation.hascorporation.md +++ b/markdown/bitburner.corporation.hascorporation.md @@ -15,5 +15,9 @@ hasCorporation(): boolean; boolean -whether the player has a corporation +Whether the player has a corporation + +## Remarks + +RAM cost: 0 GB diff --git a/markdown/bitburner.corporation.hasunlock.md b/markdown/bitburner.corporation.hasunlock.md index ab36b7588..240e989a3 100644 --- a/markdown/bitburner.corporation.hasunlock.md +++ b/markdown/bitburner.corporation.hasunlock.md @@ -4,7 +4,7 @@ ## Corporation.hasUnlock() method -Check if you have a one time unlockable upgrade +Check if you have a one-time unlockable upgrade. **Signature:** @@ -24,3 +24,7 @@ boolean true if unlocked and false if not +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.corporation.issuedividends.md b/markdown/bitburner.corporation.issuedividends.md index 08eb25130..01d1daa8d 100644 --- a/markdown/bitburner.corporation.issuedividends.md +++ b/markdown/bitburner.corporation.issuedividends.md @@ -4,7 +4,7 @@ ## Corporation.issueDividends() method -Issue dividends +Issue dividends. **Signature:** @@ -22,3 +22,7 @@ issueDividends(rate: number): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.issuenewshares.md b/markdown/bitburner.corporation.issuenewshares.md index 650667fc5..34b1efccb 100644 --- a/markdown/bitburner.corporation.issuenewshares.md +++ b/markdown/bitburner.corporation.issuenewshares.md @@ -4,7 +4,7 @@ ## Corporation.issueNewShares() method -Issue new shares +Issue new shares. **Signature:** @@ -16,7 +16,7 @@ issueNewShares(amount?: number): number; | Parameter | Type | Description | | --- | --- | --- | -| amount | number | _(Optional)_ Number of new shares to issue, will be rounded to nearest 10m. Defaults to max amount. | +| amount | number | _(Optional)_ Number of new shares to issue. It will be rounded to nearest 10 million. Defaults to max amount. | **Returns:** @@ -24,3 +24,7 @@ number Amount of funds generated for the corporation. +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.levelupgrade.md b/markdown/bitburner.corporation.levelupgrade.md index 7f6d8dcae..67ed33d46 100644 --- a/markdown/bitburner.corporation.levelupgrade.md +++ b/markdown/bitburner.corporation.levelupgrade.md @@ -4,7 +4,7 @@ ## Corporation.levelUpgrade() method -Level an upgrade. +Level up an upgrade. **Signature:** @@ -22,3 +22,7 @@ levelUpgrade(upgradeName: string): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.md b/markdown/bitburner.corporation.md index 123f6aa02..49cb2eb6d 100644 --- a/markdown/bitburner.corporation.md +++ b/markdown/bitburner.corporation.md @@ -17,30 +17,30 @@ export interface Corporation extends WarehouseAPI, OfficeAPI | Method | Description | | --- | --- | -| [acceptInvestmentOffer()](./bitburner.corporation.acceptinvestmentoffer.md) | Accept investment based on you companies current valuation | -| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | Bribe a faction | -| [buyBackShares(amount)](./bitburner.corporation.buybackshares.md) | Buyback Shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. | -| [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | Create a Corporation | -| [expandCity(divisionName, city)](./bitburner.corporation.expandcity.md) | Expand to a new city | -| [expandIndustry(industryType, divisionName)](./bitburner.corporation.expandindustry.md) | Expand to a new industry | -| [getBonusTime()](./bitburner.corporation.getbonustime.md) | Get bonus time. “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. “Bonus time” makes the game progress faster. | -| [getConstants()](./bitburner.corporation.getconstants.md) | Get corporation related constants | -| [getCorporation()](./bitburner.corporation.getcorporation.md) | Get corporation data | -| [getDivision(divisionName)](./bitburner.corporation.getdivision.md) | Get division data | -| [getIndustryData(industryName)](./bitburner.corporation.getindustrydata.md) | Get constant industry definition data for a specific industry | -| [getInvestmentOffer()](./bitburner.corporation.getinvestmentoffer.md) | Get an offer for investment based on you companies current valuation | -| [getMaterialData(materialName)](./bitburner.corporation.getmaterialdata.md) | Get constant data for a specific material | -| [getUnlockCost(upgradeName)](./bitburner.corporation.getunlockcost.md) | Gets the cost to unlock a one time unlockable upgrade | -| [getUpgradeLevel(upgradeName)](./bitburner.corporation.getupgradelevel.md) | Get the level of a levelable upgrade | -| [getUpgradeLevelCost(upgradeName)](./bitburner.corporation.getupgradelevelcost.md) | Gets the cost to unlock the next level of a levelable upgrade | -| [goPublic(numShares)](./bitburner.corporation.gopublic.md) | Go public | +| [acceptInvestmentOffer()](./bitburner.corporation.acceptinvestmentoffer.md) | Accept the investment offer. The value of offer is based on current corporation valuation. | +| [bribe(factionName, amountCash)](./bitburner.corporation.bribe.md) | Bribe a faction. | +| [buyBackShares(amount)](./bitburner.corporation.buybackshares.md) | Buyback shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. | +| [createCorporation(corporationName, selfFund)](./bitburner.corporation.createcorporation.md) | Create a Corporation. | +| [expandCity(divisionName, city)](./bitburner.corporation.expandcity.md) | Expand to a new city. | +| [expandIndustry(industryType, divisionName)](./bitburner.corporation.expandindustry.md) | Expand to a new industry. | +| [getBonusTime()](./bitburner.corporation.getbonustime.md) | Get bonus time. Bonus time is accumulated when the game is offline or if the game is inactive in the browser. Bonus time makes the corporation progress faster. | +| [getConstants()](./bitburner.corporation.getconstants.md) | Get corporation-related constants. | +| [getCorporation()](./bitburner.corporation.getcorporation.md) | Get corporation data. | +| [getDivision(divisionName)](./bitburner.corporation.getdivision.md) | Get division data. | +| [getIndustryData(industryName)](./bitburner.corporation.getindustrydata.md) | Get constant data of an industry. | +| [getInvestmentOffer()](./bitburner.corporation.getinvestmentoffer.md) | Get an offer for investment based on current corporation valuation. | +| [getMaterialData(materialName)](./bitburner.corporation.getmaterialdata.md) | Get constant data of a material. | +| [getUnlockCost(upgradeName)](./bitburner.corporation.getunlockcost.md) | Get the cost to unlock a one-time unlockable upgrade. | +| [getUpgradeLevel(upgradeName)](./bitburner.corporation.getupgradelevel.md) | Get the level of a levelable upgrade. | +| [getUpgradeLevelCost(upgradeName)](./bitburner.corporation.getupgradelevelcost.md) | Get the cost to unlock the next level of a levelable upgrade. | +| [goPublic(numShares)](./bitburner.corporation.gopublic.md) | Go public. | | [hasCorporation()](./bitburner.corporation.hascorporation.md) | Returns whether the player has a corporation. Does not require API access. | -| [hasUnlock(upgradeName)](./bitburner.corporation.hasunlock.md) | Check if you have a one time unlockable upgrade | -| [issueDividends(rate)](./bitburner.corporation.issuedividends.md) | Issue dividends | -| [issueNewShares(amount)](./bitburner.corporation.issuenewshares.md) | Issue new shares | -| [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. | +| [hasUnlock(upgradeName)](./bitburner.corporation.hasunlock.md) | Check if you have a one-time unlockable upgrade. | +| [issueDividends(rate)](./bitburner.corporation.issuedividends.md) | Issue dividends. | +| [issueNewShares(amount)](./bitburner.corporation.issuenewshares.md) | Issue new shares. | +| [levelUpgrade(upgradeName)](./bitburner.corporation.levelupgrade.md) | Level up an upgrade. | +| [nextUpdate()](./bitburner.corporation.nextupdate.md) | Sleep until the next Corporation update happens. | +| [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.nextupdate.md b/markdown/bitburner.corporation.nextupdate.md index 3057212a3..55374d050 100644 --- a/markdown/bitburner.corporation.nextupdate.md +++ b/markdown/bitburner.corporation.nextupdate.md @@ -4,7 +4,7 @@ ## Corporation.nextUpdate() method -Sleep until the next Corporation update has happened. +Sleep until the next Corporation update happens. **Signature:** @@ -17,16 +17,16 @@ Promise<[CorpStateName](./bitburner.corpstatename.md)> Promise that resolves to the name of the state that was just processed. -I.e. when the state is PURCHASE, it means purchasing has just happened. Note that this is the state just before `getCorporation().state`. - -Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE. - ## Remarks RAM cost: 1 GB The amount of real time spent asleep between updates can vary due to "bonus time" (usually 200 milliseconds - 2 seconds). +If the returned state is X, it means X just happened. + +Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE. + ## Example diff --git a/markdown/bitburner.corporation.purchaseunlock.md b/markdown/bitburner.corporation.purchaseunlock.md index d0a0c06b0..4e718d22c 100644 --- a/markdown/bitburner.corporation.purchaseunlock.md +++ b/markdown/bitburner.corporation.purchaseunlock.md @@ -4,7 +4,7 @@ ## Corporation.purchaseUnlock() method -Unlock an upgrade +Unlock an upgrade. **Signature:** @@ -22,3 +22,7 @@ purchaseUnlock(upgradeName: string): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.corporation.selldivision.md b/markdown/bitburner.corporation.selldivision.md index 6b041c1d7..0ef19e5b4 100644 --- a/markdown/bitburner.corporation.selldivision.md +++ b/markdown/bitburner.corporation.selldivision.md @@ -4,7 +4,7 @@ ## Corporation.sellDivision() method -Sell a division +Sell a division. **Signature:** diff --git a/markdown/bitburner.corporation.sellshares.md b/markdown/bitburner.corporation.sellshares.md index ccd2ac609..05309f8dd 100644 --- a/markdown/bitburner.corporation.sellshares.md +++ b/markdown/bitburner.corporation.sellshares.md @@ -4,7 +4,7 @@ ## Corporation.sellShares() method -Sell Shares. Transfer shares from the CEO to public traders to receive money in the player's wallet. +Sell shares. Transfer shares from the CEO to public traders to receive money in the player's wallet. **Signature:** @@ -22,3 +22,7 @@ sellShares(amount: number): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.buytea.md b/markdown/bitburner.officeapi.buytea.md index 5abc4ec5a..9d7675e0f 100644 --- a/markdown/bitburner.officeapi.buytea.md +++ b/markdown/bitburner.officeapi.buytea.md @@ -4,7 +4,7 @@ ## OfficeAPI.buyTea() method -Buy tea for your employees +Buy tea for your employees. **Signature:** @@ -25,3 +25,7 @@ boolean true if buying tea was successful, false otherwise +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.gethireadvertcost.md b/markdown/bitburner.officeapi.gethireadvertcost.md index ff32ee420..49a585a03 100644 --- a/markdown/bitburner.officeapi.gethireadvertcost.md +++ b/markdown/bitburner.officeapi.gethireadvertcost.md @@ -24,3 +24,7 @@ number The cost to hire AdVert. +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.officeapi.gethireadvertcount.md b/markdown/bitburner.officeapi.gethireadvertcount.md index 41c2e375f..201912e3c 100644 --- a/markdown/bitburner.officeapi.gethireadvertcount.md +++ b/markdown/bitburner.officeapi.gethireadvertcount.md @@ -24,3 +24,7 @@ number Number of times you have hired AdVert. +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.officeapi.getoffice.md b/markdown/bitburner.officeapi.getoffice.md index 2ba2ef7ca..c5de5aa84 100644 --- a/markdown/bitburner.officeapi.getoffice.md +++ b/markdown/bitburner.officeapi.getoffice.md @@ -4,7 +4,7 @@ ## OfficeAPI.getOffice() method -Get data about an office +Get data about an office. **Signature:** @@ -25,3 +25,7 @@ getOffice(divisionName: string, city: CityName | `${CityName}`): Office; Office data +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.officeapi.getofficesizeupgradecost.md b/markdown/bitburner.officeapi.getofficesizeupgradecost.md index ba55c836f..b4123804a 100644 --- a/markdown/bitburner.officeapi.getofficesizeupgradecost.md +++ b/markdown/bitburner.officeapi.getofficesizeupgradecost.md @@ -4,7 +4,7 @@ ## OfficeAPI.getOfficeSizeUpgradeCost() method -Cost to Upgrade office size. +Get the cost to upgrade an office. **Signature:** @@ -26,3 +26,7 @@ number Cost of upgrading the office +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.officeapi.getresearchcost.md b/markdown/bitburner.officeapi.getresearchcost.md index 84195156f..00e3384f6 100644 --- a/markdown/bitburner.officeapi.getresearchcost.md +++ b/markdown/bitburner.officeapi.getresearchcost.md @@ -4,7 +4,7 @@ ## OfficeAPI.getResearchCost() method -Get the cost to unlock research +Get the cost to unlock a research. **Signature:** @@ -23,5 +23,9 @@ getResearchCost(divisionName: string, researchName: string): number; number -cost +Cost + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.officeapi.hasresearched.md b/markdown/bitburner.officeapi.hasresearched.md index 7b775c76e..fc4ed4833 100644 --- a/markdown/bitburner.officeapi.hasresearched.md +++ b/markdown/bitburner.officeapi.hasresearched.md @@ -4,7 +4,7 @@ ## OfficeAPI.hasResearched() method -Gets if you have unlocked a research +Check if you unlocked a research. **Signature:** @@ -25,3 +25,7 @@ boolean true is unlocked, false if not +## Remarks + +RAM cost: 10 GB + diff --git a/markdown/bitburner.officeapi.hireadvert.md b/markdown/bitburner.officeapi.hireadvert.md index 225112cfd..d6f23fbce 100644 --- a/markdown/bitburner.officeapi.hireadvert.md +++ b/markdown/bitburner.officeapi.hireadvert.md @@ -22,3 +22,7 @@ hireAdVert(divisionName: string): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.hireemployee.md b/markdown/bitburner.officeapi.hireemployee.md index 3b617dd73..888f4ed98 100644 --- a/markdown/bitburner.officeapi.hireemployee.md +++ b/markdown/bitburner.officeapi.hireemployee.md @@ -26,3 +26,7 @@ boolean True if an employee was hired, false otherwise +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.md b/markdown/bitburner.officeapi.md index 07e3124f5..ce5bcbabd 100644 --- a/markdown/bitburner.officeapi.md +++ b/markdown/bitburner.officeapi.md @@ -14,23 +14,23 @@ export interface OfficeAPI ## Remarks -requires the Office API upgrade from your corporation. +Requires the Office API upgrade from your corporation. ## Methods | Method | Description | | --- | --- | -| [buyTea(divisionName, city)](./bitburner.officeapi.buytea.md) | Buy tea for your employees | +| [buyTea(divisionName, city)](./bitburner.officeapi.buytea.md) | Buy tea for your employees. | | [getHireAdVertCost(divisionName)](./bitburner.officeapi.gethireadvertcost.md) | Get the cost to hire AdVert. | | [getHireAdVertCount(divisionName)](./bitburner.officeapi.gethireadvertcount.md) | Get the number of times you have hired AdVert. | -| [getOffice(divisionName, city)](./bitburner.officeapi.getoffice.md) | Get data about an office | -| [getOfficeSizeUpgradeCost(divisionName, city, size)](./bitburner.officeapi.getofficesizeupgradecost.md) | Cost to Upgrade office size. | -| [getResearchCost(divisionName, researchName)](./bitburner.officeapi.getresearchcost.md) | Get the cost to unlock research | -| [hasResearched(divisionName, researchName)](./bitburner.officeapi.hasresearched.md) | Gets if you have unlocked a research | +| [getOffice(divisionName, city)](./bitburner.officeapi.getoffice.md) | Get data about an office. | +| [getOfficeSizeUpgradeCost(divisionName, city, size)](./bitburner.officeapi.getofficesizeupgradecost.md) | Get the cost to upgrade an office. | +| [getResearchCost(divisionName, researchName)](./bitburner.officeapi.getresearchcost.md) | Get the cost to unlock a research. | +| [hasResearched(divisionName, researchName)](./bitburner.officeapi.hasresearched.md) | Check if you unlocked a research. | | [hireAdVert(divisionName)](./bitburner.officeapi.hireadvert.md) | Hire AdVert. | | [hireEmployee(divisionName, city, employeePosition)](./bitburner.officeapi.hireemployee.md) | Hire an employee. | -| [research(divisionName, researchName)](./bitburner.officeapi.research.md) | Purchase a research | -| [setAutoJobAssignment(divisionName, city, job, amount)](./bitburner.officeapi.setautojobassignment.md) | Set the auto job assignment for a job | -| [throwParty(divisionName, city, costPerEmployee)](./bitburner.officeapi.throwparty.md) | Throw a party for your employees | +| [research(divisionName, researchName)](./bitburner.officeapi.research.md) | Purchase a research. | +| [setAutoJobAssignment(divisionName, city, job, amount)](./bitburner.officeapi.setautojobassignment.md) | Set the job assignment for a job. | +| [throwParty(divisionName, city, costPerEmployee)](./bitburner.officeapi.throwparty.md) | Throw a party for your employees. | | [upgradeOfficeSize(divisionName, city, size)](./bitburner.officeapi.upgradeofficesize.md) | Upgrade office size. | diff --git a/markdown/bitburner.officeapi.research.md b/markdown/bitburner.officeapi.research.md index 885c0c676..d809497ed 100644 --- a/markdown/bitburner.officeapi.research.md +++ b/markdown/bitburner.officeapi.research.md @@ -4,7 +4,7 @@ ## OfficeAPI.research() method -Purchase a research +Purchase a research. **Signature:** @@ -23,3 +23,7 @@ research(divisionName: string, researchName: string): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.setautojobassignment.md b/markdown/bitburner.officeapi.setautojobassignment.md index 942672cc0..17ad7fa35 100644 --- a/markdown/bitburner.officeapi.setautojobassignment.md +++ b/markdown/bitburner.officeapi.setautojobassignment.md @@ -4,7 +4,7 @@ ## OfficeAPI.setAutoJobAssignment() method -Set the auto job assignment for a job +Set the job assignment for a job. **Signature:** @@ -27,3 +27,7 @@ boolean true if the employee count reached the target amount, false if not +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.throwparty.md b/markdown/bitburner.officeapi.throwparty.md index 430e7edfe..6351d5093 100644 --- a/markdown/bitburner.officeapi.throwparty.md +++ b/markdown/bitburner.officeapi.throwparty.md @@ -4,7 +4,7 @@ ## OfficeAPI.throwParty() method -Throw a party for your employees +Throw a party for your employees. **Signature:** @@ -26,3 +26,7 @@ number Multiplier for morale, or zero on failure +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.officeapi.upgradeofficesize.md b/markdown/bitburner.officeapi.upgradeofficesize.md index e17159c45..f621c9261 100644 --- a/markdown/bitburner.officeapi.upgradeofficesize.md +++ b/markdown/bitburner.officeapi.upgradeofficesize.md @@ -24,3 +24,7 @@ upgradeOfficeSize(divisionName: string, city: CityName | `${CityName}`, size: nu void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.bulkpurchase.md b/markdown/bitburner.warehouseapi.bulkpurchase.md index ce7b37f87..51a00e20a 100644 --- a/markdown/bitburner.warehouseapi.bulkpurchase.md +++ b/markdown/bitburner.warehouseapi.bulkpurchase.md @@ -4,7 +4,7 @@ ## WarehouseAPI.bulkPurchase() method -Set material to bulk buy +Set material to bulk-buy. **Signature:** @@ -25,3 +25,7 @@ bulkPurchase(divisionName: string, city: CityName | `${CityName}`, materialName: void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.buymaterial.md b/markdown/bitburner.warehouseapi.buymaterial.md index 7aa1e0c53..aee9d1b1c 100644 --- a/markdown/bitburner.warehouseapi.buymaterial.md +++ b/markdown/bitburner.warehouseapi.buymaterial.md @@ -4,7 +4,7 @@ ## WarehouseAPI.buyMaterial() method -Set material buy data +Set material buy data. **Signature:** @@ -25,3 +25,7 @@ buyMaterial(divisionName: string, city: CityName | `${CityName}`, materialName: void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.cancelexportmaterial.md b/markdown/bitburner.warehouseapi.cancelexportmaterial.md index 4ccf464d6..a51ace696 100644 --- a/markdown/bitburner.warehouseapi.cancelexportmaterial.md +++ b/markdown/bitburner.warehouseapi.cancelexportmaterial.md @@ -4,7 +4,7 @@ ## WarehouseAPI.cancelExportMaterial() method -Cancel material export +Cancel material export. **Signature:** @@ -32,3 +32,7 @@ cancelExportMaterial( void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.discontinueproduct.md b/markdown/bitburner.warehouseapi.discontinueproduct.md index ae88a1d84..ec1569fa2 100644 --- a/markdown/bitburner.warehouseapi.discontinueproduct.md +++ b/markdown/bitburner.warehouseapi.discontinueproduct.md @@ -23,3 +23,7 @@ discontinueProduct(divisionName: string, productName: string): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.exportmaterial.md b/markdown/bitburner.warehouseapi.exportmaterial.md index a35a0fe3a..7be196587 100644 --- a/markdown/bitburner.warehouseapi.exportmaterial.md +++ b/markdown/bitburner.warehouseapi.exportmaterial.md @@ -4,7 +4,7 @@ ## WarehouseAPI.exportMaterial() method -Set material export data +Set material export data. **Signature:** @@ -34,3 +34,7 @@ exportMaterial( void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.getmaterial.md b/markdown/bitburner.warehouseapi.getmaterial.md index 99b09cd76..628a3eb30 100644 --- a/markdown/bitburner.warehouseapi.getmaterial.md +++ b/markdown/bitburner.warehouseapi.getmaterial.md @@ -4,7 +4,7 @@ ## WarehouseAPI.getMaterial() method -Get material data +Get material data. **Signature:** @@ -24,5 +24,9 @@ getMaterial(divisionName: string, city: CityName | `${CityName}`, materialName: [Material](./bitburner.material.md) -material data +Material data + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.warehouseapi.getproduct.md b/markdown/bitburner.warehouseapi.getproduct.md index 02c014b66..b51e4ea3f 100644 --- a/markdown/bitburner.warehouseapi.getproduct.md +++ b/markdown/bitburner.warehouseapi.getproduct.md @@ -4,7 +4,7 @@ ## WarehouseAPI.getProduct() method -Get product data +Get product data. **Signature:** @@ -24,5 +24,9 @@ getProduct(divisionName: string, cityName: CityName | `${CityName}`, productName [Product](./bitburner.product.md) -product data +Product data + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.warehouseapi.getupgradewarehousecost.md b/markdown/bitburner.warehouseapi.getupgradewarehousecost.md index 37b8199ea..b1629d989 100644 --- a/markdown/bitburner.warehouseapi.getupgradewarehousecost.md +++ b/markdown/bitburner.warehouseapi.getupgradewarehousecost.md @@ -4,7 +4,7 @@ ## WarehouseAPI.getUpgradeWarehouseCost() method -Gets the cost to upgrade a warehouse to the next level +Get the cost to upgrade a warehouse to the next level. **Signature:** @@ -18,11 +18,15 @@ getUpgradeWarehouseCost(divisionName: string, city: CityName | `${CityName}`, am | --- | --- | --- | | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | -| amt | number | _(Optional)_ amount of upgrades. Optional, defaults to 1 | +| amt | number | _(Optional)_ Amount of upgrades. Optional. Defaults to 1. | **Returns:** number -cost to upgrade +Cost to upgrade + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.warehouseapi.getwarehouse.md b/markdown/bitburner.warehouseapi.getwarehouse.md index ecac92576..2845e8f46 100644 --- a/markdown/bitburner.warehouseapi.getwarehouse.md +++ b/markdown/bitburner.warehouseapi.getwarehouse.md @@ -4,7 +4,7 @@ ## WarehouseAPI.getWarehouse() method -Get warehouse data +Get warehouse data. **Signature:** @@ -23,5 +23,9 @@ getWarehouse(divisionName: string, city: CityName | `${CityName}`): Warehouse; [Warehouse](./bitburner.warehouse.md) -warehouse data +Warehouse data + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.warehouseapi.haswarehouse.md b/markdown/bitburner.warehouseapi.haswarehouse.md index 58f3359f8..5cc6827b2 100644 --- a/markdown/bitburner.warehouseapi.haswarehouse.md +++ b/markdown/bitburner.warehouseapi.haswarehouse.md @@ -4,7 +4,7 @@ ## WarehouseAPI.hasWarehouse() method -Check if you have a warehouse in city +Check if you have a warehouse in city. **Signature:** @@ -23,5 +23,9 @@ hasWarehouse(divisionName: string, city: CityName | `${CityName}`): boolean; boolean -true if warehouse is present, false if not +true if warehouse is present, false if not. + +## Remarks + +RAM cost: 10 GB diff --git a/markdown/bitburner.warehouseapi.limitmaterialproduction.md b/markdown/bitburner.warehouseapi.limitmaterialproduction.md index 80974f21f..bf8011508 100644 --- a/markdown/bitburner.warehouseapi.limitmaterialproduction.md +++ b/markdown/bitburner.warehouseapi.limitmaterialproduction.md @@ -4,7 +4,7 @@ ## WarehouseAPI.limitMaterialProduction() method -Limit Material Production. +Limit material production. **Signature:** @@ -30,3 +30,7 @@ limitMaterialProduction( void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.limitproductproduction.md b/markdown/bitburner.warehouseapi.limitproductproduction.md index 0f13d6554..371fdbca2 100644 --- a/markdown/bitburner.warehouseapi.limitproductproduction.md +++ b/markdown/bitburner.warehouseapi.limitproductproduction.md @@ -4,7 +4,7 @@ ## WarehouseAPI.limitProductProduction() method -Limit Product Production. +Limit product production. **Signature:** @@ -25,3 +25,7 @@ limitProductProduction(divisionName: string, city: CityName | `${CityName}`, pro void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.makeproduct.md b/markdown/bitburner.warehouseapi.makeproduct.md index f0a08cd1d..ed2b64ce0 100644 --- a/markdown/bitburner.warehouseapi.makeproduct.md +++ b/markdown/bitburner.warehouseapi.makeproduct.md @@ -4,7 +4,7 @@ ## WarehouseAPI.makeProduct() method -Create a new product +Create a new product. **Signature:** @@ -32,3 +32,7 @@ makeProduct( void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.md b/markdown/bitburner.warehouseapi.md index 947b47d33..6081f5928 100644 --- a/markdown/bitburner.warehouseapi.md +++ b/markdown/bitburner.warehouseapi.md @@ -20,27 +20,27 @@ Requires the Warehouse API upgrade from your corporation. | Method | Description | | --- | --- | -| [bulkPurchase(divisionName, city, materialName, amt)](./bitburner.warehouseapi.bulkpurchase.md) | Set material to bulk buy | -| [buyMaterial(divisionName, city, materialName, amt)](./bitburner.warehouseapi.buymaterial.md) | Set material buy data | -| [cancelExportMaterial(sourceDivision, sourceCity, targetDivision, targetCity, materialName)](./bitburner.warehouseapi.cancelexportmaterial.md) | Cancel material export | +| [bulkPurchase(divisionName, city, materialName, amt)](./bitburner.warehouseapi.bulkpurchase.md) | Set material to bulk-buy. | +| [buyMaterial(divisionName, city, materialName, amt)](./bitburner.warehouseapi.buymaterial.md) | Set material buy data. | +| [cancelExportMaterial(sourceDivision, sourceCity, targetDivision, targetCity, materialName)](./bitburner.warehouseapi.cancelexportmaterial.md) | Cancel material export. | | [discontinueProduct(divisionName, productName)](./bitburner.warehouseapi.discontinueproduct.md) | Discontinue a product. | -| [exportMaterial(sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt)](./bitburner.warehouseapi.exportmaterial.md) | Set material export data | -| [getMaterial(divisionName, city, materialName)](./bitburner.warehouseapi.getmaterial.md) | Get material data | -| [getProduct(divisionName, cityName, productName)](./bitburner.warehouseapi.getproduct.md) | Get product data | -| [getUpgradeWarehouseCost(divisionName, city, amt)](./bitburner.warehouseapi.getupgradewarehousecost.md) | Gets the cost to upgrade a warehouse to the next level | -| [getWarehouse(divisionName, city)](./bitburner.warehouseapi.getwarehouse.md) | Get warehouse data | -| [hasWarehouse(divisionName, city)](./bitburner.warehouseapi.haswarehouse.md) | Check if you have a warehouse in city | -| [limitMaterialProduction(divisionName, city, materialName, qty)](./bitburner.warehouseapi.limitmaterialproduction.md) | Limit Material Production. | -| [limitProductProduction(divisionName, city, productName, qty)](./bitburner.warehouseapi.limitproductproduction.md) | Limit Product Production. | -| [makeProduct(divisionName, city, productName, designInvest, marketingInvest)](./bitburner.warehouseapi.makeproduct.md) | Create a new product | -| [purchaseWarehouse(divisionName, city)](./bitburner.warehouseapi.purchasewarehouse.md) | Purchase warehouse for a new city | +| [exportMaterial(sourceDivision, sourceCity, targetDivision, targetCity, materialName, amt)](./bitburner.warehouseapi.exportmaterial.md) | Set material export data. | +| [getMaterial(divisionName, city, materialName)](./bitburner.warehouseapi.getmaterial.md) | Get material data. | +| [getProduct(divisionName, cityName, productName)](./bitburner.warehouseapi.getproduct.md) | Get product data. | +| [getUpgradeWarehouseCost(divisionName, city, amt)](./bitburner.warehouseapi.getupgradewarehousecost.md) | Get the cost to upgrade a warehouse to the next level. | +| [getWarehouse(divisionName, city)](./bitburner.warehouseapi.getwarehouse.md) | Get warehouse data. | +| [hasWarehouse(divisionName, city)](./bitburner.warehouseapi.haswarehouse.md) | Check if you have a warehouse in city. | +| [limitMaterialProduction(divisionName, city, materialName, qty)](./bitburner.warehouseapi.limitmaterialproduction.md) | Limit material production. | +| [limitProductProduction(divisionName, city, productName, qty)](./bitburner.warehouseapi.limitproductproduction.md) | Limit product production. | +| [makeProduct(divisionName, city, productName, designInvest, marketingInvest)](./bitburner.warehouseapi.makeproduct.md) | Create a new product. | +| [purchaseWarehouse(divisionName, city)](./bitburner.warehouseapi.purchasewarehouse.md) | Purchase warehouse for a new city. | | [sellMaterial(divisionName, city, materialName, amt, price)](./bitburner.warehouseapi.sellmaterial.md) | Set material sell data. | | [sellProduct(divisionName, city, productName, amt, price, all)](./bitburner.warehouseapi.sellproduct.md) | Set product sell data. | -| [setMaterialMarketTA1(divisionName, city, materialName, on)](./bitburner.warehouseapi.setmaterialmarketta1.md) | Set market TA 1 for a material. | -| [setMaterialMarketTA2(divisionName, city, materialName, on)](./bitburner.warehouseapi.setmaterialmarketta2.md) | Set market TA 2 for a material. | -| [setProductMarketTA1(divisionName, productName, on)](./bitburner.warehouseapi.setproductmarketta1.md) | \* Set market TA 1 for a product. | -| [setProductMarketTA2(divisionName, productName, on)](./bitburner.warehouseapi.setproductmarketta2.md) | Set market TA 2 for a product. | -| [setSmartSupply(divisionName, city, enabled)](./bitburner.warehouseapi.setsmartsupply.md) | Set smart supply | -| [setSmartSupplyOption(divisionName, city, materialName, option)](./bitburner.warehouseapi.setsmartsupplyoption.md) | Set whether smart supply uses leftovers before buying | -| [upgradeWarehouse(divisionName, city, amt)](./bitburner.warehouseapi.upgradewarehouse.md) | Upgrade warehouse | +| [setMaterialMarketTA1(divisionName, city, materialName, on)](./bitburner.warehouseapi.setmaterialmarketta1.md) | Set Market-TA1 for a material. | +| [setMaterialMarketTA2(divisionName, city, materialName, on)](./bitburner.warehouseapi.setmaterialmarketta2.md) | Set Market-TA2 for a material. | +| [setProductMarketTA1(divisionName, productName, on)](./bitburner.warehouseapi.setproductmarketta1.md) | Set Market-TA1 for a product. | +| [setProductMarketTA2(divisionName, productName, on)](./bitburner.warehouseapi.setproductmarketta2.md) | Set Market-TA2 for a product. | +| [setSmartSupply(divisionName, city, enabled)](./bitburner.warehouseapi.setsmartsupply.md) | Set smart supply. | +| [setSmartSupplyOption(divisionName, city, materialName, option)](./bitburner.warehouseapi.setsmartsupplyoption.md) | Set whether smart supply uses leftovers before buying. | +| [upgradeWarehouse(divisionName, city, amt)](./bitburner.warehouseapi.upgradewarehouse.md) | Upgrade warehouse. | diff --git a/markdown/bitburner.warehouseapi.purchasewarehouse.md b/markdown/bitburner.warehouseapi.purchasewarehouse.md index 04b8f2f2b..06cf4bc69 100644 --- a/markdown/bitburner.warehouseapi.purchasewarehouse.md +++ b/markdown/bitburner.warehouseapi.purchasewarehouse.md @@ -4,7 +4,7 @@ ## WarehouseAPI.purchaseWarehouse() method -Purchase warehouse for a new city +Purchase warehouse for a new city. **Signature:** @@ -23,3 +23,7 @@ purchaseWarehouse(divisionName: string, city: CityName | `${CityName}`): void; void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.sellmaterial.md b/markdown/bitburner.warehouseapi.sellmaterial.md index 4f7d839c8..4cf2d3119 100644 --- a/markdown/bitburner.warehouseapi.sellmaterial.md +++ b/markdown/bitburner.warehouseapi.sellmaterial.md @@ -32,3 +32,7 @@ sellMaterial( void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.sellproduct.md b/markdown/bitburner.warehouseapi.sellproduct.md index 9444a4874..48feb8389 100644 --- a/markdown/bitburner.warehouseapi.sellproduct.md +++ b/markdown/bitburner.warehouseapi.sellproduct.md @@ -34,3 +34,7 @@ sellProduct( void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.setmaterialmarketta1.md b/markdown/bitburner.warehouseapi.setmaterialmarketta1.md index d7d9c3467..dad1e3e18 100644 --- a/markdown/bitburner.warehouseapi.setmaterialmarketta1.md +++ b/markdown/bitburner.warehouseapi.setmaterialmarketta1.md @@ -4,7 +4,7 @@ ## WarehouseAPI.setMaterialMarketTA1() method -Set market TA 1 for a material. +Set Market-TA1 for a material. **Signature:** @@ -19,9 +19,13 @@ setMaterialMarketTA1(divisionName: string, city: CityName | `${CityName}`, mater | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | | materialName | string | Name of the material | -| on | boolean | market ta enabled | +| on | boolean | Use true to enable, false otherwise. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.setmaterialmarketta2.md b/markdown/bitburner.warehouseapi.setmaterialmarketta2.md index 84aa7e57e..1ed12f380 100644 --- a/markdown/bitburner.warehouseapi.setmaterialmarketta2.md +++ b/markdown/bitburner.warehouseapi.setmaterialmarketta2.md @@ -4,7 +4,7 @@ ## WarehouseAPI.setMaterialMarketTA2() method -Set market TA 2 for a material. +Set Market-TA2 for a material. **Signature:** @@ -19,9 +19,13 @@ setMaterialMarketTA2(divisionName: string, city: CityName | `${CityName}`, mater | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | | materialName | string | Name of the material | -| on | boolean | market ta enabled | +| on | boolean | Use true to enable, false otherwise. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.setproductmarketta1.md b/markdown/bitburner.warehouseapi.setproductmarketta1.md index e8cb53e50..5e986cc8a 100644 --- a/markdown/bitburner.warehouseapi.setproductmarketta1.md +++ b/markdown/bitburner.warehouseapi.setproductmarketta1.md @@ -4,7 +4,7 @@ ## WarehouseAPI.setProductMarketTA1() method -\* Set market TA 1 for a product. +Set Market-TA1 for a product. **Signature:** @@ -18,9 +18,13 @@ setProductMarketTA1(divisionName: string, productName: string, on: boolean): voi | --- | --- | --- | | divisionName | string | Name of the division | | productName | string | Name of the product | -| on | boolean | market ta enabled | +| on | boolean | Use true to enable, false otherwise. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.setproductmarketta2.md b/markdown/bitburner.warehouseapi.setproductmarketta2.md index d2c7c07ea..6dc8982d7 100644 --- a/markdown/bitburner.warehouseapi.setproductmarketta2.md +++ b/markdown/bitburner.warehouseapi.setproductmarketta2.md @@ -4,7 +4,7 @@ ## WarehouseAPI.setProductMarketTA2() method -Set market TA 2 for a product. +Set Market-TA2 for a product. **Signature:** @@ -18,9 +18,13 @@ setProductMarketTA2(divisionName: string, productName: string, on: boolean): voi | --- | --- | --- | | divisionName | string | Name of the division | | productName | string | Name of the product | -| on | boolean | market ta enabled | +| on | boolean | Use true to enable, false otherwise. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.setsmartsupply.md b/markdown/bitburner.warehouseapi.setsmartsupply.md index 5125e1fbe..763e77b16 100644 --- a/markdown/bitburner.warehouseapi.setsmartsupply.md +++ b/markdown/bitburner.warehouseapi.setsmartsupply.md @@ -4,7 +4,7 @@ ## WarehouseAPI.setSmartSupply() method -Set smart supply +Set smart supply. **Signature:** @@ -18,9 +18,13 @@ setSmartSupply(divisionName: string, city: CityName | `${CityName}`, enabled: bo | --- | --- | --- | | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | -| enabled | boolean | smart supply enabled | +| enabled | boolean | Use true to enable, false otherwise. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.setsmartsupplyoption.md b/markdown/bitburner.warehouseapi.setsmartsupplyoption.md index 2cea4555b..5873e4ad1 100644 --- a/markdown/bitburner.warehouseapi.setsmartsupplyoption.md +++ b/markdown/bitburner.warehouseapi.setsmartsupplyoption.md @@ -4,7 +4,7 @@ ## WarehouseAPI.setSmartSupplyOption() method -Set whether smart supply uses leftovers before buying +Set whether smart supply uses leftovers before buying. **Signature:** @@ -24,9 +24,13 @@ setSmartSupplyOption( | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | | materialName | string | Name of the material | -| option | [CorpSmartSupplyOption](./bitburner.corpsmartsupplyoption.md) | smart supply option, "leftovers" to use leftovers, "imports" to use only imported materials, "none" to not use materials from store | +| option | [CorpSmartSupplyOption](./bitburner.corpsmartsupplyoption.md) | Smart supply option. Set "leftovers" to use leftovers, "imports" to use only imported materials, and "none" to not use stored materials. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/markdown/bitburner.warehouseapi.upgradewarehouse.md b/markdown/bitburner.warehouseapi.upgradewarehouse.md index fafc0de58..1a755b96e 100644 --- a/markdown/bitburner.warehouseapi.upgradewarehouse.md +++ b/markdown/bitburner.warehouseapi.upgradewarehouse.md @@ -4,7 +4,7 @@ ## WarehouseAPI.upgradeWarehouse() method -Upgrade warehouse +Upgrade warehouse. **Signature:** @@ -18,9 +18,13 @@ upgradeWarehouse(divisionName: string, city: CityName | `${CityName}`, amt?: num | --- | --- | --- | | divisionName | string | Name of the division | | city | [CityName](./bitburner.cityname.md) \| \`${[CityName](./bitburner.cityname.md)}\` | Name of the city | -| amt | number | _(Optional)_ amount of upgrades defaults to 1 | +| amt | number | _(Optional)_ Amount of upgrades. Defaults to 1. | **Returns:** void +## Remarks + +RAM cost: 20 GB + diff --git a/src/Netscript/RamCostGenerator.ts b/src/Netscript/RamCostGenerator.ts index f5ca82f35..b57979d65 100644 --- a/src/Netscript/RamCostGenerator.ts +++ b/src/Netscript/RamCostGenerator.ts @@ -82,7 +82,7 @@ export const RamCostConstants = { StanekAcceptGift: 2, CycleTiming: 1, -}; +} as const; function SF4Cost(cost: number): () => number { return () => { @@ -398,19 +398,16 @@ const grafting = { } as const; const corporation = { - hasCorporation: 0, // This one is free - getConstants: 0, - getBonusTime: 0, - nextUpdate: RamCostConstants.CycleTiming, - getIndustryData: RamCostConstants.CorporationInfo, - getMaterialData: RamCostConstants.CorporationInfo, - issueNewShares: RamCostConstants.CorporationAction, + hasCorporation: 0, createCorporation: RamCostConstants.CorporationAction, hasUnlock: RamCostConstants.CorporationInfo, getUnlockCost: RamCostConstants.CorporationInfo, getUpgradeLevel: RamCostConstants.CorporationInfo, getUpgradeLevelCost: RamCostConstants.CorporationInfo, getInvestmentOffer: RamCostConstants.CorporationInfo, + getConstants: 0, + getIndustryData: RamCostConstants.CorporationInfo, + getMaterialData: RamCostConstants.CorporationInfo, acceptInvestmentOffer: RamCostConstants.CorporationAction, goPublic: RamCostConstants.CorporationAction, bribe: RamCostConstants.CorporationAction, @@ -421,8 +418,13 @@ const corporation = { purchaseUnlock: RamCostConstants.CorporationAction, levelUpgrade: RamCostConstants.CorporationAction, issueDividends: RamCostConstants.CorporationAction, + issueNewShares: RamCostConstants.CorporationAction, buyBackShares: RamCostConstants.CorporationAction, sellShares: RamCostConstants.CorporationAction, + getBonusTime: 0, + nextUpdate: RamCostConstants.CycleTiming, + sellDivision: RamCostConstants.CorporationAction, + // Warehouse API sellMaterial: RamCostConstants.CorporationAction, sellProduct: RamCostConstants.CorporationAction, discontinueProduct: RamCostConstants.CorporationAction, @@ -446,6 +448,7 @@ const corporation = { limitProductProduction: RamCostConstants.CorporationAction, getUpgradeWarehouseCost: RamCostConstants.CorporationInfo, hasWarehouse: RamCostConstants.CorporationInfo, + // Warehouse API hireEmployee: RamCostConstants.CorporationAction, upgradeOfficeSize: RamCostConstants.CorporationAction, throwParty: RamCostConstants.CorporationAction, @@ -459,7 +462,6 @@ const corporation = { hasResearched: RamCostConstants.CorporationInfo, setAutoJobAssignment: RamCostConstants.CorporationAction, getOfficeSizeUpgradeCost: RamCostConstants.CorporationInfo, - sellDivision: RamCostConstants.CorporationAction, } as const; /** RamCosts guaranteed to match ns structure 1:1 (aside from args and enums). diff --git a/src/Script/RamCalculations.ts b/src/Script/RamCalculations.ts index ccaeaf78e..fcc799b06 100644 --- a/src/Script/RamCalculations.ts +++ b/src/Script/RamCalculations.ts @@ -161,7 +161,7 @@ function parseOnlyRamCalculate( // Finally, walk the reference map and generate a ram cost. The initial set of keys to scan // are those that start with the name of the main script. - let ram = RamCostConstants.Base; + let ram: number = RamCostConstants.Base; const detailedCosts: RamUsageEntry[] = [{ type: "misc", name: "baseCost", cost: RamCostConstants.Base }]; const unresolvedRefs = Object.keys(dependencyMap).filter((s) => s.startsWith(initialModule)); const resolvedRefs = new Set(); diff --git a/src/Script/RunningScript.ts b/src/Script/RunningScript.ts index 690004c12..e4bf9c71a 100644 --- a/src/Script/RunningScript.ts +++ b/src/Script/RunningScript.ts @@ -59,7 +59,7 @@ export class RunningScript { pid = -1; // How much RAM this script uses for ONE thread - ramUsage = RamCostConstants.Base; + ramUsage: number = RamCostConstants.Base; // hostname of the server on which this script is running server = ""; diff --git a/src/ScriptEditor/NetscriptDefinitions.d.ts b/src/ScriptEditor/NetscriptDefinitions.d.ts index 273d6ae0a..f52f84f9a 100644 --- a/src/ScriptEditor/NetscriptDefinitions.d.ts +++ b/src/ScriptEditor/NetscriptDefinitions.d.ts @@ -7579,7 +7579,7 @@ export interface NS { * ns.tprint(`The last augmentation reset was: ${new Date(lastAugReset)}`); * ns.tprint(`It has been ${Date.now() - lastAugReset} ms since the last augmentation reset.`); * ``` - * */ + */ getResetInfo(): ResetInfo; /** @@ -7934,88 +7934,148 @@ export type NSEnums = { /** * Corporation Office API + * * @remarks - * requires the Office API upgrade from your corporation. + * Requires the Office API upgrade from your corporation. + * * @public */ - export interface OfficeAPI { /** * Hire an employee. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param employeePosition - Position to place into. Defaults to "Unassigned". * @returns True if an employee was hired, false otherwise */ hireEmployee(divisionName: string, city: CityName | `${CityName}`, employeePosition?: CorpEmployeePosition): boolean; + /** * Upgrade office size. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param size - Amount of positions to open */ upgradeOfficeSize(divisionName: string, city: CityName | `${CityName}`, size: number): void; + /** - * Throw a party for your employees + * Throw a party for your employees. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param costPerEmployee - Amount to spend per employee. * @returns Multiplier for morale, or zero on failure */ throwParty(divisionName: string, city: CityName | `${CityName}`, costPerEmployee: number): number; + /** - * Buy tea for your employees + * Buy tea for your employees. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @returns true if buying tea was successful, false otherwise */ buyTea(divisionName: string, city: CityName | `${CityName}`): boolean; + /** * Hire AdVert. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division */ hireAdVert(divisionName: string): void; + /** - * Purchase a research + * Purchase a research. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param researchName - Name of the research */ research(divisionName: string, researchName: string): void; + /** - * Get data about an office + * Get data about an office. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @returns Office data */ getOffice(divisionName: string, city: CityName | `${CityName}`): Office; + /** * Get the cost to hire AdVert. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division. * @returns The cost to hire AdVert. */ getHireAdVertCost(divisionName: string): number; + /** * Get the number of times you have hired AdVert. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division. * @returns Number of times you have hired AdVert. */ getHireAdVertCount(divisionName: string): number; + /** - * Get the cost to unlock research + * Get the cost to unlock a research. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param researchName - Name of the research - * @returns cost + * @returns Cost */ getResearchCost(divisionName: string, researchName: string): number; + /** - * Gets if you have unlocked a research + * Check if you unlocked a research. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param researchName - Name of the research * @returns true is unlocked, false if not */ hasResearched(divisionName: string, researchName: string): boolean; + /** - * Set the auto job assignment for a job + * Set the job assignment for a job. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param job - Name of the job @@ -8023,8 +8083,13 @@ export interface OfficeAPI { * @returns true if the employee count reached the target amount, false if not */ setAutoJobAssignment(divisionName: string, city: CityName | `${CityName}`, job: string, amount: number): boolean; + /** - * Cost to Upgrade office size. + * Get the cost to upgrade an office. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param size - Amount of positions to open @@ -8035,13 +8100,19 @@ export interface OfficeAPI { /** * Corporation Warehouse API + * * @remarks * Requires the Warehouse API upgrade from your corporation. + * * @public */ export interface WarehouseAPI { /** * Set material sell data. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material @@ -8055,8 +8126,13 @@ export interface WarehouseAPI { amt: string, price: string, ): void; + /** * Set product sell data. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param productName - Name of the product @@ -8072,25 +8148,40 @@ export interface WarehouseAPI { price: string, all: boolean, ): void; + /** * Discontinue a product. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param productName - Name of the product */ discontinueProduct(divisionName: string, productName: string): void; + /** - * Set smart supply + * Set smart supply. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city - * @param enabled - smart supply enabled + * @param enabled - Use true to enable, false otherwise. */ setSmartSupply(divisionName: string, city: CityName | `${CityName}`, enabled: boolean): void; + /** - * Set whether smart supply uses leftovers before buying + * Set whether smart supply uses leftovers before buying. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material - * @param option - smart supply option, "leftovers" to use leftovers, "imports" to use only imported materials, "none" to not use materials from store + * @param option - Smart supply option. Set "leftovers" to use leftovers, "imports" to use only imported materials, and "none" to not use stored materials. */ setSmartSupplyOption( divisionName: string, @@ -8098,16 +8189,26 @@ export interface WarehouseAPI { materialName: string, option: CorpSmartSupplyOption, ): void; + /** - * Set material buy data + * Set material buy data. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material * @param amt - Amount of material to buy */ buyMaterial(divisionName: string, city: CityName | `${CityName}`, materialName: string, amt: number): void; + /** - * Set material to bulk buy + * Set material to bulk-buy. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material @@ -8115,56 +8216,100 @@ export interface WarehouseAPI { */ bulkPurchase(divisionName: string, city: CityName | `${CityName}`, materialName: string, amt: number): void; - /** Get warehouse data + /** + * Get warehouse data. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param city - Name of the city - * @returns warehouse data */ + * @returns Warehouse data + */ getWarehouse(divisionName: string, city: CityName | `${CityName}`): Warehouse; - /** Get product data + /** + * Get product data. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param cityName - Name of the city * @param productName - Name of the product - * @returns product data */ + * @returns Product data + */ getProduct(divisionName: string, cityName: CityName | `${CityName}`, productName: string): Product; + /** - * Get material data + * Get material data. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material - * @returns material data + * @returns Material data */ getMaterial(divisionName: string, city: CityName | `${CityName}`, materialName: string): Material; + /** - * Set market TA 1 for a material. + * Set Market-TA1 for a material. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material - * @param on - market ta enabled + * @param on - Use true to enable, false otherwise. */ setMaterialMarketTA1(divisionName: string, city: CityName | `${CityName}`, materialName: string, on: boolean): void; + /** - * Set market TA 2 for a material. + * Set Market-TA2 for a material. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param materialName - Name of the material - * @param on - market ta enabled + * @param on - Use true to enable, false otherwise. */ setMaterialMarketTA2(divisionName: string, city: CityName | `${CityName}`, materialName: string, on: boolean): void; - /** * Set market TA 1 for a product. + /** + * Set Market-TA1 for a product. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param productName - Name of the product - * @param on - market ta enabled */ + * @param on - Use true to enable, false otherwise. + */ setProductMarketTA1(divisionName: string, productName: string, on: boolean): void; - /** Set market TA 2 for a product. + /** + * Set Market-TA2 for a product. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param productName - Name of the product - * @param on - market ta enabled */ + * @param on - Use true to enable, false otherwise. + */ setProductMarketTA2(divisionName: string, productName: string, on: boolean): void; + /** - * Set material export data + * Set material export data. + * + * @remarks + * RAM cost: 20 GB + * * @param sourceDivision - Source division * @param sourceCity - Source city * @param targetDivision - Target division @@ -8180,8 +8325,13 @@ export interface WarehouseAPI { materialName: string, amt: number | string, ): void; + /** - * Cancel material export + * Cancel material export. + * + * @remarks + * RAM cost: 20 GB + * * @param sourceDivision - Source division * @param sourceCity - Source city * @param targetDivision - Target division @@ -8195,21 +8345,36 @@ export interface WarehouseAPI { targetCity: CityName | `${CityName}`, materialName: string, ): void; + /** - * Purchase warehouse for a new city + * Purchase warehouse for a new city. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city */ purchaseWarehouse(divisionName: string, city: CityName | `${CityName}`): void; + /** - * Upgrade warehouse + * Upgrade warehouse. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city - * @param amt - amount of upgrades defaults to 1 + * @param amt - Amount of upgrades. Defaults to 1. */ upgradeWarehouse(divisionName: string, city: CityName | `${CityName}`, amt?: number): void; + /** - * Create a new product + * Create a new product. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division * @param city - Name of the city * @param productName - Name of the product @@ -8223,8 +8388,13 @@ export interface WarehouseAPI { designInvest: number, marketingInvest: number, ): void; + /** - * Limit Material Production. + * Limit material production. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division. * @param city - Name of the city. * @param materialName - Name of the material. @@ -8236,25 +8406,40 @@ export interface WarehouseAPI { materialName: string, qty: number, ): void; + /** - * Limit Product Production. + * Limit product production. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division. * @param city - Name of the city. * @param productName - Name of the product. * @param qty - Amount to limit to. Pass a negative value to remove the limit instead. */ limitProductProduction(divisionName: string, city: CityName | `${CityName}`, productName: string, qty: number): void; + /** - * Gets the cost to upgrade a warehouse to the next level + * Get the cost to upgrade a warehouse to the next level. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division * @param city - Name of the city - * @param amt - amount of upgrades. Optional, defaults to 1 - * @returns cost to upgrade + * @param amt - Amount of upgrades. Optional. Defaults to 1. + * @returns Cost to upgrade */ getUpgradeWarehouseCost(divisionName: string, city: CityName | `${CityName}`, amt?: number): number; + /** - * Check if you have a warehouse in city - * @returns true if warehouse is present, false if not + * Check if you have a warehouse in city. + * + * @remarks + * RAM cost: 10 GB + * + * @returns true if warehouse is present, false if not. */ hasWarehouse(divisionName: string, city: CityName | `${CityName}`): boolean; } @@ -8264,133 +8449,281 @@ export interface WarehouseAPI { * @public */ export interface Corporation extends WarehouseAPI, OfficeAPI { - /** Returns whether the player has a corporation. Does not require API access. - * @returns whether the player has a corporation */ + /** + * Returns whether the player has a corporation. Does not require API access. + * + * @remarks + * RAM cost: 0 GB + * + * @returns Whether the player has a corporation + */ hasCorporation(): boolean; - /** Create a Corporation + /** + * Create a Corporation. + * + * @remarks + * RAM cost: 20 GB + * + * This function throws an error if: + * + * - Try to self-fund outside BitNode 3. + * + * - Be in a BitNode that has CorporationSoftcap (a BN modifier) less than 0.15. Use + * {@link NS.getBitNodeMultipliers | getBitNodeMultipliers} to get the value of this modifier. + * * @param corporationName - Name of the corporation - * @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 */ + * @param selfFund - If you want to self-fund. Defaults to true, false will only work in BitNode 3. + * @returns true if created and false if not + */ createCorporation(corporationName: string, selfFund: boolean): boolean; - /** Check if you have a one time unlockable upgrade + /** + * Check if you have a one-time unlockable upgrade. + * + * @remarks + * RAM cost: 10 GB + * * @param upgradeName - Name of the upgrade - * @returns true if unlocked and false if not */ + * @returns true if unlocked and false if not + */ hasUnlock(upgradeName: string): boolean; - /** Gets the cost to unlock a one time unlockable upgrade + /** + * Get the cost to unlock a one-time unlockable upgrade. + * + * @remarks + * RAM cost: 10 GB + * * @param upgradeName - Name of the upgrade - * @returns cost of the upgrade */ + * @returns Cost of the upgrade + */ getUnlockCost(upgradeName: string): number; - /** Get the level of a levelable upgrade + /** + * Get the level of a levelable upgrade. + * + * @remarks + * RAM cost: 10 GB + * * @param upgradeName - Name of the upgrade - * @returns the level of the upgrade */ + * @returns The level of the upgrade + */ getUpgradeLevel(upgradeName: string): number; - /** Gets the cost to unlock the next level of a levelable upgrade + /** + * Get the cost to unlock the next level of a levelable upgrade. + * + * @remarks + * RAM cost: 10 GB + * * @param upgradeName - Name of the upgrade - * @returns cost of the upgrade */ + * @returns Cost of the upgrade + */ getUpgradeLevelCost(upgradeName: string): number; - /** Get an offer for investment based on you companies current valuation - * @returns An offer of investment */ + /** + * Get an offer for investment based on current corporation valuation. + * + * @remarks + * RAM cost: 10 GB + * + * @returns An offer of investment + */ getInvestmentOffer(): InvestmentOffer; - /** Get corporation related constants - * @returns corporation related constants */ + /** + * Get corporation-related constants. + * + * @remarks + * RAM cost: 0 GB + * + * @returns Corporation-related constants + */ getConstants(): CorpConstants; - /** Get constant industry definition data for a specific industry */ + /** + * Get constant data of an industry. + * + * @remarks + * RAM cost: 10 GB + * + * @param industryName - Name of the industry + * @returns Industry data + */ getIndustryData(industryName: CorpIndustryName): CorpIndustryData; - /** Get constant data for a specific material */ + /** + * Get constant data of a material. + * + * @remarks + * RAM cost: 10 GB + * + * @param materialName - Name of the material + * @returns Material data + */ getMaterialData(materialName: CorpMaterialName): CorpMaterialConstantData; - /** Accept investment based on you companies current valuation + /** + * Accept the investment offer. The value of offer is based on current corporation valuation. + * * @remarks - * Is based on current valuation and will not honer a specific Offer - * @returns An offer of investment */ + * RAM cost: 20 GB + * + * @returns true if you successfully accept the offer, false if not + */ acceptInvestmentOffer(): boolean; - /** Go public - * @param numShares - number of shares you would like to issue for your IPO - * @returns true if you successfully go public, false if not */ + /** + * Go public. + * + * @remarks + * RAM cost: 20 GB + * + * @param numShares - Number of shares you would like to issue for your IPO + * @returns true if you successfully go public, false if not + */ goPublic(numShares: number): boolean; - /** Bribe a faction + /** + * Bribe a faction. + * + * @remarks + * RAM cost: 20 GB + * * @param factionName - Faction name * @param amountCash - Amount of money to bribe - * @returns True if successful, false if not */ + * @returns true if successful, false if not + */ bribe(factionName: string, amountCash: number): boolean; - /** Get corporation data - * @returns Corporation data */ + /** + * Get corporation data. + * + * @remarks + * RAM cost: 10 GB + * + * @returns Corporation data + */ getCorporation(): CorporationInfo; - /** Get division data + /** + * Get division data. + * + * @remarks + * RAM cost: 10 GB + * * @param divisionName - Name of the division - * @returns Division data */ + * @returns Division data + */ getDivision(divisionName: string): Division; - /** Expand to a new industry + /** + * Expand to a new industry. + * + * @remarks + * RAM cost: 20 GB + * * @param industryType - Name of the industry - * @param divisionName - Name of the division */ + * @param divisionName - Name of the division + */ expandIndustry(industryType: CorpIndustryName, divisionName: string): void; - /** Expand to a new city + /** + * Expand to a new city. + * + * @remarks + * RAM cost: 20 GB + * * @param divisionName - Name of the division - * @param city - Name of the city */ + * @param city - Name of the city + */ expandCity(divisionName: string, city: CityName | `${CityName}`): void; - /** Unlock an upgrade - * @param upgradeName - Name of the upgrade */ + /** + * Unlock an upgrade. + * + * @remarks + * RAM cost: 20 GB + * + * @param upgradeName - Name of the upgrade + */ purchaseUnlock(upgradeName: string): void; - /** Level an upgrade. - * @param upgradeName - Name of the upgrade */ + /** + * Level up an upgrade. + * + * @remarks + * RAM cost: 20 GB + * + * @param upgradeName - Name of the upgrade + */ levelUpgrade(upgradeName: string): void; - /** Issue dividends - * @param rate - Fraction of profit to issue as dividends. */ + /** + * Issue dividends. + * + * @remarks + * RAM cost: 20 GB + * + * @param rate - Fraction of profit to issue as dividends. + */ issueDividends(rate: number): void; - /** Issue new shares - * @param amount - Number of new shares to issue, will be rounded to nearest 10m. Defaults to max amount. - * @returns Amount of funds generated for the corporation. */ + /** + * Issue new shares. + * + * @remarks + * RAM cost: 20 GB + * + * @param amount - Number of new shares to issue. It will be rounded to nearest 10 million. Defaults to max amount. + * @returns Amount of funds generated for the corporation. + */ issueNewShares(amount?: number): number; - /** Buyback Shares. - * Spend money from the player's wallet to transfer shares from public traders to the CEO. - * @param amount - Amount of shares to buy back, must be integer and larger than 0 */ + /** + * Buyback shares. Spend money from the player's wallet to transfer shares from public traders to the CEO. + * + * @remarks + * RAM cost: 20 GB + * + * @param amount - Amount of shares to buy back, must be integer and larger than 0 + */ buyBackShares(amount: number): void; - /** Sell Shares. - * Transfer shares from the CEO to public traders to receive money in the player's wallet. - * @param amount - Amount of shares to sell, must be integer between 1 and 100t */ + /** + * Sell shares. Transfer shares from the CEO to public traders to receive money in the player's wallet. + * + * @remarks + * RAM cost: 20 GB + * + * @param amount - Amount of shares to sell, must be integer between 1 and 100t + */ sellShares(amount: number): void; - /** Get bonus time. - * “Bonus time” is accumulated when the game is offline or if the game is inactive in the browser. - * “Bonus time” makes the game progress faster. - * @returns Bonus time for the Corporation mechanic in milliseconds. */ + /** + * Get bonus time. Bonus time is accumulated when the game is offline or if the game is inactive in the browser. Bonus + * time makes the corporation progress faster. + * + * @remarks + * RAM cost: 0 GB + * + * @returns Bonus time for the Corporation mechanic in milliseconds. + */ getBonusTime(): number; /** - * Sleep until the next Corporation update has happened. + * Sleep until the next Corporation update happens. + * * @remarks * RAM cost: 1 GB * * The amount of real time spent asleep between updates can vary due to "bonus time" * (usually 200 milliseconds - 2 seconds). * - * @returns Promise that resolves to the name of the state that was just processed. + * If the returned state is X, it means X just happened. * - * I.e. when the state is PURCHASE, it means purchasing has just happened. - * Note that this is the state just before `getCorporation().state`. - * - * Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE. + * Possible states are START, PURCHASE, PRODUCTION, EXPORT, SALE. * * @example * ```js @@ -8401,15 +8734,19 @@ export interface Corporation extends WarehouseAPI, OfficeAPI { * // Manage the Corporation * } * ``` + * + * @returns Promise that resolves to the name of the state that was just processed. */ nextUpdate(): Promise; /** - * Sell a division + * Sell a division. + * * @remarks * RAM cost: 20 GB * - * @param divisionName - Name of the division */ + * @param divisionName - Name of the division + */ sellDivision(divisionName: string): void; }