mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
REFACTOR: rename dhpItem to DHItem
REFACTOR: improvement Item#isInventoryItem getter REFACTOR: simplify Item's createDialog static method. REFACTOR: remove documentCreate template
This commit is contained in:
parent
a4881854a3
commit
15b696398c
9 changed files with 61 additions and 115 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,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* @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;
|
||||
|
|
@ -16,7 +17,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,9 +12,7 @@ export default class DHWeapon extends BaseDataItem {
|
|||
type: 'weapon',
|
||||
hasDescription: true,
|
||||
isQuantifiable: true,
|
||||
embedded: {
|
||||
feature: 'featureTest'
|
||||
}
|
||||
isInventoryItem: true,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue