From cf3f4325a69e797fad1bb580e4083796e838f550 Mon Sep 17 00:00:00 2001 From: Victor Cristolovean <6371154+cvl75@users.noreply.github.com> Date: Mon, 15 Jan 2024 09:38:40 +0200 Subject: [PATCH 1/3] Update validateHeroImage.ts Allow '2nd' and '3rd' as filename --- src/validation/validateHeroImage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation/validateHeroImage.ts b/src/validation/validateHeroImage.ts index a288e82..48cb52e 100644 --- a/src/validation/validateHeroImage.ts +++ b/src/validation/validateHeroImage.ts @@ -31,7 +31,7 @@ const validateHeroImage = async ( } else if (costumeVariant === 2) { costumeAppend = 'costume2'; } - const alphaName = (heroName.match(/[a-zA-Z]+/g) || []).join('').toLowerCase(); + const alphaName = (heroName.match(/[a-zA-Z23]+/g) || []).join('').toLowerCase(); const imageFile = `${heroImagesDirectory}${alphaName}${costumeAppend}.jpg`; const readFile = util.promisify(fs.readFile); let localImage; From 0a7d5af362ee0323db4acdb336bc432927691567 Mon Sep 17 00:00:00 2001 From: Victor Cristolovean <6371154+cvl75@users.noreply.github.com> Date: Tue, 16 Jan 2024 13:28:31 +0200 Subject: [PATCH 2/3] Update validateHeroImage.ts --- src/validation/validateHeroImage.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/validation/validateHeroImage.ts b/src/validation/validateHeroImage.ts index 48cb52e..a288e82 100644 --- a/src/validation/validateHeroImage.ts +++ b/src/validation/validateHeroImage.ts @@ -31,7 +31,7 @@ const validateHeroImage = async ( } else if (costumeVariant === 2) { costumeAppend = 'costume2'; } - const alphaName = (heroName.match(/[a-zA-Z23]+/g) || []).join('').toLowerCase(); + const alphaName = (heroName.match(/[a-zA-Z]+/g) || []).join('').toLowerCase(); const imageFile = `${heroImagesDirectory}${alphaName}${costumeAppend}.jpg`; const readFile = util.promisify(fs.readFile); let localImage; From 63c77535c426e7d9c1f4b6aee5be8bb04be97307 Mon Sep 17 00:00:00 2001 From: Victor Cristolovean <6371154+cvl75@users.noreply.github.com> Date: Fri, 3 Apr 2026 16:34:33 +0300 Subject: [PATCH 3/3] removed costume config check --- src/config/heroes/Costume.ts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/config/heroes/Costume.ts b/src/config/heroes/Costume.ts index aa0e675..e22c068 100644 --- a/src/config/heroes/Costume.ts +++ b/src/config/heroes/Costume.ts @@ -85,12 +85,14 @@ class Costume implements HasRequiredKeys, HasStrings, HasIntegers, HasArrays { ); } // validate bonuses are valid - if (this._bonuses && !ohp(costumesConfig.bonuses, this._bonuses)) { - throw new InvalidConfig( - this, - `${name}'s costume (${costumeVariant}) has an invalid bonus ${this._bonuses}` - ); - } + //cvl75 disabled costume config check 2026-04-03 + // if (this._bonuses && !ohp(costumesConfig.bonuses, this._bonuses)) { + // throw new InvalidConfig( + // this, + // `${name}'s costume (${costumeVariant}) has an invalid bonus ${this._bonuses}` + // ); + // } + //end cvl75 // TODO: Populate default variant if bonuses isn't set }