[#3751] Add ability to automatically manually sort compendiums #5005
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds a new compendium flag
dnd5e.sorting
that sets the default sorting for a compendium if the user hasn't already adjusted the sorting. This allows for setting a compendium to be manually sorted.To implement this a new
setupModulePacks
method has been added to the module registration system that is called during setup and sets compendium applications and the sorting mode.Also adds a new
log
utility method that adds the "D&D 5e | " prefix automatically with a nice red color to make system-specific logs distinct from Foundry core logs.Closes #3751