Skip to content

Commit

Permalink
Merge pull request #240 from roth-michael/1.11.4
Browse files Browse the repository at this point in the history
filter priorityActors to not include null/undefined
  • Loading branch information
roth-michael authored Jun 3, 2024
2 parents f80045f + 2d5cbea commit 4c12e01
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Rest Recovery Changelog

## Version 1.11.4
- Fixed bug when trying to prompt rest with non-actor tokens on the scene

## Version 1.11.3
- Fixed NPC rests when using Tidy (only from their sheet - still don't support adding them in a prompted rest)
- Due to improvements made to NPC actor data in dnd5e v3.2.0, NPCs should now mostly be able to benefit from the full Rest Recovery workflow; in dnd5e v3.1.x, however, NPC rests will simply use the core rest methods
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"id": "rest-recovery",
"title": "Rest Recovery for 5E",
"description": "Adds 5e long and short rest mechanics and variant rules, such as feats, class features, and hit-dice healing.",
"version": "1.11.3",
"version": "1.11.4",
"authors": [
{
"name": "Wasp",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
let form;
const priorityActors = Array.from(game.scenes.get(game.user.viewedScene)?.tokens?.values()).map(currToken => currToken?.actor) ?? [];
const priorityActors = Array.from(game.scenes.get(game.user.viewedScene)?.tokens?.values()).map(currToken => currToken?.actor).filter(currActor => !!currActor) ?? [];
const otherActors = Array.from(game.actors).filter(dirActor => !priorityActors.map(priActor => priActor.id).includes(dirActor.id));
const validActors = [...priorityActors, ...otherActors].reduce((acc, actor) => {
Expand Down

0 comments on commit 4c12e01

Please sign in to comment.