mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-15 05:01:08 +01:00
Format base actor sheet
This commit is contained in:
parent
71ee9a0065
commit
11fbb4cce8
1 changed files with 8 additions and 4 deletions
|
|
@ -70,13 +70,13 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
||||||
.hideAttribution;
|
.hideAttribution;
|
||||||
|
|
||||||
// Prepare inventory data
|
// Prepare inventory data
|
||||||
if (["party", "character"].includes(this.document.type)) {
|
if (['party', 'character'].includes(this.document.type)) {
|
||||||
context.inventory = {
|
context.inventory = {
|
||||||
currencies: {},
|
currencies: {},
|
||||||
weapons: this.document.itemTypes.weapon.sort((a, b) => a.sort - b.sort),
|
weapons: this.document.itemTypes.weapon.sort((a, b) => a.sort - b.sort),
|
||||||
armor: this.document.itemTypes.armor.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),
|
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(
|
const { title, ...currencies } = game.settings.get(
|
||||||
CONFIG.DH.id,
|
CONFIG.DH.id,
|
||||||
|
|
@ -244,7 +244,11 @@ export default class DHBaseActorSheet extends DHApplicationMixin(ActorSheetV2) {
|
||||||
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
const data = foundry.applications.ux.TextEditor.implementation.getDragEventData(event);
|
||||||
const physicalActorTypes = ['character', 'party'];
|
const physicalActorTypes = ['character', 'party'];
|
||||||
const originActor = item.actor;
|
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);
|
return super._onDropItem(event, item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue