diff --git a/daggerheart.mjs b/daggerheart.mjs index 387c1a74..fb743553 100644 --- a/daggerheart.mjs +++ b/daggerheart.mjs @@ -80,8 +80,8 @@ Hooks.once('init', () => { Items.registerSheet(SYSTEM.id, applications.sheets.items.Subclass, { types: ['subclass'], makeDefault: true }); Items.registerSheet(SYSTEM.id, applications.sheets.items.Feature, { types: ['feature'], makeDefault: true }); Items.registerSheet(SYSTEM.id, applications.sheets.items.DomainCard, { types: ['domainCard'], makeDefault: true }); - Items.registerSheet(SYSTEM.id, applications.sheets.items.Miscellaneous, { - types: ['miscellaneous'], + Items.registerSheet(SYSTEM.id, applications.sheets.items.Loot, { + types: ['loot'], makeDefault: true }); Items.registerSheet(SYSTEM.id, applications.sheets.items.Consumable, { types: ['consumable'], makeDefault: true }); diff --git a/module/applications/sheets/actors/character.mjs b/module/applications/sheets/actors/character.mjs index d6c61718..b3d101ff 100644 --- a/module/applications/sheets/actors/character.mjs +++ b/module/applications/sheets/actors/character.mjs @@ -55,7 +55,7 @@ export default class CharacterSheet extends DHBaseActorSheet { }, { handler: CharacterSheet.#getItemContextOptions, - selector: '[data-item-uuid][data-type="consumable"], [data-item-uuid][data-type="miscellaneous"]', + selector: '[data-item-uuid][data-type="consumable"], [data-item-uuid][data-type="loot"]', options: { parentClassHooks: false, fixed: true @@ -325,7 +325,7 @@ export default class CharacterSheet extends DHBaseActorSheet { } /** - * Get the set of ContextMenu options for Consumable and Miscellaneous. + * Get the set of ContextMenu options for Consumable and Loot. * @returns {import('@client/applications/ux/context-menu.mjs').ContextMenuEntry[]} - The Array of context options passed to the ContextMenu instance * @this {CharacterSheet} * @protected diff --git a/module/applications/sheets/items/_module.mjs b/module/applications/sheets/items/_module.mjs index 84332f96..26dabcf6 100644 --- a/module/applications/sheets/items/_module.mjs +++ b/module/applications/sheets/items/_module.mjs @@ -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'; diff --git a/module/applications/sheets/items/class.mjs b/module/applications/sheets/items/class.mjs index 37db5b8d..c78e1de1 100644 --- a/module/applications/sheets/items/class.mjs +++ b/module/applications/sheets/items/class.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) diff --git a/module/applications/sheets/items/miscellaneous.mjs b/module/applications/sheets/items/loot.mjs similarity index 84% rename from module/applications/sheets/items/miscellaneous.mjs rename to module/applications/sheets/items/loot.mjs index 0b4b3139..69eaf7cc 100644 --- a/module/applications/sheets/items/miscellaneous.mjs +++ b/module/applications/sheets/items/loot.mjs @@ -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: { diff --git a/module/config/itemConfig.mjs b/module/config/itemConfig.mjs index 9deed7f1..851ddc32 100644 --- a/module/config/itemConfig.mjs +++ b/module/config/itemConfig.mjs @@ -1301,9 +1301,9 @@ export const featureTypes = { id: 'consumable', label: 'TYPES.Item.consumable' }, - miscellaneous: { - id: 'miscellaneous', - label: 'TYPES.Item.miscellaneous' + loot: { + id: 'loot', + label: 'TYPES.Item.loot' }, beastform: { if: 'beastform', diff --git a/module/data/item/_module.mjs b/module/data/item/_module.mjs index bed18eb5..382c9932 100644 --- a/module/data/item/_module.mjs +++ b/module/data/item/_module.mjs @@ -6,7 +6,7 @@ import DHCommunity from './community.mjs'; import DHConsumable from './consumable.mjs'; import DHDomainCard from './domainCard.mjs'; import DHFeature from './feature.mjs'; -import DHMiscellaneous from './miscellaneous.mjs'; +import DHLoot from './loot.mjs'; import DHSubclass from './subclass.mjs'; import DHWeapon from './weapon.mjs'; import DHBeastform from './beastform.mjs'; @@ -20,7 +20,7 @@ export { DHConsumable, DHDomainCard, DHFeature, - DHMiscellaneous, + DHLoot, DHSubclass, DHWeapon, DHBeastform @@ -35,7 +35,7 @@ export const config = { consumable: DHConsumable, domainCard: DHDomainCard, feature: DHFeature, - miscellaneous: DHMiscellaneous, + loot: DHLoot, subclass: DHSubclass, weapon: DHWeapon, beastform: DHBeastform diff --git a/module/data/item/loot.mjs b/module/data/item/loot.mjs index d934f402..2a23d338 100644 --- a/module/data/item/loot.mjs +++ b/module/data/item/loot.mjs @@ -1,5 +1,4 @@ import BaseDataItem from './base.mjs'; -import { ActionField } from '../fields/actionField.mjs'; export default class DHLoot extends BaseDataItem { /** @inheritDoc */ diff --git a/templates/sheets/actors/character/inventory.hbs b/templates/sheets/actors/character/inventory.hbs index 24f7836f..10433483 100644 --- a/templates/sheets/actors/character/inventory.hbs +++ b/templates/sheets/actors/character/inventory.hbs @@ -61,9 +61,9 @@ canCreate=true }} {{> 'daggerheart.inventory-items' - title='TYPES.Item.miscellaneous' - type='miscellaneous' - collection=document.itemTypes.miscellaneous + title='TYPES.Item.loot' + type='loot' + collection=document.itemTypes.loot isGlassy=true canCreate=true }} diff --git a/templates/ui/tooltip/miscellaneous.hbs b/templates/ui/tooltip/loot.hbs similarity index 100% rename from templates/ui/tooltip/miscellaneous.hbs rename to templates/ui/tooltip/loot.hbs