Add buyAmount and importAmount to Corporation Material API (#1553)

This commit is contained in:
Yichi Zhang 2024-08-08 18:13:03 -07:00 committed by GitHub
parent 685b7d51f7
commit 93eb9b0cef
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 36 additions and 2 deletions

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Material](./bitburner.material.md) &gt; [buyAmount](./bitburner.material.buyamount.md)
## Material.buyAmount property
Amount of material purchased from the market last cycle
**Signature:**
```typescript
buyAmount: number;
```

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [Material](./bitburner.material.md) &gt; [importAmount](./bitburner.material.importamount.md)
## Material.importAmount property
Amount of material imported from other divisions last cycle
**Signature:**
```typescript
importAmount: number;
```

@ -17,11 +17,13 @@ interface Material
| Property | Modifiers | Type | Description |
| --- | --- | --- | --- |
| [actualSellAmount](./bitburner.material.actualsellamount.md) | | number | Amount of material sold last cycle |
| [buyAmount](./bitburner.material.buyamount.md) | | number | Amount of material purchased from the market last cycle |
| [competition](./bitburner.material.competition.md) | | number \| undefined | Competition for the material, only present if "Market Research - Competition" unlocked |
| [demand](./bitburner.material.demand.md) | | number \| undefined | Demand for the material, only present if "Market Research - Demand" unlocked |
| [desiredSellAmount](./bitburner.material.desiredsellamount.md) | | string \| number | Sell amount, can be "PROD/2" |
| [desiredSellPrice](./bitburner.material.desiredsellprice.md) | | string \| number | Sell cost, can be "MP+5" |
| [exports](./bitburner.material.exports.md) | | [Export](./bitburner.export.md)<!-- -->\[\] | Export orders |
| [importAmount](./bitburner.material.importamount.md) | | number | Amount of material imported from other divisions last cycle |
| [marketPrice](./bitburner.material.marketprice.md) | | number | Cost to buy material |
| [name](./bitburner.material.name.md) | | [CorpMaterialName](./bitburner.corpmaterialname.md) | Name of the material |
| [productionAmount](./bitburner.material.productionamount.md) | | number | Amount of material produced last cycle |

@ -223,7 +223,9 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
quality: material.quality,
demand: corporation.unlocks.has(CorpUnlockName.MarketResearchDemand) ? material.demand : undefined,
competition: corporation.unlocks.has(CorpUnlockName.MarketDataCompetition) ? material.competition : undefined,
buyAmount: material.buyAmount,
productionAmount: material.productionAmount,
importAmount: material.importAmount,
actualSellAmount: material.actualSellAmount,
exports: exports,
};

@ -8725,10 +8725,14 @@ interface Material {
demand: number | undefined;
/** Competition for the material, only present if "Market Research - Competition" unlocked */
competition: number | undefined;
/** Amount of material produced last cycle */
productionAmount: number;
/** Amount of material purchased from the market last cycle */
buyAmount: number;
/** Amount of material sold last cycle */
actualSellAmount: number;
/** Amount of material produced last cycle */
productionAmount: number;
/** Amount of material imported from other divisions last cycle */
importAmount: number;
/** Cost to buy material */
marketPrice: number;
/** Sell cost, can be "MP+5" */