Skip to content

Commit 54c2267

Browse files
committed
a
1 parent 78ddcbe commit 54c2267

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
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

+6-2
Original file line numberDiff line numberDiff line change
@@ -753,6 +753,10 @@ export function initConfig() {
753753
return this.color;
754754
}
755755

756+
get id() {
757+
return `${this.type}-${this.color}`
758+
}
759+
756760
get label() {
757761
switch (this.type) {
758762
case "spell":
@@ -824,9 +828,9 @@ export function initConfig() {
824828
uses: this.actor.system.spells[`spell${level}`],
825829
});
826830
}
827-
return new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanel({ accordionPanelCategories: spells.filter((spell) => spell.buttons.length).map(({ label, buttons, uses }) => new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanelCategory({ label, buttons, uses })) });
831+
return new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanel({ id: this.id, accordionPanelCategories: spells.filter((spell) => spell.buttons.length).map(({ label, buttons, uses }) => new ARGON.MAIN.BUTTON_PANELS.ACCORDION.AccordionPanelCategory({ label, buttons, uses })) });
828832
} else {
829-
return new ARGON.MAIN.BUTTON_PANELS.ButtonPanel({ buttons: this.items.map((item) => new DND5eItemButton({ item })) });
833+
return new ARGON.MAIN.BUTTON_PANELS.ButtonPanel({ id: this.id, buttons: this.items.map((item) => new DND5eItemButton({ item })) });
830834
}
831835
}
832836
}

0 commit comments

Comments
 (0)