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

This commit is contained in:
WBHarry 2025-07-07 20:14:05 +02:00
parent 52be430eff
commit 363afb97a1
9 changed files with 679 additions and 141 deletions

View file

@ -34,7 +34,7 @@ export default class WeaponSheet extends DHBaseItemSheet {
switch (partId) {
case 'settings':
context.features = this.document.system.features.map(x => x.value);
context.features = this.document.system.weaponFeatures.map(x => x.value);
break;
}
@ -46,6 +46,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 })) });
}
}