Skip to content

Commit 7a23554

Browse files
committed
a
1 parent 165b081 commit 7a23554

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

index.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js.map

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

scripts/config.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -780,7 +780,7 @@ export function initConfig() {
780780

781781
async _onLeftClick(event) {
782782
ui.ARGON.interceptNextDialog(event.currentTarget);
783-
const used = await this.item.use({ event, legacy: false }, { event });
783+
const used = await this.item.use({event, legacy: false}, {event});
784784
if (used) {
785785
DND5eItemButton.consumeActionEconomy(this.activity);
786786
const useOtherItem = this.activity?.consumption?.targets?.find(t => t.type === "itemUses");
@@ -797,14 +797,14 @@ export function initConfig() {
797797
this.activity?.sheet?.render(true);
798798
}
799799

800-
static consumeActionEconomy(item) {
801-
const activationType = getActivationType(item);
800+
static consumeActionEconomy(activity) {
801+
const activationType = activity?.activation?.type;
802802
let actionType = null;
803803
for (const [type, types] of Object.entries(actionTypes)) {
804804
if (types.includes(activationType)) actionType = type;
805805
}
806806
if (!actionType) return;
807-
if (game.combat?.combatant?.actor !== item.parent) actionType = "reaction";
807+
if (game.combat?.combatant?.actor !== activity.item.parent) actionType = "reaction";
808808
if (actionType === "action") {
809809
ui.ARGON.components.main[0].isActionUsed = true;
810810
ui.ARGON.components.main[0].updateActionUse();

0 commit comments

Comments
 (0)