mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-17 13:13:49 +01:00
DOCUMENTATION: Update documentation of Corporation API (#1587)
This commit is contained in:
parent
d82247a404
commit
a9cb46606c
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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.
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -15,5 +15,9 @@ hasCorporation(): boolean;
|
||||
|
||||
boolean
|
||||
|
||||
whether the player has a corporation
|
||||
Whether the player has a corporation
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 0 GB
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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. |
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -4,7 +4,7 @@
|
||||
|
||||
## Corporation.sellDivision() method
|
||||
|
||||
Sell a division
|
||||
Sell a division.
|
||||
|
||||
**Signature:**
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -24,3 +24,7 @@ number
|
||||
|
||||
The cost to hire AdVert.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 10 GB
|
||||
|
||||
|
@ -24,3 +24,7 @@ number
|
||||
|
||||
Number of times you have hired AdVert.
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 10 GB
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -22,3 +22,7 @@ hireAdVert(divisionName: string): void;
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
|
@ -26,3 +26,7 @@ boolean
|
||||
|
||||
True if an employee was hired, false otherwise
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
|
@ -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. |
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -24,3 +24,7 @@ upgradeOfficeSize(divisionName: string, city: CityName | `${CityName}`, size: nu
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -23,3 +23,7 @@ discontinueProduct(divisionName: string, productName: string): void;
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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. |
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -32,3 +32,7 @@ sellMaterial(
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
|
@ -34,3 +34,7 @@ sellProduct(
|
||||
|
||||
void
|
||||
|
||||
## Remarks
|
||||
|
||||
RAM cost: 20 GB
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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).
|
||||
|
@ -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();
|
||||
|
@ -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 = "";
|
||||
|
551
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
551
src/ScriptEditor/NetscriptDefinitions.d.ts
vendored
@ -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<CorpStateName>;
|
||||
|
||||
/**
|
||||
* 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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user