API: Change singularity.applyToCompany() to use an enum for job field (#859)

This commit is contained in:
alutman
2023-10-17 20:33:16 +11:00
committed by GitHub
parent 686d2e2b9b
commit 1a052a7daf
14 changed files with 275 additions and 34 deletions

View File

@@ -1856,7 +1856,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: CompanyName | `${CompanyName}`, field: string): boolean;
applyToCompany(companyName: CompanyName | `${CompanyName}`, field: JobField | `${JobField}`): boolean;
/**
* Get company reputation.
@@ -2423,6 +2423,7 @@ export interface Singularity {
*/
export interface CompanyPositionInfo {
name: JobName;
field: JobField;
nextPosition: JobName | null;
salary: number;
requiredReputation: number;
@@ -6860,6 +6861,23 @@ declare enum JobName {
employeePT = "Part-time Employee",
}
/** @public */
declare enum JobField {
software = "Software",
softwareConsultant = "Software Consultant",
it = "IT",
securityEngineer = "Security Engineer",
networkEngineer = "Network Engineer",
business = "Business",
businessConsultant = "Business Consultant",
security = "Security",
agent = "Agent",
employee = "Employee",
partTimeEmployee = "part-time Employee",
waiter = "Waiter",
partTimeWaiter = "part-time Waiter",
}
// CORP ENUMS - Changed to types
/** @public */
type CorpEmployeePosition =
@@ -7021,6 +7039,7 @@ export type NSEnums = {
FactionWorkType: typeof FactionWorkType;
GymType: typeof GymType;
JobName: typeof JobName;
JobField: typeof JobField;
LocationName: typeof LocationName;
ToastVariant: typeof ToastVariant;
UniversityClassType: typeof UniversityClassType;