From d2a23eec4ecc6b39ed722b722079e3a4dfe86924 Mon Sep 17 00:00:00 2001 From: Joe Nosie <182554+BoltsJ@users.noreply.github.com> Date: Wed, 7 Sep 2022 15:30:52 -0500 Subject: [PATCH] Update to lates lancer-inititiave library --- package-lock.json | 14 +++++++------- package.json | 2 +- src/lancer-initiative.ts | 7 ++++++- tsconfig.json | 4 ++-- 4 files changed, 16 insertions(+), 11 deletions(-) diff --git a/package-lock.json b/package-lock.json index 876fec1..2e621b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,7 +7,7 @@ "": { "license": "Apache-2.0", "dependencies": { - "lancer-initiative": "^3.0.0" + "lancer-initiative": "^3.1.0" }, "devDependencies": { "@league-of-foundry-developers/foundry-vtt-types": "^9.255.2", @@ -1248,9 +1248,9 @@ } }, "node_modules/lancer-initiative": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lancer-initiative/-/lancer-initiative-3.0.0.tgz", - "integrity": "sha512-skQH8quykByOqgcncmDufopLn2nKpHGzDzRGTQIMxZ5JKJvicgzPBC66q5aZ4GCC/L89+0iUcS6Q3ApQvTJt5w==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lancer-initiative/-/lancer-initiative-3.1.0.tgz", + "integrity": "sha512-lq2vxAjOIAiAu10RO6dbuZWH24v+h/Vm+sQoOryGmOjdymkW71d9oe99Z2JO+rGI5gO73D0UivdsH6ReF4OxVw==" }, "node_modules/merge-stream": { "version": "2.0.0", @@ -2904,9 +2904,9 @@ } }, "lancer-initiative": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/lancer-initiative/-/lancer-initiative-3.0.0.tgz", - "integrity": "sha512-skQH8quykByOqgcncmDufopLn2nKpHGzDzRGTQIMxZ5JKJvicgzPBC66q5aZ4GCC/L89+0iUcS6Q3ApQvTJt5w==" + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/lancer-initiative/-/lancer-initiative-3.1.0.tgz", + "integrity": "sha512-lq2vxAjOIAiAu10RO6dbuZWH24v+h/Vm+sQoOryGmOjdymkW71d9oe99Z2JO+rGI5gO73D0UivdsH6ReF4OxVw==" }, "merge-stream": { "version": "2.0.0", diff --git a/package.json b/package.json index 755a0a2..3ff392e 100644 --- a/package.json +++ b/package.json @@ -23,6 +23,6 @@ "license": "Apache-2.0", "repository": "https://github.com/BoltsJ/lancer-initiative.git", "dependencies": { - "lancer-initiative": "^3.0.0" + "lancer-initiative": "^3.1.0" } } diff --git a/src/lancer-initiative.ts b/src/lancer-initiative.ts index e6fb1ca..156254c 100644 --- a/src/lancer-initiative.ts +++ b/src/lancer-initiative.ts @@ -65,15 +65,20 @@ function registerSettings(): void { onChange: setAppearance, default: {}, }); + // Allows combat tracker sorting to be toggled. Optional for downstreams. game.settings.register(module, "combat-tracker-sort", { name: "LANCERINITIATIVE.SortTracker", hint: "LANCERINITIATIVE.SortTrackerDesc", scope: "world", config: true, type: Boolean, - onChange: () => game.combats?.render(), + onChange: v => { + CONFIG.LancerInitiative.sort = v; + game.combats?.render(); + }, default: true, }); + CONFIG.LancerInitiative.sort = game.settings.get(module, "combat-tracker-sort"); // Allows initiative rolling to be toggled. Optional for downstreams. game.settings.register(module, "combat-tracker-enable-initiative", { name: "LANCERINITIATIVE.EnableInitiative", diff --git a/tsconfig.json b/tsconfig.json index 971752a..40fd652 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,11 +1,11 @@ { "compilerOptions": { - "target": "ES2020", + "target": "es2022", "outDir": "./dist/", "module": "es2020", "sourceMap": true, "inlineSources": true, - "lib": ["ES6", "ES2017", "DOM"], + "lib": ["ES6", "ES2022", "DOM"], "types": ["@league-of-foundry-developers/foundry-vtt-types"], "moduleResolution": "node", "strict": true,