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 |
| --- | --- |
| [CityName](./bitburner.cityname.md) | Names of all cities |
| [CompanyName](./bitburner.companyname.md) | Names of all companies |
| [CrimeType](./bitburner.crimetype.md) | |
| [FactionWorkType](./bitburner.factionworktype.md) | |
| [GymType](./bitburner.gymtype.md) | |

@ -17,7 +17,8 @@ export type NSEnums = {
LocationName: typeof LocationName;
ToastVariant: typeof ToastVariant;
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:**
```typescript
jobs: Record<string, string>;
jobs: Partial<Record<CompanyName, JobName>>;
```

@ -18,7 +18,7 @@ interface Player extends Person
| --- | --- | --- | --- |
| [entropy](./bitburner.player.entropy.md) | | number | |
| [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 | |
| [money](./bitburner.player.money.md) | | number | |
| [numPeopleKilled](./bitburner.player.numpeoplekilled.md) | | number | |

@ -9,14 +9,14 @@ Apply for a job at a company.
**Signature:**
```typescript
applyToCompany(companyName: string, field: string): boolean;
applyToCompany(companyName: CompanyName | `${CompanyName}`, field: string): boolean;
```
## Parameters
| 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. |
**Returns:**

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

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

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

@ -9,14 +9,14 @@ Get List of Company Positions.
**Signature:**
```typescript
getCompanyPositions(companyName: string): JobName[];
getCompanyPositions(companyName: CompanyName | `${CompanyName}`): JobName[];
```
## Parameters
| 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:**

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

@ -9,14 +9,14 @@ Quit jobs by company.
**Signature:**
```typescript
quitJob(companyName?: string): void;
quitJob(companyName?: CompanyName | `${CompanyName}`): void;
```
## Parameters
| 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:**

@ -9,14 +9,14 @@ Work for a company.
**Signature:**
```typescript
workForCompany(companyName: string, focus?: boolean): boolean;
workForCompany(companyName: CompanyName, focus?: boolean): boolean;
```
## Parameters
| 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. |
**Returns:**

@ -9,7 +9,7 @@ Set a sleeve to work for a company.
**Signature:**
```typescript
setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
setToCompanyWork(sleeveNumber: number, companyName: CompanyName | `${CompanyName}`): boolean;
```
## Parameters
@ -17,7 +17,7 @@ setToCompanyWork(sleeveNumber: number, companyName: string): boolean;
| Parameter | Type | Description |
| --- | --- | --- |
| 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:**

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

@ -7,7 +7,12 @@
**Signature:**
```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
@ -15,7 +20,7 @@ companyGains(person: Person, companyName: string, workType: JobName | `${JobName
| Parameter | Type | Description |
| --- | --- | --- |
| 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)<!-- -->}\` | |
| favor | number | |

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

@ -47,7 +47,7 @@ interface Player extends Person {
money: number;
numPeopleKilled: number;
entropy: number;
jobs: Record<string, string>;
jobs: Partial<Record<CompanyName, JobName>>;
factions: string[];
totalPlaytime: number;
location: string;
@ -980,7 +980,7 @@ type SleeveClassTask = {
};
/** @public */
type SleeveCompanyTask = { type: "COMPANY"; companyName: string };
type SleeveCompanyTask = { type: "COMPANY"; companyName: CompanyName };
/** @public */
type SleeveCrimeTask = {
@ -1759,7 +1759,10 @@ export interface Singularity {
* @param positionName - Name of position to get the requirements for. Must be an exact match.
* @returns CompanyPositionInfo object.
*/
getCompanyPositionInfo(companyName: string, positionName: JobName): CompanyPositionInfo;
getCompanyPositionInfo(
companyName: CompanyName | `${CompanyName}`,
positionName: JobName | `${JobName}`,
): CompanyPositionInfo;
/**
* 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.
* @returns The position list if the company name is valid.
*/
getCompanyPositions(companyName: string): JobName[];
getCompanyPositions(companyName: CompanyName | `${CompanyName}`): JobName[];
/**
* Work for a company.
@ -1804,7 +1807,7 @@ export interface Singularity {
* @param focus - Acquire player focus on this work operation. Optional. Defaults to true.
* @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.
@ -1816,7 +1819,7 @@ export interface Singularity {
*
* @param companyName - Name of the company.
*/
quitJob(companyName?: string): void;
quitJob(companyName?: CompanyName | `${CompanyName}`): void;
/**
* Apply for a job at a company.
@ -1837,7 +1840,7 @@ export interface Singularity {
* @param field - Field to which you want to apply.
* @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.
@ -1851,7 +1854,7 @@ export interface Singularity {
* @param companyName - Name of the company.
* @returns Amount of reputation you have at the specified company.
*/
getCompanyRep(companyName: string): number;
getCompanyRep(companyName: CompanyName | `${CompanyName}`): number;
/**
* Get company favor.
@ -1865,7 +1868,7 @@ export interface Singularity {
* @param companyName - Name of the company.
* @returns Amount of favor you have at the specified company.
*/
getCompanyFavor(companyName: string): number;
getCompanyFavor(companyName: CompanyName | `${CompanyName}`): number;
/**
* Get company favor gain.
@ -1879,7 +1882,7 @@ export interface Singularity {
* @param companyName - Name of the company.
* @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.
@ -3749,7 +3752,7 @@ export interface Sleeve {
* @param companyName - Name of the company to work for.
* @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.
@ -3974,7 +3977,12 @@ interface WorkFormulas {
/** @returns The WorkStats applied every game cycle (200ms) by performing the specified faction work. */
factionGains(person: Person, workType: FactionWorkType | `${FactionWorkType}`, favor: number): WorkStats;
/** @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",
}
/** 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 */
export type NSEnums = {
CityName: typeof CityName;
@ -6905,6 +6956,7 @@ export type NSEnums = {
LocationName: typeof LocationName;
ToastVariant: typeof ToastVariant;
UniversityClassType: typeof UniversityClassType;
CompanyName: typeof CompanyName;
};
/**