Fix sleeve faction work from ui

Bandaid fix. I have a much better fix in mind for this, but it will need to wait until 2.4 since it will include some breaking changes.
This commit is contained in:
omuretsu 2023-07-11 11:03:49 -04:00
parent e2655793f4
commit 993f234f48

@ -292,6 +292,12 @@ export class Sleeve extends Person implements SleevePerson {
/** TODO 2.4: Make this take in type correct data */
workForFaction(_factionName: string, _workType: string): boolean {
const workTypeConversion: Record<string, string> = {
"Hacking Contracts": "hacking",
"Field Work": "field",
"Security Work": "security",
};
if (workTypeConversion[_workType]) _workType = workTypeConversion[_workType];
const factionName = getEnumHelper("FactionName").fuzzyGetMember(_factionName);
if (!factionName) return false;
const faction = Factions[factionName];