mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 11:41:08 +01:00
Feature/178 searchbar logic to items in character sheet (#209)
* REFACTOR: remove DhpApplicationMixin REFACTOR: remove getEmbeddedDocument method from Item class REFACTOR: remove prepareData method from Actor class REFACTOR: remove _preUpdate method from Actor class * REFACTOR: rename dhpItem to DHItem REFACTOR: improvement Item#isInventoryItem getter REFACTOR: simplify Item's createDialog static method. REFACTOR: remove documentCreate template * FEAT: add SearchFilter for character-sheet Inventory and DomainCards FEAT: simplify the preparetion of inventory context --------- Co-authored-by: Joaquin Pereyra <joaquinpereyra98@users.noreply.github.com>
This commit is contained in:
parent
7114a9e749
commit
7135716da9
17 changed files with 245 additions and 254 deletions
|
|
@ -9,7 +9,8 @@ export default class DHArmor extends BaseDataItem {
|
|||
label: 'TYPES.Item.armor',
|
||||
type: 'armor',
|
||||
hasDescription: true,
|
||||
isQuantifiable: true
|
||||
isQuantifiable: true,
|
||||
isInventoryItem: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import { actionsTypes } from '../action/_module.mjs';
|
|||
* @property {string} type - The system type that this data model represents.
|
||||
* @property {boolean} hasDescription - Indicates whether items of this type have description field
|
||||
* @property {boolean} isQuantifiable - Indicates whether items of this type have quantity field
|
||||
* @property {boolean} isInventoryItem- Indicates whether items of this type is a Inventory Item
|
||||
*/
|
||||
|
||||
const fields = foundry.data.fields;
|
||||
|
|
@ -18,7 +19,8 @@ export default class BaseDataItem extends foundry.abstract.TypeDataModel {
|
|||
label: 'Base Item',
|
||||
type: 'base',
|
||||
hasDescription: false,
|
||||
isQuantifiable: false
|
||||
isQuantifiable: false,
|
||||
isInventoryItem: false,
|
||||
};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ export default class DHConsumable extends BaseDataItem {
|
|||
label: 'TYPES.Item.consumable',
|
||||
type: 'consumable',
|
||||
hasDescription: true,
|
||||
isQuantifiable: true
|
||||
isQuantifiable: true,
|
||||
isInventoryItem: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -8,7 +8,8 @@ export default class DHMiscellaneous extends BaseDataItem {
|
|||
label: 'TYPES.Item.miscellaneous',
|
||||
type: 'miscellaneous',
|
||||
hasDescription: true,
|
||||
isQuantifiable: true
|
||||
isQuantifiable: true,
|
||||
isInventoryItem: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,10 +12,8 @@ export default class DHWeapon extends BaseDataItem {
|
|||
type: 'weapon',
|
||||
hasDescription: true,
|
||||
isQuantifiable: true,
|
||||
embedded: {
|
||||
feature: 'featureTest'
|
||||
},
|
||||
hasInitialAction: true
|
||||
isInventoryItem: true,
|
||||
hasInitialAction: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue