CORPORATION: add issueNewSharesCooldown and makesMaterial ()

This commit is contained in:
Caldwell 2023-09-12 07:23:36 +02:00 committed by GitHub
parent 25dae7ec8b
commit bba2ccd83a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 88 additions and 6 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; [CorpIndustryData](./bitburner.corpindustrydata.md) &gt; [makesMaterials](./bitburner.corpindustrydata.makesmaterials.md)
## CorpIndustryData.makesMaterials property
Whether the industry of this division is capable of producing materials
**Signature:**
```typescript
makesMaterials: boolean;
```

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorpIndustryData](./bitburner.corpindustrydata.md) &gt; [makesProducts](./bitburner.corpindustrydata.makesproducts.md)
## CorpIndustryData.makesProducts property
Whether the industry of this division is capable of developing and producing products
**Signature:**
```typescript
makesProducts: boolean;
```

@ -20,7 +20,9 @@ interface CorpIndustryData
| [aiCoreFactor?](./bitburner.corpindustrydata.aicorefactor.md) | | number | _(Optional)_ AI Cores factor | | [aiCoreFactor?](./bitburner.corpindustrydata.aicorefactor.md) | | number | _(Optional)_ AI Cores factor |
| [description](./bitburner.corpindustrydata.description.md) | | string | | | [description](./bitburner.corpindustrydata.description.md) | | string | |
| [hardwareFactor?](./bitburner.corpindustrydata.hardwarefactor.md) | | number | _(Optional)_ Hardware factor | | [hardwareFactor?](./bitburner.corpindustrydata.hardwarefactor.md) | | number | _(Optional)_ Hardware factor |
| [producedMaterials?](./bitburner.corpindustrydata.producedmaterials.md) | | [CorpMaterialName](./bitburner.corpmaterialname.md)<!-- -->\[\] | _(Optional)_ | | [makesMaterials](./bitburner.corpindustrydata.makesmaterials.md) | | boolean | Whether the industry of this division is capable of producing materials |
| [makesProducts](./bitburner.corpindustrydata.makesproducts.md) | | boolean | Whether the industry of this division is capable of developing and producing products |
| [producedMaterials?](./bitburner.corpindustrydata.producedmaterials.md) | | [CorpMaterialName](./bitburner.corpmaterialname.md)<!-- -->\[\] | _(Optional)_ Array of Materials produced |
| [product?](./bitburner.corpindustrydata.product.md) | | [CorpProductData](./bitburner.corpproductdata.md) | _(Optional)_ | | [product?](./bitburner.corpindustrydata.product.md) | | [CorpProductData](./bitburner.corpproductdata.md) | _(Optional)_ |
| [realEstateFactor?](./bitburner.corpindustrydata.realestatefactor.md) | | number | _(Optional)_ Real estate factor | | [realEstateFactor?](./bitburner.corpindustrydata.realestatefactor.md) | | number | _(Optional)_ Real estate factor |
| [recommendStarting](./bitburner.corpindustrydata.recommendstarting.md) | | boolean | | | [recommendStarting](./bitburner.corpindustrydata.recommendstarting.md) | | boolean | |

@ -4,6 +4,8 @@
## CorpIndustryData.producedMaterials property ## CorpIndustryData.producedMaterials property
Array of Materials produced
**Signature:** **Signature:**
```typescript ```typescript

@ -0,0 +1,13 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CorporationInfo](./bitburner.corporationinfo.md) &gt; [issueNewSharesCooldown](./bitburner.corporationinfo.issuenewsharescooldown.md)
## CorporationInfo.issueNewSharesCooldown property
Cooldown until new shares can be issued
**Signature:**
```typescript
issueNewSharesCooldown: number;
```

@ -23,6 +23,7 @@ interface CorporationInfo
| [expenses](./bitburner.corporationinfo.expenses.md) | | number | Expenses per second this cycle | | [expenses](./bitburner.corporationinfo.expenses.md) | | number | Expenses per second this cycle |
| [funds](./bitburner.corporationinfo.funds.md) | | number | Funds available | | [funds](./bitburner.corporationinfo.funds.md) | | number | Funds available |
| [issuedShares](./bitburner.corporationinfo.issuedshares.md) | | number | Amount of acquirable shares. | | [issuedShares](./bitburner.corporationinfo.issuedshares.md) | | number | Amount of acquirable shares. |
| [issueNewSharesCooldown](./bitburner.corporationinfo.issuenewsharescooldown.md) | | number | Cooldown until new shares can be issued |
| [name](./bitburner.corporationinfo.name.md) | | string | Name of the corporation | | [name](./bitburner.corporationinfo.name.md) | | string | Name of the corporation |
| [numShares](./bitburner.corporationinfo.numshares.md) | | number | Amount of share owned | | [numShares](./bitburner.corporationinfo.numshares.md) | | number | Amount of share owned |
| [public](./bitburner.corporationinfo.public.md) | | boolean | Indicating if the company is public | | [public](./bitburner.corporationinfo.public.md) | | boolean | Indicating if the company is public |

@ -4,7 +4,7 @@
## Division.makesProducts property ## Division.makesProducts property
Whether the industry this division is in is capable of making products Whether the industry of this division is capable of developing and producing products
**Signature:** **Signature:**

@ -20,7 +20,7 @@ interface Division
| [cities](./bitburner.division.cities.md) | | [CityName](./bitburner.cityname.md)<!-- -->\[\] | Cities in which this division has expanded | | [cities](./bitburner.division.cities.md) | | [CityName](./bitburner.cityname.md)<!-- -->\[\] | Cities in which this division has expanded |
| [lastCycleExpenses](./bitburner.division.lastcycleexpenses.md) | | number | Expenses last cycle | | [lastCycleExpenses](./bitburner.division.lastcycleexpenses.md) | | number | Expenses last cycle |
| [lastCycleRevenue](./bitburner.division.lastcyclerevenue.md) | | number | Revenue last cycle | | [lastCycleRevenue](./bitburner.division.lastcyclerevenue.md) | | number | Revenue last cycle |
| [makesProducts](./bitburner.division.makesproducts.md) | | boolean | Whether the industry this division is in is capable of making products | | [makesProducts](./bitburner.division.makesproducts.md) | | boolean | Whether the industry of this division is capable of developing and producing products |
| [maxProducts](./bitburner.division.maxproducts.md) | | number | How many products this division can support | | [maxProducts](./bitburner.division.maxproducts.md) | | number | How many products this division can support |
| [name](./bitburner.division.name.md) | | string | Name of the division | | [name](./bitburner.division.name.md) | | string | Name of the division |
| [numAdVerts](./bitburner.division.numadverts.md) | | number | Number of times AdVert has been bought | | [numAdVerts](./bitburner.division.numadverts.md) | | number | Number of times AdVert has been bought |

@ -33,7 +33,7 @@ export class Division {
// Not included in save file. Just used for tracking whether research tree has been updated since game load. // Not included in save file. Just used for tracking whether research tree has been updated since game load.
treeInitialized = false; treeInitialized = false;
//An array of the name of materials being produced /** An array of the name of materials being produced */
producedMaterials: CorpMaterialName[] = []; producedMaterials: CorpMaterialName[] = [];
products = new JSONMap<string, Product>(); products = new JSONMap<string, Product>();
@ -101,7 +101,7 @@ export class Division {
// Loading data based on this division's industry type // Loading data based on this division's industry type
const data = IndustriesData[this.type]; const data = IndustriesData[this.type];
this.startingCost = data.startingCost; this.startingCost = data.startingCost;
this.makesProducts = data.product ? true : false; this.makesProducts = data.makesProducts;
this.realEstateFactor = data.realEstateFactor ?? 0; this.realEstateFactor = data.realEstateFactor ?? 0;
this.researchFactor = data.scienceFactor ?? 0; this.researchFactor = data.scienceFactor ?? 0;
this.hardwareFactor = data.hardwareFactor ?? 0; this.hardwareFactor = data.hardwareFactor ?? 0;

@ -17,6 +17,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.04, advertisingFactor: 0.04,
requiredMaterials: { Water: 0.5, Chemicals: 0.2 }, requiredMaterials: { Water: 0.5, Chemicals: 0.2 },
producedMaterials: ["Plants", "Food"], producedMaterials: ["Plants", "Food"],
makesMaterials: true,
makesProducts: false,
}, },
[IndustryType.Spring]: { [IndustryType.Spring]: {
startingCost: 10e9, startingCost: 10e9,
@ -30,6 +32,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.03, advertisingFactor: 0.03,
requiredMaterials: {}, requiredMaterials: {},
producedMaterials: ["Water"], producedMaterials: ["Water"],
makesMaterials: true,
makesProducts: false,
}, },
[IndustryType.Refinery]: { [IndustryType.Refinery]: {
startingCost: 50e9, startingCost: 50e9,
@ -43,6 +47,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.04, advertisingFactor: 0.04,
requiredMaterials: { Ore: 1 }, requiredMaterials: { Ore: 1 },
producedMaterials: ["Metal"], producedMaterials: ["Metal"],
makesMaterials: true,
makesProducts: false,
}, },
[IndustryType.Chemical]: { [IndustryType.Chemical]: {
startingCost: 70e9, startingCost: 70e9,
@ -56,6 +62,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.07, advertisingFactor: 0.07,
requiredMaterials: { Plants: 1, Water: 0.5 }, requiredMaterials: { Plants: 1, Water: 0.5 },
producedMaterials: ["Chemicals"], producedMaterials: ["Chemicals"],
makesMaterials: true,
makesProducts: false,
}, },
[IndustryType.Computers]: { [IndustryType.Computers]: {
startingCost: 500e9, startingCost: 500e9,
@ -81,6 +89,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.17, advertisingFactor: 0.17,
requiredMaterials: { Metal: 2 }, requiredMaterials: { Metal: 2 },
producedMaterials: ["Hardware"], producedMaterials: ["Hardware"],
makesMaterials: true,
makesProducts: true,
}, },
[IndustryType.Fishing]: { [IndustryType.Fishing]: {
startingCost: 80e9, startingCost: 80e9,
@ -94,6 +104,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.08, advertisingFactor: 0.08,
requiredMaterials: { Plants: 0.5 }, requiredMaterials: { Plants: 0.5 },
producedMaterials: ["Food"], producedMaterials: ["Food"],
makesMaterials: true,
makesProducts: false,
}, },
[IndustryType.Restaurant]: { [IndustryType.Restaurant]: {
startingCost: 10e9, startingCost: 10e9,
@ -116,6 +128,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.25, advertisingFactor: 0.25,
realEstateFactor: 0.05, realEstateFactor: 0.05,
requiredMaterials: { Food: 0.5, Water: 0.5 }, requiredMaterials: { Food: 0.5, Water: 0.5 },
makesMaterials: false,
makesProducts: true,
}, },
[IndustryType.Healthcare]: { [IndustryType.Healthcare]: {
startingCost: 750e9, startingCost: 750e9,
@ -140,6 +154,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
robotFactor: 0.1, robotFactor: 0.1,
aiCoreFactor: 0.1, aiCoreFactor: 0.1,
requiredMaterials: { Robots: 10, "AI Cores": 5, Drugs: 5, Food: 5 }, requiredMaterials: { Robots: 10, "AI Cores": 5, Drugs: 5, Food: 5 },
makesMaterials: false,
makesProducts: true,
}, },
[IndustryType.Mining]: { [IndustryType.Mining]: {
startingCost: 300e9, startingCost: 300e9,
@ -153,6 +169,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.06, advertisingFactor: 0.06,
requiredMaterials: { Hardware: 0.1 }, requiredMaterials: { Hardware: 0.1 },
producedMaterials: ["Ore", "Minerals"], producedMaterials: ["Ore", "Minerals"],
makesMaterials: true,
makesProducts: false,
}, },
[IndustryType.Pharmaceutical]: { [IndustryType.Pharmaceutical]: {
startingCost: 200e9, startingCost: 200e9,
@ -178,6 +196,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.16, advertisingFactor: 0.16,
requiredMaterials: { Chemicals: 2, Water: 0.5 }, requiredMaterials: { Chemicals: 2, Water: 0.5 },
producedMaterials: ["Drugs"], producedMaterials: ["Drugs"],
makesMaterials: true,
makesProducts: true,
}, },
[IndustryType.RealEstate]: { [IndustryType.RealEstate]: {
startingCost: 600e9, startingCost: 600e9,
@ -202,6 +222,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
hardwareFactor: 0.05, hardwareFactor: 0.05,
requiredMaterials: { Metal: 5, Plants: 1, Water: 2, Hardware: 4 }, requiredMaterials: { Metal: 5, Plants: 1, Water: 2, Hardware: 4 },
producedMaterials: ["Real Estate"], producedMaterials: ["Real Estate"],
makesMaterials: true,
makesProducts: true,
}, },
[IndustryType.Robotics]: { [IndustryType.Robotics]: {
startingCost: 1e12, startingCost: 1e12,
@ -227,6 +249,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
hardwareFactor: 0.19, hardwareFactor: 0.19,
requiredMaterials: { Hardware: 5, "AI Cores": 3 }, requiredMaterials: { Hardware: 5, "AI Cores": 3 },
producedMaterials: ["Robots"], producedMaterials: ["Robots"],
makesMaterials: true,
makesProducts: true,
}, },
[IndustryType.Software]: { [IndustryType.Software]: {
startingCost: 25e9, startingCost: 25e9,
@ -252,6 +276,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
robotFactor: 0.05, robotFactor: 0.05,
requiredMaterials: { Hardware: 0.5 }, requiredMaterials: { Hardware: 0.5 },
producedMaterials: ["AI Cores"], producedMaterials: ["AI Cores"],
makesMaterials: true,
makesProducts: true,
}, },
[IndustryType.Tobacco]: { [IndustryType.Tobacco]: {
startingCost: 20e9, startingCost: 20e9,
@ -274,6 +300,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
aiCoreFactor: 0.15, aiCoreFactor: 0.15,
advertisingFactor: 0.2, advertisingFactor: 0.2,
requiredMaterials: { Plants: 1 }, requiredMaterials: { Plants: 1 },
makesMaterials: false,
makesProducts: true,
}, },
[IndustryType.Water]: { [IndustryType.Water]: {
startingCost: 150e9, startingCost: 150e9,
@ -286,6 +314,8 @@ export const IndustriesData: Record<IndustryType, CorpIndustryData> = {
advertisingFactor: 0.08, advertisingFactor: 0.08,
requiredMaterials: { Hardware: 0.1 }, requiredMaterials: { Hardware: 0.1 },
producedMaterials: ["Water"], producedMaterials: ["Water"],
makesMaterials: true,
makesProducts: false,
}, },
}; };

