feat: only allow specific selectable values for the cooldown duration of spells

World data (including compendium packs) is migrated automatically. In order to also migrate packs
provided by modules, you can use the following macro:
```js
const pack = game.packs.get("<name-of-the-module>.<name-of-the-pack>");
game.ds4.migration.migrateCompendiumFromTo(pack, 4, 5);
```
This commit is contained in:
Johannes Loher 2022-02-14 00:58:23 +01:00
parent 73e2d44c55
commit da1f6999eb
20 changed files with 558 additions and 876 deletions

View file

@ -18,7 +18,14 @@ export default function registerForSetupHooks(): void {
* Localizes all objects in {@link DS4.i18n} and sorts them unless they are explicitly excluded.
*/
function localizeAndSortConfigObjects() {
const noSort = ["attributes", "traits", "combatValues", "creatureSizeCategories"];
const noSort = [
"attributes",
"combatValues",
"cooldownDurations",
"creatureSizeCategories",
"spellCategories",
"traits",
];
const localizeObject = <T extends { [s: string]: string }>(obj: T, sort = true): T => {
const localized = Object.entries(obj).map(([key, value]): [string, string] => {