From 11fbb4cce83acea82f79dd1aa8b28061420b8680 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Tue, 2 Dec 2025 03:46:55 -0500 Subject: [PATCH] Format base actor sheet --- module/applications/sheets/api/base-actor.mjs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/module/applications/sheets/api/base-actor.mjs b/module/applications/sheets/api/base-actor.mjs index 14cd1696..fab9e9f3 100644 --- a/module/applications/sheets/api/base-actor.mjs +++ b/module/applications/sheets/api/base-actor.mjs @@ -70,13 +70,13 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { .hideAttribution; // Prepare inventory data - if (["party", "character"].includes(this.document.type)) { + if (['party', 'character'].includes(this.document.type)) { context.inventory = { currencies: {}, weapons: this.document.itemTypes.weapon.sort((a, b) => a.sort - b.sort), armor: this.document.itemTypes.armor.sort((a, b) => a.sort - b.sort), consumables: this.document.itemTypes.consumable.sort((a, b) => a.sort - b.sort), - loot: this.document.itemTypes.loot.sort((a, b) => a.sort - b.sort), + loot: this.document.itemTypes.loot.sort((a, b) => a.sort - b.sort) }; const { title, ...currencies } = game.settings.get( CONFIG.DH.id, @@ -240,11 +240,15 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) { /* Application Drag/Drop */ /* -------------------------------------------- */ - async _onDropItem(event, item) { + async _onDropItem(event, item) { const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event); const physicalActorTypes = ['character', 'party']; const originActor = item.actor; - if (item.actor?.uuid === this.document.uuid || !originActor || !physicalActorTypes.includes(this.document.type)) { + if ( + item.actor?.uuid === this.document.uuid || + !originActor || + !physicalActorTypes.includes(this.document.type) + ) { return super._onDropItem(event, item); }