-
Notifications
You must be signed in to change notification settings - Fork 231
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#893] Improve permissions checks & allow compendium summoning
Adds a `SummonsData#canSummon` property that determines whether a scene is open and whether the user has permissions to summon. If not, then no summoning control is displayed in the `AbilityUseDialog` and the chat button is removed. If user is trying to summon and actor that they do not have ownership of the will be shown an error. Also introduces a check for file browser permission when creating token data if the token is set to use a wildcard image. If the user lacks permission here, then the token will fall back to using the portrait image and a warning will be displayed in the console. Adds a new `SummonsData#fetchActor` data which handles locating the actor to be summoned. If the actor is in the world, then it just returns that version. If the associated actor is in a compendium, it will first search through world actors to find one with a matching `sourceId` and the `dnd5e.summonedCopy` flag set, summoning from the pre-imported version if available. Only then will it fall back on importing the actor from the compendium so long as the user has permission to do so.
- Loading branch information
Showing
6 changed files
with
77 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters