mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-08 06:56:12 +01:00
Corrected back to actions for right items
This commit is contained in:
parent
3d735e6a09
commit
eb96e8b813
17 changed files with 148 additions and 58 deletions
|
|
@ -9,7 +9,7 @@ export default class ArmorSheet extends DHBaseItemSheet {
|
|||
{
|
||||
selector: '.features-input',
|
||||
options: () => CONFIG.DH.ITEM.armorFeatures,
|
||||
callback: ArmorSheet.#onArmorFeatureSelect
|
||||
callback: ArmorSheet.#onFeatureSelect
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -19,9 +19,9 @@ export default class ArmorSheet extends DHBaseItemSheet {
|
|||
header: { template: 'systems/daggerheart/templates/sheets/items/armor/header.hbs' },
|
||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||
features: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
|
||||
scrollable: ['.features']
|
||||
actions: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-actions.hbs',
|
||||
scrollable: ['.actions']
|
||||
},
|
||||
settings: {
|
||||
template: 'systems/daggerheart/templates/sheets/items/armor/settings.hbs',
|
||||
|
|
@ -35,7 +35,7 @@ export default class ArmorSheet extends DHBaseItemSheet {
|
|||
|
||||
switch (partId) {
|
||||
case 'settings':
|
||||
context.armorFeatures = this.document.system.armorFeatures.map(x => x.value);
|
||||
context.features = this.document.system.features.map(x => x.value);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -46,7 +46,7 @@ export default class ArmorSheet extends DHBaseItemSheet {
|
|||
* Callback function used by `tagifyElement`.
|
||||
* @param {Array<Object>} selectedOptions - The currently selected tag objects.
|
||||
*/
|
||||
static async #onArmorFeatureSelect(selectedOptions) {
|
||||
await this.document.update({ 'system.armorFeatures': selectedOptions.map(x => ({ value: x.value })) });
|
||||
static async #onFeatureSelect(selectedOptions) {
|
||||
await this.document.update({ 'system.features': selectedOptions.map(x => ({ value: x.value })) });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ export default class ConsumableSheet extends DHBaseItemSheet {
|
|||
header: { template: 'systems/daggerheart/templates/sheets/items/consumable/header.hbs' },
|
||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||
features: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
|
||||
scrollable: ['.features']
|
||||
actions: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-actions.hbs',
|
||||
scrollable: ['.actions']
|
||||
},
|
||||
settings: {
|
||||
template: 'systems/daggerheart/templates/sheets/items/consumable/settings.hbs',
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default class DomainCardSheet extends DHBaseItemSheet {
|
|||
/** @override */
|
||||
static TABS = {
|
||||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'settings' }, { id: 'effects' }],
|
||||
tabs: [{ id: 'description' }, { id: 'actions' }, { id: 'settings' }, { id: 'effects' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
}
|
||||
|
|
@ -21,9 +21,9 @@ export default class DomainCardSheet extends DHBaseItemSheet {
|
|||
header: { template: 'systems/daggerheart/templates/sheets/items/domainCard/header.hbs' },
|
||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||
features: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
|
||||
scrollable: ['.features']
|
||||
actions: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-actions.hbs',
|
||||
scrollable: ['.actions']
|
||||
},
|
||||
settings: {
|
||||
template: 'systems/daggerheart/templates/sheets/items/domainCard/settings.hbs',
|
||||
|
|
|
|||
|
|
@ -12,9 +12,9 @@ export default class MiscellaneousSheet extends DHBaseItemSheet {
|
|||
header: { template: 'systems/daggerheart/templates/sheets/items/miscellaneous/header.hbs' },
|
||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||
features: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
|
||||
scrollable: ['.features']
|
||||
actions: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-actions.hbs',
|
||||
scrollable: ['.actions']
|
||||
},
|
||||
settings: {
|
||||
template: 'systems/daggerheart/templates/sheets/items/miscellaneous/settings.hbs',
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ export default class WeaponSheet extends DHBaseItemSheet {
|
|||
{
|
||||
selector: '.features-input',
|
||||
options: () => CONFIG.DH.ITEM.weaponFeatures,
|
||||
callback: WeaponSheet.#onWeaponFeatureSelect
|
||||
callback: WeaponSheet.#onFeatureSelect
|
||||
}
|
||||
]
|
||||
};
|
||||
|
|
@ -18,9 +18,9 @@ export default class WeaponSheet extends DHBaseItemSheet {
|
|||
header: { template: 'systems/daggerheart/templates/sheets/items/weapon/header.hbs' },
|
||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||
features: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-features.hbs',
|
||||
scrollable: ['.features']
|
||||
actions: {
|
||||
template: 'systems/daggerheart/templates/sheets/global/tabs/tab-actions.hbs',
|
||||
scrollable: ['.actions']
|
||||
},
|
||||
settings: {
|
||||
template: 'systems/daggerheart/templates/sheets/items/weapon/settings.hbs',
|
||||
|
|
@ -34,7 +34,7 @@ export default class WeaponSheet extends DHBaseItemSheet {
|
|||
|
||||
switch (partId) {
|
||||
case 'settings':
|
||||
context.weaponFeatures = this.document.system.weaponFeatures.map(x => x.value);
|
||||
context.features = this.document.system.features.map(x => x.value);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ export default class WeaponSheet extends DHBaseItemSheet {
|
|||
* Callback function used by `tagifyElement`.
|
||||
* @param {Array<Object>} selectedOptions - The currently selected tag objects.
|
||||
*/
|
||||
static async #onWeaponFeatureSelect(selectedOptions) {
|
||||
await this.document.update({ 'system.weaponFeatures': selectedOptions.map(x => ({ value: x.value })) });
|
||||
static async #onFeatureSelect(selectedOptions) {
|
||||
await this.document.update({ 'system.features': selectedOptions.map(x => ({ value: x.value })) });
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue