From 9962c05a20104f90a32a16af0424917192314068 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 25 May 2025 21:14:08 +0200 Subject: [PATCH] Changed so that equip attempts always go through and the neccessary weapons are unequipped to fascilitate it --- lang/en.json | 4 +--- module/applications/sheets/pc.mjs | 10 ++-------- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lang/en.json b/lang/en.json index d7d1ce64..08ad8781 100644 --- a/lang/en.json +++ b/lang/en.json @@ -94,9 +94,7 @@ "LacksDomain": "Your character doesn't have the domain of the card!", "MaxLoadoutReached": "You can't have any more domain cards at this level!", "DuplicateDomainCard": "You already have a domain card with that name!", - "ActionRequiresTarget": "The action requires at least one target", - "TwoHandedWeaponEquipped": "You have a two-handed weapon equipped", - "SecondaryWeaponEquipped": "You have a secondary weapon equipped" + "ActionRequiresTarget": "The action requires at least one target" } }, "General": { diff --git a/module/applications/sheets/pc.mjs b/module/applications/sheets/pc.mjs index 192b22dc..add6c3cf 100644 --- a/module/applications/sheets/pc.mjs +++ b/module/applications/sheets/pc.mjs @@ -958,10 +958,7 @@ export default class PCSheet extends DaggerheartSheet(ActorSheetV2) { currentWeapons.primary && currentWeapons.primary.burden === SYSTEM.GENERAL.burden.twoHanded.value ) { - ui.notifications.error( - game.i18n.localize('DAGGERHEART.Notification.Error.TwoHandedWeaponEquipped') - ); - return; + await this.document.items.get(currentWeapons.primary.id).update({ 'system.equipped': false }); } if (currentWeapons.secondary) { @@ -969,10 +966,7 @@ export default class PCSheet extends DaggerheartSheet(ActorSheetV2) { } } else { if (currentWeapons.secondary && item.system.burden === SYSTEM.GENERAL.burden.twoHanded.value) { - ui.notifications.error( - game.i18n.localize('DAGGERHEART.Notification.Error.SecondaryWeaponEquipped') - ); - return; + await this.document.items.get(currentWeapons.secondary.id).update({ 'system.equipped': false }); } if (currentWeapons.primary) {