mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
some minor consumables fixes, more to come later (#429)
* some minor consumables fixes, more to come later * another typo T_T * more loot rename fixes * more loot fixes * Changed miscellaneous to loot --------- Co-authored-by: WBHarry <williambjrklund@gmail.com>
This commit is contained in:
parent
8cb4b7663e
commit
5215212e02
86 changed files with 5254 additions and 1049 deletions
|
|
@ -6,6 +6,6 @@ export { default as Community } from './community.mjs';
|
|||
export { default as Consumable } from './consumable.mjs';
|
||||
export { default as DomainCard } from './domainCard.mjs';
|
||||
export { default as Feature } from './feature.mjs';
|
||||
export { default as Miscellaneous } from './miscellaneous.mjs';
|
||||
export { default as Loot } from './loot.mjs';
|
||||
export { default as Subclass } from './subclass.mjs';
|
||||
export { default as Weapon } from './weapon.mjs';
|
||||
|
|
|
|||
|
|
@ -132,14 +132,14 @@ export default class ClassSheet extends DHBaseItemSheet {
|
|||
});
|
||||
}
|
||||
} else if (target.classList.contains('choice-a-section')) {
|
||||
if (item.type === 'miscellaneous' || item.type === 'consumable') {
|
||||
if (item.type === 'loot' || item.type === 'consumable') {
|
||||
const filteredChoiceA = this.document.system.inventory.choiceA;
|
||||
if (filteredChoiceA.length < 2)
|
||||
await this.document.update({
|
||||
'system.inventory.choiceA': [...filteredChoiceA.map(x => x.uuid), item.uuid]
|
||||
});
|
||||
}
|
||||
} else if (item.type === 'miscellaneous') {
|
||||
} else if (item.type === 'loot') {
|
||||
if (target.classList.contains('take-section')) {
|
||||
const filteredTake = this.document.system.inventory.take.filter(x => x);
|
||||
if (filteredTake.length < 3)
|
||||
|
|
|
|||
|
|
@ -1,15 +1,15 @@
|
|||
import DHBaseItemSheet from '../api/base-item.mjs';
|
||||
|
||||
export default class MiscellaneousSheet extends DHBaseItemSheet {
|
||||
export default class LootSheet extends DHBaseItemSheet {
|
||||
/**@inheritdoc */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ['miscellaneous'],
|
||||
classes: ['loot'],
|
||||
position: { width: 550 }
|
||||
};
|
||||
|
||||
/**@override */
|
||||
static PARTS = {
|
||||
header: { template: 'systems/daggerheart/templates/sheets/items/miscellaneous/header.hbs' },
|
||||
header: { template: 'systems/daggerheart/templates/sheets/items/loot/header.hbs' },
|
||||
tabs: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-navigation.hbs' },
|
||||
description: { template: 'systems/daggerheart/templates/sheets/global/tabs/tab-description.hbs' },
|
||||
actions: {
|
||||
|
|
@ -17,7 +17,7 @@ export default class MiscellaneousSheet extends DHBaseItemSheet {
|
|||
scrollable: ['.actions']
|
||||
},
|
||||
settings: {
|
||||
template: 'systems/daggerheart/templates/sheets/items/miscellaneous/settings.hbs',
|
||||
template: 'systems/daggerheart/templates/sheets/items/loot/settings.hbs',
|
||||
scrollable: ['.settings']
|
||||
},
|
||||
effects: {
|
||||
Loading…
Add table
Add a link
Reference in a new issue