[Fix] 1689 - Missing Feature Errors (#1690)

* Fixed so that weaponfeatures and armorFeatures are tolerant of features having been removed

* .
This commit is contained in:
WBHarry 2026-03-04 13:16:11 +01:00 committed by GitHub
parent 5459581f7f
commit 986544a653
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 8 additions and 16 deletions

View file

@ -467,9 +467,7 @@ export const allArmorFeatures = () => {
};
export const orderedArmorFeatures = () => {
const homebrewFeatures = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).itemFeatures
.armorFeatures;
const allFeatures = { ...armorFeatures, ...homebrewFeatures };
const allFeatures = allArmorFeatures();
const all = Object.keys(allFeatures).map(key => {
const feature = allFeatures[key];
return {
@ -1404,9 +1402,7 @@ export const allWeaponFeatures = () => {
};
export const orderedWeaponFeatures = () => {
const homebrewFeatures = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).itemFeatures
.weaponFeatures;
const allFeatures = { ...weaponFeatures, ...homebrewFeatures };
const allFeatures = allWeaponFeatures();
const all = Object.keys(allFeatures).map(key => {
const feature = allFeatures[key];
return {