284 - Armor/Weapon Feature Improvements (#292)

* Added parsing of effect values from Item data model. Almost finished with itemConfig.

* Added the last to itemConfig

* Fixed armor

* ContextMenu localization fixes

* Better tooltips for tagify

* Corrected resource logic
This commit is contained in:
WBHarry 2025-07-09 13:06:49 +02:00 committed by GitHub
parent eae4f12910
commit b3e7c6b9b2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
51 changed files with 3043 additions and 2310 deletions

View file

@ -35,7 +35,7 @@ export default class ArmorSheet extends DHBaseItemSheet {
switch (partId) {
case 'settings':
context.features = this.document.system.features.map(x => x.value);
context.features = this.document.system.armorFeatures.map(x => x.value);
break;
}
@ -47,6 +47,6 @@ export default class ArmorSheet extends DHBaseItemSheet {
* @param {Array<Object>} selectedOptions - The currently selected tag objects.
*/
static async #onFeatureSelect(selectedOptions) {
await this.document.update({ 'system.features': selectedOptions.map(x => ({ value: x.value })) });
await this.document.update({ 'system.armorFeatures': selectedOptions.map(x => ({ value: x.value })) });
}
}

View file

@ -33,7 +33,7 @@ export default class WeaponSheet extends DHBaseItemSheet {
super._preparePartContext(partId, context);
switch (partId) {
case 'settings':
context.features = this.document.system.features.map(x => x.value);
context.features = this.document.system.weaponFeatures.map(x => x.value);
context.systemFields.attack.fields = this.document.system.attack.schema.fields;
break;
}
@ -45,6 +45,6 @@ export default class WeaponSheet extends DHBaseItemSheet {
* @param {Array<Object>} selectedOptions - The currently selected tag objects.
*/
static async #onFeatureSelect(selectedOptions) {
await this.document.update({ 'system.features': selectedOptions.map(x => ({ value: x.value })) });
await this.document.update({ 'system.weaponFeatures': selectedOptions.map(x => ({ value: x.value })) });
}
}