Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release 2.2.1 #794

Merged
merged 2 commits into from
May 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# v2.2.1

## Bugfixes
* [#793] Spell Book won't open on Foundry thick client: Object.groupBy is not a function

---

# v2.2.0

## Enhancements
Expand Down
15 changes: 11 additions & 4 deletions system/src/apps/SpellBookSD.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,17 @@ export default class SpellBookSD extends FormApplication {
// load all spells for class based on source filter
const spells = await shadowdark.compendiums.classSpellBook(this.classID);

// group spells by tier
this.data.spellList = Object.groupBy(
Array.from(spells.values()), ({system}) => system.tier
);
const spellList = {};
for (const spell of spells) {
const tier = spell.system.tier;
if (!spellList[tier]) {
spellList[tier] = [];
}

spellList[tier].push(spell);
}

this.data.spellList = spellList;

return this.data;
}
Expand Down
2 changes: 1 addition & 1 deletion system/system.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "shadowdark",
"title": "Shadowdark RPG",
"desciption": "A system for playing the Shadowdark RPG from Arcane Library",
"version": "2.2.0",
"version": "2.2.1",
"compatibility": {
"minimum": "11",
"verified": "12"
Expand Down