From fc3cbf5de74e80f675f6712c9fcaf8931b5e825f Mon Sep 17 00:00:00 2001 From: TheGiddyLimit Date: Sun, 7 Jan 2024 15:53:55 +0000 Subject: [PATCH] fix(integration): avoid CPR Shield item/spell clash when using Midi SRD --- module/js/integrations/ChrisPremades.js | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/module/js/integrations/ChrisPremades.js b/module/js/integrations/ChrisPremades.js index e5d185b..6e2c092 100644 --- a/module/js/integrations/ChrisPremades.js +++ b/module/js/integrations/ChrisPremades.js @@ -123,6 +123,12 @@ export class IntegrationChrisPremades extends StartupHookMixin(IntegrationBase) "vehicle", ]); + _entsJsonBlocklist = { + "item": [ + {name: "Shield", source: Parser.SRC_PHB}, // Avoid collision with spell of the same name + ], + }; + async _pGetExpandedAddonData ( { propJson, @@ -141,6 +147,9 @@ export class IntegrationChrisPremades extends StartupHookMixin(IntegrationBase) || this._propsJsonBlocklist.has(propJson) ) return null; + const jsonBlocklist = this._entsJsonBlocklist[propJson]; + if (jsonBlocklist?.length && jsonBlocklist.some(it => fnMatch(it))) return null; + return this._pGetExpandedAddonData_pWithStubs({ propJson, path,