DOCUMENTATION: Update documentation of Corporation API (#1587)

This commit is contained in:
catloversg
2024-08-16 16:02:23 +07:00
committed by GitHub
parent d82247a404
commit a9cb46606c
69 changed files with 841 additions and 256 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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.

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -15,5 +15,9 @@ hasCorporation(): boolean;
boolean
whether the player has a corporation
Whether the player has a corporation
## Remarks
RAM cost: 0 GB

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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. |

View File

@@ -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&lt;[CorpStateName](./bitburner.corpstatename.md)<!-- -->&gt;
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

View File

@@ -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

View File

@@ -4,7 +4,7 @@
## Corporation.sellDivision() method
Sell a division
Sell a division.
**Signature:**

View File

@@ -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

View File

@@ -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

View File

@@ -24,3 +24,7 @@ number
The cost to hire AdVert.
## Remarks
RAM cost: 10 GB

View File

@@ -24,3 +24,7 @@ number
Number of times you have hired AdVert.
## Remarks
RAM cost: 10 GB

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -22,3 +22,7 @@ hireAdVert(divisionName: string): void;
void
## Remarks
RAM cost: 20 GB

View File

@@ -26,3 +26,7 @@ boolean
True if an employee was hired, false otherwise
## Remarks
RAM cost: 20 GB

View File

@@ -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. |

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -24,3 +24,7 @@ upgradeOfficeSize(divisionName: string, city: CityName | `${CityName}`, size: nu
void
## Remarks
RAM cost: 20 GB

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -23,3 +23,7 @@ discontinueProduct(divisionName: string, productName: string): void;
void
## Remarks
RAM cost: 20 GB

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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. |

View File

@@ -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

View File

@@ -32,3 +32,7 @@ sellMaterial(
void
## Remarks
RAM cost: 20 GB

View File

@@ -34,3 +34,7 @@ sellProduct(
void
## Remarks
RAM cost: 20 GB

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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