From 38dc2d6a56b85d1afe61f93df596d902d81d4db9 Mon Sep 17 00:00:00 2001 From: Nikhil Nagarajan Date: Tue, 27 Jan 2026 10:15:53 -0500 Subject: [PATCH] Initial test implementation for solution --- module/applications/sheets/actors/character.mjs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/module/applications/sheets/actors/character.mjs b/module/applications/sheets/actors/character.mjs index 4ecaeb06..aa197bd4 100644 --- a/module/applications/sheets/actors/character.mjs +++ b/module/applications/sheets/actors/character.mjs @@ -978,6 +978,16 @@ export default class CharacterSheet extends DHBaseActorSheet { return super._onDropItem(event, item); } + // Handle domain card drops + + if (item.type === 'domainCard') { + const {available} = this.document.system.loadoutSlot; + if (!item?.system.inVault && !available && !item?.system.loadoutIgnore) { //Check if there's space in loadout and if the item ignores loadout limits + item?.update({ 'system.inVault': true }); //Add to vault if no space (not working as intended. updateSource instead of update?) + return ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.loadoutMaxReached')); //Notify user + } + } + if (item.type === 'beastform') { if (this.document.effects.find(x => x.type === 'beastform')) { return ui.notifications.warn(