@ -769,6 +769,7 @@ export function NetscriptCorporation(): InternalAPI<NSCorporation> {
numShares: corporation.numShares, numShares: corporation.numShares,
shareSaleCooldown: corporation.shareSaleCooldown, shareSaleCooldown: corporation.shareSaleCooldown,
issuedShares: corporation.issuedShares, issuedShares: corporation.issuedShares,
issueNewSharesCooldown: corporation.issueNewSharesCooldown,
sharePrice: corporation.sharePrice, sharePrice: corporation.sharePrice,
dividendRate: corporation.dividendRate, dividendRate: corporation.dividendRate,
dividendTax: corporation.dividendTax, dividendTax: corporation.dividendTax,

@ -7490,7 +7490,12 @@ interface CorpIndustryData {
aiCoreFactor?: number; aiCoreFactor?: number;
/** Advertising factor (affects sales) */ /** Advertising factor (affects sales) */
advertisingFactor?: number; advertisingFactor?: number;
/** Array of Materials produced */
producedMaterials?: CorpMaterialName[]; producedMaterials?: CorpMaterialName[];
/** Whether the industry of this division is capable of producing materials */
makesMaterials: boolean;
/** Whether the industry of this division is capable of developing and producing products */
makesProducts: boolean;
} }
/** /**
@ -7516,6 +7521,8 @@ interface CorporationInfo {
shareSaleCooldown: number; shareSaleCooldown: number;
/** Amount of acquirable shares. */ /** Amount of acquirable shares. */
issuedShares: number; issuedShares: number;
/** Cooldown until new shares can be issued */
issueNewSharesCooldown: number;
/** Price of the shares */ /** Price of the shares */
sharePrice: number; sharePrice: number;
/** Fraction of profits issued as dividends */ /** Fraction of profits issued as dividends */
@ -7852,7 +7859,7 @@ interface Division {
cities: CityName[]; cities: CityName[];
/** Names of Products developed by this division */ /** Names of Products developed by this division */
products: string[]; products: string[];
/** Whether the industry this division is in is capable of making products */ /** Whether the industry of this division is capable of developing and producing products */
makesProducts: boolean; makesProducts: boolean;
/** How many products this division can support */ /** How many products this division can support */
maxProducts: number; maxProducts: number;