Adding a Recall button that doesn't yet show a popup

This commit is contained in:
nsalyzyn 2025-12-26 19:15:26 -07:00
parent 87dfebec2f
commit 95152c0e0a
2 changed files with 18 additions and 0 deletions

View file

@ -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"

View file

@ -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',