From 09da6ac63f3570ce554fa1360328516461046943 Mon Sep 17 00:00:00 2001 From: zeddrak <57454318+zeddrak@users.noreply.github.com> Date: Thu, 27 Jan 2022 11:36:06 -0800 Subject: [PATCH 1/2] Make crimes detection a little more friendly Initially just wanted to change "traffick" to "traffic" (as that supports both the American and British spelling), but then noticed there were a couple of other ones that could be made slightly less restrictive to improve detection. All changes make detection LESS RESTRICTIVE for the player (ie, they have more ways to provide the parameter), none are MORE RESTRICTIVE (ie, won't break any existing code, etc. Anything that worked before will still work, but now a few things that may not have worked before - like "traffic arms" (without the k), "illegal arms", and "assassin" will work. (Also allowed for the common misspelling of "forgary") --- src/Crime/CrimeHelpers.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Crime/CrimeHelpers.ts b/src/Crime/CrimeHelpers.ts index 8ef8ac311..8f184acd9 100644 --- a/src/Crime/CrimeHelpers.ts +++ b/src/Crime/CrimeHelpers.ts @@ -42,9 +42,9 @@ export function findCrime(roughName: string): Crime | null { return Crimes.Larceny; } else if (roughName.includes("drugs")) { return Crimes.DealDrugs; - } else if (roughName.includes("bond") && roughName.includes("forge")) { + } else if (roughName.includes("bond") && roughName.includes("forg")) { return Crimes.BondForgery; - } else if (roughName.includes("traffick") && roughName.includes("arms")) { + } else if ((roughName.includes("traffic") || (roughName.includes("illegal")) && roughName.includes("arms")) { return Crimes.TraffickArms; } else if (roughName.includes("homicide")) { return Crimes.Homicide; @@ -52,7 +52,7 @@ export function findCrime(roughName: string): Crime | null { return Crimes.GrandTheftAuto; } else if (roughName.includes("kidnap")) { return Crimes.Kidnap; - } else if (roughName.includes("assassinate") || roughName.includes("assassination")) { + } else if (roughName.includes("assassin")) { return Crimes.Assassination; } else if (roughName.includes("heist")) { return Crimes.Heist; From a4b8a9ffd55054e16e3693dcd332da0acba0636d Mon Sep 17 00:00:00 2001 From: hydroflame <79246165+hydroflame@users.noreply.github.com> Date: Thu, 27 Jan 2022 20:51:48 -0500 Subject: [PATCH 2/2] Update CrimeHelpers.ts --- src/Crime/CrimeHelpers.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Crime/CrimeHelpers.ts b/src/Crime/CrimeHelpers.ts index 8f184acd9..7fe5b446d 100644 --- a/src/Crime/CrimeHelpers.ts +++ b/src/Crime/CrimeHelpers.ts @@ -42,7 +42,7 @@ export function findCrime(roughName: string): Crime | null { return Crimes.Larceny; } else if (roughName.includes("drugs")) { return Crimes.DealDrugs; - } else if (roughName.includes("bond") && roughName.includes("forg")) { + } else if (roughName.includes("bond") && roughName.includes("forge")) { return Crimes.BondForgery; } else if ((roughName.includes("traffic") || (roughName.includes("illegal")) && roughName.includes("arms")) { return Crimes.TraffickArms;