API: Added CompanyName to NetscriptDefinitions (#731)

This commit is contained in:
Zelow79 2023-08-16 17:31:41 -04:00 committed by GitHub
parent 7500ef0da2
commit b7ad3395ae
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
18 changed files with 160 additions and 37 deletions

@ -0,0 +1,57 @@
<!-- Do not edit this file. It is automatically generated by API Documenter. -->
[Home](./index.md) &gt; [bitburner](./bitburner.md) &gt; [CompanyName](./bitburner.companyname.md)
## CompanyName enum
Names of all companies
**Signature:**
```typescript
declare enum CompanyName
```
## Enumeration Members
| Member | Value | Description |
| --- | --- | --- |
| AeroCorp | <code>&quot;AeroCorp&quot;</code> | |
| AlphaEnterprises | <code>&quot;Alpha Enterprises&quot;</code> | |
| BachmanAndAssociates | <code>&quot;Bachman &amp; Associates&quot;</code> | |
| BladeIndustries | <code>&quot;Blade Industries&quot;</code> | |
| CarmichaelSecurity | <code>&quot;Carmichael Security&quot;</code> | |
| CIA | <code>&quot;Central Intelligence Agency&quot;</code> | |
| ClarkeIncorporated | <code>&quot;Clarke Incorporated&quot;</code> | |
| CompuTek | <code>&quot;CompuTek&quot;</code> | |
| DefComm | <code>&quot;DefComm&quot;</code> | |
| DeltaOne | <code>&quot;DeltaOne&quot;</code> | |
| ECorp | <code>&quot;ECorp&quot;</code> | |
| FoodNStuff | <code>&quot;FoodNStuff&quot;</code> | |
| FourSigma | <code>&quot;Four Sigma&quot;</code> | |
| FulcrumTechnologies | <code>&quot;Fulcrum Technologies&quot;</code> | |
| GalacticCybersystems | <code>&quot;Galactic Cybersystems&quot;</code> | |
| GlobalPharmaceuticals | <code>&quot;Global Pharmaceuticals&quot;</code> | |
| HeliosLabs | <code>&quot;Helios Labs&quot;</code> | |
| IcarusMicrosystems | <code>&quot;Icarus Microsystems&quot;</code> | |
| JoesGuns | <code>&quot;Joe's Guns&quot;</code> | |
| KuaiGongInternational | <code>&quot;KuaiGong International&quot;</code> | |
| LexoCorp | <code>&quot;LexoCorp&quot;</code> | |
| MegaCorp | <code>&quot;MegaCorp&quot;</code> | |
| NetLinkTechnologies | <code>&quot;NetLink Technologies&quot;</code> | |
| NoodleBar | <code>&quot;Noodle Bar&quot;</code> | |
| NovaMedical | <code>&quot;Nova Medical&quot;</code> | |
| NSA | <code>&quot;National Security Agency&quot;</code> | |
| NWO | <code>&quot;NWO&quot;</code> | |
| OmegaSoftware | <code>&quot;Omega Software&quot;</code> | |
| OmniaCybersystems | <code>&quot;Omnia Cybersystems&quot;</code> | |
| OmniTekIncorporated | <code>&quot;OmniTek Incorporated&quot;</code> | |
| Police | <code>&quot;Aevum Police Headquarters&quot;</code> | |
| RhoConstruction | <code>&quot;Rho Construction&quot;</code> | |
| SolarisSpaceSystems | <code>&quot;Solaris Space Systems&quot;</code> | |
| StormTechnologies | <code>&quot;Storm Technologies&quot;</code> | |
| SysCoreSecurities | <code>&quot;SysCore Securities&quot;</code> | |
| UniversalEnergy | <code>&quot;Universal Energy&quot;</code> | |
| VitaLife | <code>&quot;VitaLife&quot;</code> | |
| WatchdogSecurity | <code>&quot;Watchdog Security&quot;</code> | |

@ -9,6 +9,7 @@
| Enumeration | Description | | Enumeration | Description |
| --- | --- | | --- | --- |
| [CityName](./bitburner.cityname.md) | Names of all cities | | [CityName](./bitburner.cityname.md) | Names of all cities |
| [CompanyName](./bitburner.companyname.md) | Names of all companies |
| [CrimeType](./bitburner.crimetype.md) | | | [CrimeType](./bitburner.crimetype.md) | |
| [FactionWorkType](./bitburner.factionworktype.md) | | | [FactionWorkType](./bitburner.factionworktype.md) | |
| [GymType](./bitburner.gymtype.md) | | | [GymType](./bitburner.gymtype.md) | |

@ -17,7 +17,8 @@ export type NSEnums = {
LocationName: typeof LocationName; LocationName: typeof LocationName;
ToastVariant: typeof ToastVariant; ToastVariant: typeof ToastVariant;
UniversityClassType: typeof UniversityClassType; UniversityClassType: typeof UniversityClassType;
CompanyName: typeof CompanyName;
}; };
``` ```
**References:** [CityName](./bitburner.cityname.md)<!-- -->, [CrimeType](./bitburner.crimetype.md)<!-- -->, [FactionWorkType](./bitburner.factionworktype.md)<!-- -->, [GymType](./bitburner.gymtype.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->, [LocationName](./bitburner.locationname.md)<!-- -->, [ToastVariant](./bitburner.toastvariant.md)<!-- -->, [UniversityClassType](./bitburner.universityclasstype.md) **References:** [CityName](./bitburner.cityname.md)<!-- -->, [CrimeType](./bitburner.crimetype.md)<!-- -->, [FactionWorkType](./bitburner.factionworktype.md)<!-- -->, [GymType](./bitburner.gymtype.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->, [LocationName](./bitburner.locationname.md)<!-- -->, [ToastVariant](./bitburner.toastvariant.md)<!-- -->, [UniversityClassType](./bitburner.universityclasstype.md)<!-- -->, [CompanyName](./bitburner.companyname.md)

@ -7,5 +7,5 @@
**Signature:** **Signature:**
```typescript ```typescript
jobs: Record<string, string>; jobs: Partial<Record<CompanyName, JobName>>;
``` ```

@ -18,7 +18,7 @@ interface Player extends Person
| --- | --- | --- | --- | | --- | --- | --- | --- |
| [entropy](./bitburner.player.entropy.md) | | number | | | [entropy](./bitburner.player.entropy.md) | | number | |
| [factions](./bitburner.player.factions.md) | | string\[\] | | | [factions](./bitburner.player.factions.md) | | string\[\] | |
| [jobs](./bitburner.player.jobs.md) | | Record&lt;string, string&gt; | | | [jobs](./bitburner.player.jobs.md) | | Partial&lt;Record&lt;[CompanyName](./bitburner.companyname.md)<!-- -->, [JobName](./bitburner.jobname.md)<!-- -->&gt;&gt; | |
| [location](./bitburner.player.location.md) | | string | | | [location](./bitburner.player.location.md) | | string | |
| [money](./bitburner.player.money.md) | | number | | | [money](./bitburner.player.money.md) | | number | |
| [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | | | [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | |

@ -9,14 +9,14 @@ Apply for a job at a company.
**Signature:** **Signature:**
```typescript ```typescript
applyToCompany(companyName: string, field: string): boolean; applyToCompany(companyName: CompanyName | `${CompanyName}`, field: string): boolean;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of company to apply to. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of company to apply to. |
| field | string | Field to which you want to apply. | | field | string | Field to which you want to apply. |
**Returns:** **Returns:**

@ -9,14 +9,14 @@ Get company favor.
**Signature:** **Signature:**
```typescript ```typescript
getCompanyFavor(companyName: string): number; getCompanyFavor(companyName: CompanyName | `${CompanyName}`): number;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of the company. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
**Returns:** **Returns:**

@ -9,14 +9,14 @@ Get company favor gain.
**Signature:** **Signature:**
```typescript ```typescript
getCompanyFavorGain(companyName: string): number; getCompanyFavorGain(companyName: CompanyName | `${CompanyName}`): number;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of the company. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
**Returns:** **Returns:**

@ -9,15 +9,18 @@ Get Requirements for Company Position.
**Signature:** **Signature:**
```typescript ```typescript
getCompanyPositionInfo(companyName: string, positionName: JobName): CompanyPositionInfo; getCompanyPositionInfo(
companyName: CompanyName | `${CompanyName}`,
positionName: JobName | `${JobName}`,
): CompanyPositionInfo;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of company to get the requirements for. Must be an exact match. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of company to get the requirements for. Must be an exact match. |
| positionName | [JobName](./bitburner.jobname.md) | Name of position to get the requirements for. Must be an exact match. | | positionName | [JobName](./bitburner.jobname.md) \| \`${[JobName](./bitburner.jobname.md)<!-- -->}\` | Name of position to get the requirements for. Must be an exact match. |
**Returns:** **Returns:**

@ -9,14 +9,14 @@ Get List of Company Positions.
**Signature:** **Signature:**
```typescript ```typescript
getCompanyPositions(companyName: string): JobName[]; getCompanyPositions(companyName: CompanyName | `${CompanyName}`): JobName[];
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of company to get the position list for. Must be an exact match. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of company to get the position list for. Must be an exact match. |
**Returns:** **Returns:**

@ -9,14 +9,14 @@ Get company reputation.
**Signature:** **Signature:**
```typescript ```typescript
getCompanyRep(companyName: string): number; getCompanyRep(companyName: CompanyName | `${CompanyName}`): number;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of the company. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company. |
**Returns:** **Returns:**

@ -9,14 +9,14 @@ Quit jobs by company.
**Signature:** **Signature:**
```typescript ```typescript
quitJob(companyName?: string): void; quitJob(companyName?: CompanyName | `${CompanyName}`): void;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | _(Optional)_ Name of the company. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | _(Optional)_ Name of the company. |
**Returns:** **Returns:**

@ -9,14 +9,14 @@ Work for a company.
**Signature:** **Signature:**
```typescript ```typescript
workForCompany(companyName: string, focus?: boolean): boolean; workForCompany(companyName: CompanyName, focus?: boolean): boolean;
``` ```
## Parameters ## Parameters
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| companyName | string | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked. | | companyName | [CompanyName](./bitburner.companyname.md) | Name of company to work for. Must be an exact match. Optional. If not specified, this argument defaults to the last job that you worked. |
| focus | boolean | _(Optional)_ Acquire player focus on this work operation. Optional. Defaults to true. | | focus | boolean | _(Optional)_ Acquire player focus on this work operation. Optional. Defaults to true. |
**Returns:** **Returns:**

@ -9,7 +9,7 @@ Set a sleeve to work for a company.
**Signature:** **Signature:**
```typescript ```typescript
setToCompanyWork(sleeveNumber: number, companyName: string): boolean; setToCompanyWork(sleeveNumber: number, companyName: CompanyName | `${CompanyName}`): boolean;
``` ```
## Parameters ## Parameters
@ -17,7 +17,7 @@ setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| sleeveNumber | number | Index of the sleeve to work for the company. | | sleeveNumber | number | Index of the sleeve to work for the company. |
| companyName | string | Name of the company to work for. | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | Name of the company to work for. |
**Returns:** **Returns:**

@ -8,5 +8,7 @@
**Signature:** **Signature:**
```typescript ```typescript
type SleeveCompanyTask = { type: "COMPANY"; companyName: string }; type SleeveCompanyTask = { type: "COMPANY"; companyName: CompanyName };
``` ```
**References:** [CompanyName](./bitburner.companyname.md)

@ -7,7 +7,12 @@
**Signature:** **Signature:**
```typescript ```typescript
companyGains(person: Person, companyName: string, workType: JobName | `${JobName}`, favor: number): WorkStats; companyGains(
person: Person,
companyName: CompanyName | `${CompanyName}`,
workType: JobName | `${JobName}`,
favor: number,
): WorkStats;
``` ```
## Parameters ## Parameters
@ -15,7 +20,7 @@ companyGains(person: Person, companyName: string, workType: JobName | `${JobName
| Parameter | Type | Description | | Parameter | Type | Description |
| --- | --- | --- | | --- | --- | --- |
| person | [Person](./bitburner.person.md) | | | person | [Person](./bitburner.person.md) | |
| companyName | string | | | companyName | [CompanyName](./bitburner.companyname.md) \| \`${[CompanyName](./bitburner.companyname.md)<!-- -->}\` | |
| workType | [JobName](./bitburner.jobname.md) \| \`${[JobName](./bitburner.jobname.md)<!-- -->}\` | | | workType | [JobName](./bitburner.jobname.md) \| \`${[JobName](./bitburner.jobname.md)<!-- -->}\` | |
| favor | number | | | favor | number | |

@ -24,6 +24,7 @@ import {
LocationName, LocationName,
ToastVariant, ToastVariant,
UniversityClassType, UniversityClassType,
CompanyName,
} from "@enums"; } from "@enums";
import { PromptEvent } from "./ui/React/PromptManager"; import { PromptEvent } from "./ui/React/PromptManager";
import { GetServer, DeleteServer, AddToAllServers, createUniqueRandomIp } from "./Server/AllServers"; import { GetServer, DeleteServer, AddToAllServers, createUniqueRandomIp } from "./Server/AllServers";
@ -111,6 +112,7 @@ export const enums: NSEnums = {
LocationName, LocationName,
ToastVariant, ToastVariant,
UniversityClassType, UniversityClassType,
CompanyName,
}; };
for (const val of Object.values(enums)) Object.freeze(val); for (const val of Object.values(enums)) Object.freeze(val);
Object.freeze(enums); Object.freeze(enums);

@ -47,7 +47,7 @@ interface Player extends Person {
money: number; money: number;
numPeopleKilled: number; numPeopleKilled: number;
entropy: number; entropy: number;
jobs: Record<string, string>; jobs: Partial<Record<CompanyName, JobName>>;
factions: string[]; factions: string[];
totalPlaytime: number; totalPlaytime: number;
location: string; location: string;
@ -980,7 +980,7 @@ type SleeveClassTask = {
}; };
/** @public */ /** @public */
type SleeveCompanyTask = { type: "COMPANY"; companyName: string }; type SleeveCompanyTask = { type: "COMPANY"; companyName: CompanyName };
/** @public */ /** @public */
type SleeveCrimeTask = { type SleeveCrimeTask = {
@ -1759,7 +1759,10 @@ export interface Singularity {
* @param positionName - Name of position to get the requirements for. Must be an exact match. * @param positionName - Name of position to get the requirements for. Must be an exact match.
* @returns CompanyPositionInfo object. * @returns CompanyPositionInfo object.
*/ */
getCompanyPositionInfo(companyName: string, positionName: JobName): CompanyPositionInfo; getCompanyPositionInfo(
companyName: CompanyName | `${CompanyName}`,
positionName: JobName | `${JobName}`,
): CompanyPositionInfo;
/** /**
* Get List of Company Positions. * Get List of Company Positions.
@ -1779,7 +1782,7 @@ export interface Singularity {
* @param companyName - Name of company to get the position list for. Must be an exact match. * @param companyName - Name of company to get the position list for. Must be an exact match.
* @returns The position list if the company name is valid. * @returns The position list if the company name is valid.
*/ */
getCompanyPositions(companyName: string): JobName[]; getCompanyPositions(companyName: CompanyName | `${CompanyName}`): JobName[];
/** /**
* Work for a company. * Work for a company.
@ -1804,7 +1807,7 @@ export interface Singularity {
* @param focus - Acquire player focus on this work operation. Optional. Defaults to true. * @param focus - Acquire player focus on this work operation. Optional. Defaults to true.
* @returns True if the player starts working, and false otherwise. * @returns True if the player starts working, and false otherwise.
*/ */
workForCompany(companyName: string, focus?: boolean): boolean; workForCompany(companyName: CompanyName, focus?: boolean): boolean;
/** /**
* Quit jobs by company. * Quit jobs by company.
@ -1816,7 +1819,7 @@ export interface Singularity {
* *
* @param companyName - Name of the company. * @param companyName - Name of the company.
*/ */
quitJob(companyName?: string): void; quitJob(companyName?: CompanyName | `${CompanyName}`): void;
/** /**
* Apply for a job at a company. * Apply for a job at a company.
@ -1837,7 +1840,7 @@ export interface Singularity {
* @param field - Field to which you want to apply. * @param field - Field to which you want to apply.
* @returns True if the player successfully get a job/promotion, and false otherwise. * @returns True if the player successfully get a job/promotion, and false otherwise.
*/ */
applyToCompany(companyName: string, field: string): boolean; applyToCompany(companyName: CompanyName | `${CompanyName}`, field: string): boolean;
/** /**
* Get company reputation. * Get company reputation.
@ -1851,7 +1854,7 @@ export interface Singularity {
* @param companyName - Name of the company. * @param companyName - Name of the company.
* @returns Amount of reputation you have at the specified company. * @returns Amount of reputation you have at the specified company.
*/ */
getCompanyRep(companyName: string): number; getCompanyRep(companyName: CompanyName | `${CompanyName}`): number;
/** /**
* Get company favor. * Get company favor.
@ -1865,7 +1868,7 @@ export interface Singularity {
* @param companyName - Name of the company. * @param companyName - Name of the company.
* @returns Amount of favor you have at the specified company. * @returns Amount of favor you have at the specified company.
*/ */
getCompanyFavor(companyName: string): number; getCompanyFavor(companyName: CompanyName | `${CompanyName}`): number;
/** /**
* Get company favor gain. * Get company favor gain.
@ -1879,7 +1882,7 @@ export interface Singularity {
* @param companyName - Name of the company. * @param companyName - Name of the company.
* @returns Amount of favor you gain at the specified company when you reset by installing Augmentations. * @returns Amount of favor you gain at the specified company when you reset by installing Augmentations.
*/ */
getCompanyFavorGain(companyName: string): number; getCompanyFavorGain(companyName: CompanyName | `${CompanyName}`): number;
/** /**
* List all current faction invitations. * List all current faction invitations.
@ -3749,7 +3752,7 @@ export interface Sleeve {
* @param companyName - Name of the company to work for. * @param companyName - Name of the company to work for.
* @returns True if the sleeve started working for this company, false otherwise. * @returns True if the sleeve started working for this company, false otherwise.
*/ */
setToCompanyWork(sleeveNumber: number, companyName: string): boolean; setToCompanyWork(sleeveNumber: number, companyName: CompanyName | `${CompanyName}`): boolean;
/** /**
* Set a sleeve to take a class at a university. * Set a sleeve to take a class at a university.
@ -3974,7 +3977,12 @@ interface WorkFormulas {
/** @returns The WorkStats applied every game cycle (200ms) by performing the specified faction work. */ /** @returns The WorkStats applied every game cycle (200ms) by performing the specified faction work. */
factionGains(person: Person, workType: FactionWorkType | `${FactionWorkType}`, favor: number): WorkStats; factionGains(person: Person, workType: FactionWorkType | `${FactionWorkType}`, favor: number): WorkStats;
/** @returns The WorkStats applied every game cycle (200ms) by performing the specified company work. */ /** @returns The WorkStats applied every game cycle (200ms) by performing the specified company work. */
companyGains(person: Person, companyName: string, workType: JobName | `${JobName}`, favor: number): WorkStats; companyGains(
person: Person,
companyName: CompanyName | `${CompanyName}`,
workType: JobName | `${JobName}`,
favor: number,
): WorkStats;
} }
/** /**
@ -6895,6 +6903,49 @@ declare enum LocationName {
Void = "The Void", Void = "The Void",
} }
/** Names of all companies
* @public */
declare enum CompanyName {
ECorp = "ECorp",
MegaCorp = "MegaCorp",
BachmanAndAssociates = "Bachman & Associates",
BladeIndustries = "Blade Industries",
NWO = "NWO",
ClarkeIncorporated = "Clarke Incorporated",
OmniTekIncorporated = "OmniTek Incorporated",
FourSigma = "Four Sigma",
KuaiGongInternational = "KuaiGong International",
FulcrumTechnologies = "Fulcrum Technologies",
StormTechnologies = "Storm Technologies",
DefComm = "DefComm",
HeliosLabs = "Helios Labs",
VitaLife = "VitaLife",
IcarusMicrosystems = "Icarus Microsystems",
UniversalEnergy = "Universal Energy",
GalacticCybersystems = "Galactic Cybersystems",
AeroCorp = "AeroCorp",
OmniaCybersystems = "Omnia Cybersystems",
SolarisSpaceSystems = "Solaris Space Systems",
DeltaOne = "DeltaOne",
GlobalPharmaceuticals = "Global Pharmaceuticals",
NovaMedical = "Nova Medical",
CIA = "Central Intelligence Agency",
NSA = "National Security Agency",
WatchdogSecurity = "Watchdog Security",
LexoCorp = "LexoCorp",
RhoConstruction = "Rho Construction",
AlphaEnterprises = "Alpha Enterprises",
Police = "Aevum Police Headquarters",
SysCoreSecurities = "SysCore Securities",
CompuTek = "CompuTek",
NetLinkTechnologies = "NetLink Technologies",
CarmichaelSecurity = "Carmichael Security",
FoodNStuff = "FoodNStuff",
JoesGuns = "Joe's Guns",
OmegaSoftware = "Omega Software",
NoodleBar = "Noodle Bar",
}
/** @public */ /** @public */
export type NSEnums = { export type NSEnums = {
CityName: typeof CityName; CityName: typeof CityName;
@ -6905,6 +6956,7 @@ export type NSEnums = {
LocationName: typeof LocationName; LocationName: typeof LocationName;
ToastVariant: typeof ToastVariant; ToastVariant: typeof ToastVariant;
UniversityClassType: typeof UniversityClassType; UniversityClassType: typeof UniversityClassType;
CompanyName: typeof CompanyName;
}; };
/** /**