From 993f234f48594c3533ba23735999f8af68e0bd9a Mon Sep 17 00:00:00 2001 From: omuretsu <84951833+Snarling@users.noreply.github.com> Date: Tue, 11 Jul 2023 11:03:49 -0400 Subject: [PATCH] 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. --- src/PersonObjects/Sleeve/Sleeve.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/PersonObjects/Sleeve/Sleeve.ts b/src/PersonObjects/Sleeve/Sleeve.ts index ba04bb4a9..cbfbdcd81 100644 --- a/src/PersonObjects/Sleeve/Sleeve.ts +++ b/src/PersonObjects/Sleeve/Sleeve.ts @@ -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 = { + "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];