mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Adding a Recall button that doesn't yet show a popup
This commit is contained in:
parent
87dfebec2f
commit
95152c0e0a
2 changed files with 18 additions and 0 deletions
|
|
@ -326,6 +326,7 @@
|
|||
"equip": "Equip",
|
||||
"sendToChat": "Send To Chat",
|
||||
"toLoadout": "Send to Loadout",
|
||||
"recall": "Recall",
|
||||
"toVault": "Send to Vault",
|
||||
"unequip": "Unequip",
|
||||
"useItem": "Use Item"
|
||||
|
|
|
|||
|
|
@ -318,6 +318,23 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.loadoutMaxReached'));
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'recall',
|
||||
icon: 'fa-solid fa-bolt-lightning',
|
||||
condition: target => {
|
||||
const doc = getDocFromElementSync(target);
|
||||
return doc && doc.system.inVault;
|
||||
},
|
||||
callback: async target => {
|
||||
const doc = await getDocFromElement(target);
|
||||
const actorLoadout = doc.actor.system.loadoutSlot;
|
||||
if (!actorLoadout.available) {
|
||||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.loadoutMaxReached'));
|
||||
return;
|
||||
}
|
||||
return doc.update({ 'system.inVault': false });
|
||||
}
|
||||
},
|
||||
{
|
||||
name: 'toVault',
|
||||
icon: 'fa-solid fa-arrow-down',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue