SINGULARITY: Added getCompanyPositions (#459)

Also workForCompany will throw an error if provided a bad company name, instead of returning false
This commit is contained in:
T.J. Eckman
2023-04-01 21:30:46 -04:00
committed by GitHub
parent 8b83791515
commit df334ea6de
3 changed files with 46 additions and 6 deletions

View File

@@ -1698,6 +1698,35 @@ export interface Singularity {
*/
getUpgradeHomeCoresCost(): number;
/**
* Get List of Company Positions.
* @remarks
* RAM cost: 2 GB * 16/4/1
*
*
* This function will return a list of positions at a specific company.
*
* This function will return the position list if the company name is valid.
*
* @example
* ```js
* // NS1:
* var COMPANY_NAME = "Noodle Bar";
*
* var jobList = singularity.getCompanyPositions(COMPANY_NAME);
* ```
* @example
* ```js
* // NS2:
* const COMPANY_NAME = "Noodle Bar";
*
* let jobList = ns.singularity.getCompanyPositions(COMPANY_NAME);
* ```
* @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): CompanyPosName[];
/**
* Work for a company.
* @remarks