Update vtt types
This commit is contained in:
parent
623558dc78
commit
c57960c153
24 changed files with 144 additions and 107 deletions
|
@ -6,6 +6,7 @@
|
|||
// SPDX-License-Identifier: MIT
|
||||
|
||||
import { DS4 } from "../config";
|
||||
import { getGame } from "../helpers";
|
||||
|
||||
export default function registerForSetupHooks(): void {
|
||||
Hooks.once("setup", () => {
|
||||
|
@ -21,7 +22,7 @@ function localizeAndSortConfigObjects() {
|
|||
|
||||
const localizeObject = <T extends { [s: string]: string }>(obj: T, sort = true): T => {
|
||||
const localized = Object.entries(obj).map(([key, value]) => {
|
||||
return [key, game.i18n.localize(value)];
|
||||
return [key, getGame().i18n.localize(value)];
|
||||
});
|
||||
if (sort) localized.sort((a, b) => a[1].localeCompare(b[1]));
|
||||
return Object.fromEntries(localized);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue