mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 15:39:02 +01:00
Fixes
This commit is contained in:
parent
cd517252fa
commit
973e54df96
4 changed files with 13 additions and 6 deletions
|
|
@ -1080,6 +1080,9 @@
|
|||
"hint": "The number of extra Long Rest Moves the character can take during a Long Rest."
|
||||
}
|
||||
}
|
||||
},
|
||||
"maxLoadout": {
|
||||
"label": "Max Loadout Cards Bonus"
|
||||
}
|
||||
},
|
||||
"Character": {
|
||||
|
|
|
|||
|
|
@ -260,9 +260,9 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
icon: 'fa-solid fa-arrow-up',
|
||||
condition: target => getDocFromElement(target).system.inVault,
|
||||
callback: target => {
|
||||
const elem = getDocFromElement(target),
|
||||
actorLoadout = elem.actor?.system.loadoutSlot ?? null;
|
||||
if(actorLoadout?.available) return elem.update({ 'system.inVault': false });
|
||||
const doc = getDocFromElement(target),
|
||||
actorLoadout = doc.actor?.system.loadoutSlot ?? null;
|
||||
if(actorLoadout?.available) return doc.update({ 'system.inVault': false });
|
||||
ui.notifications.warn(game.i18n.format('DAGGERHEART.UI.Notifications.loadoutMaxReached', { max: actorLoadout.max }))
|
||||
}
|
||||
},
|
||||
|
|
|
|||
|
|
@ -296,8 +296,8 @@ export default function DHApplicationMixin(Base) {
|
|||
name: 'DAGGERHEART.APPLICATIONS.ContextMenu.useItem',
|
||||
icon: 'fa-solid fa-burst',
|
||||
condition: target => {
|
||||
const elem = getDocFromElement(target);
|
||||
return !(elem.type === 'domainCard' && elem.system.inVault)
|
||||
const doc = getDocFromElement(target);
|
||||
return !(doc.type === 'domainCard' && doc.system.inVault)
|
||||
},
|
||||
callback: (target, event) => getDocFromElement(target).use(event)
|
||||
});
|
||||
|
|
|
|||
|
|
@ -203,7 +203,11 @@ export default class DhCharacter extends BaseDataActor {
|
|||
})
|
||||
})
|
||||
}),
|
||||
maxLoadout : new fields.NumberField({ integer: true, initial: 0 })
|
||||
maxLoadout : new fields.NumberField({
|
||||
integer: true,
|
||||
initial: 0,
|
||||
label: 'DAGGERHEART.GENERAL.Bonuses.maxLoadout.label'
|
||||
})
|
||||
}),
|
||||
companion: new ForeignDocumentUUIDField({ type: 'Actor', nullable: true, initial: null }),
|
||||
rules: new fields.SchemaField({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue