diff --git a/package-lock.json b/package-lock.json index 4a26c50..4312b0a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,9 @@ "name": "foundryvtt-compactBeyond5eSheet", "hasInstallScript": true, "license": "https://github.com/eastcw/foundryvtt-compactBeyond5eSheet/blob/master/LICENSE", + "dependencies": { + "all": "^0.0.0" + }, "devDependencies": { "@rollup/plugin-node-resolve": "^15.0.1", "@rollup/stream": "^2.0.0", @@ -326,6 +329,11 @@ "url": "https://github.com/sponsors/epoberezkin" } }, + "node_modules/all": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/all/-/all-0.0.0.tgz", + "integrity": "sha512-0oKlfNVv2d+d7c1gwjGspzgbwot47PGQ4b3v1ccx4mR8l9P/Y6E6Dr/yE8lNT63EcAKEbHo6UG3odDpC/NQcKw==" + }, "node_modules/ansi-colors": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", diff --git a/package.json b/package.json index d238406..1b884ad 100644 --- a/package.json +++ b/package.json @@ -54,5 +54,8 @@ "lint-staged": { "*.(js|cjs|mjs)": "eslint --fix", "*.(json|yml|scss)": "prettier --write" + }, + "dependencies": { + "all": "^0.0.0" } } diff --git a/src/module.json b/src/module.json index c01a920..dc4bf09 100644 --- a/src/module.json +++ b/src/module.json @@ -22,10 +22,11 @@ "manifest": "https://github.com/eastcw/foundryvtt-compactBeyond5eSheet/releases/latest/download/module.json", "readme": "https://github.com/eastcw/foundryvtt-compactBeyond5eSheet/blob/master/README.md", "url": "https://github.com/eastcw/foundryvtt-compactBeyond5eSheet/", - "version": "3.1.0", + "version": "3.2.0", "compatibility": { - "minimum": "11", - "verified": "11.315" + "minimum": "12", + "verified": "12.324", + "maximum": "12" }, "scripts": [], "esmodules": ["module/foundryvtt-compactBeyond5eSheet.js"], @@ -44,8 +45,8 @@ "id": "dnd5e", "type": "system", "compatibility": { - "minimum": "3.1.0", - "verified": "3.1.1" + "minimum": "3.2.0", + "verified": "3.2.0" } } ], @@ -55,7 +56,7 @@ "type": "module", "compatibility": { "minimum": "7.1.0", - "verified": "7.1.0" + "verified": "7.1.1" } } ], diff --git a/src/module/compact-beyond-5e-sheet.mjs b/src/module/compact-beyond-5e-sheet.mjs index 618b738..3fb82a6 100644 --- a/src/module/compact-beyond-5e-sheet.mjs +++ b/src/module/compact-beyond-5e-sheet.mjs @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 Andrew Krigline +// SPDX-FileCopyrightText: 2024 Andrew Krigline & Cameron East // // SPDX-License-Identifier: MIT import { CompactBeyond5e } from './foundryvtt-compactBeyond5eSheet.mjs'; @@ -28,7 +28,7 @@ export class CompactBeyond5eSheet extends dnd5e.applications.actor.ActorSheet5eC const options = super.defaultOptions; // inject our own css class and filter options - mergeObject(options, { + foundry.utils.mergeObject(options, { classes: [...options.classes, 'cb5es'], scrollY: [...options.scrollY, '.sheet-sidebar'], height: 680, @@ -122,11 +122,7 @@ export class CompactBeyond5eSheet extends dnd5e.applications.actor.ActorSheet5eC // apply the bonuses if they are equivalent if (bonuses.msak.attack === bonuses.rsak.attack) { - if (bonuses.msak.attack) { - spellAttackModFormula.push(bonuses.msak.attack); - } else { - spellAttackModFormula.push(0); - } + spellAttackModFormula.push(bonuses.msak.attack || 0); } else if (!!bonuses.msak.attack && !!bonuses.rsak.attack) { const formulaA = new Roll(bonuses.msak.attack); const formulaB = new Roll(bonuses.rsak.attack); @@ -137,7 +133,7 @@ export class CompactBeyond5eSheet extends dnd5e.applications.actor.ActorSheet5eC formulaA.evaluate({ async: false }).total, formulaB.evaluate({ async: false }.total) ); - spellAttackModFormula.push(lesserBonus ? lesserBonus : 0); + spellAttackModFormula.push(lesserBonus || 0); } } diff --git a/src/module/foundryvtt-compactBeyond5eSheet.mjs b/src/module/foundryvtt-compactBeyond5eSheet.mjs index 3c1fb22..b911ffb 100644 --- a/src/module/foundryvtt-compactBeyond5eSheet.mjs +++ b/src/module/foundryvtt-compactBeyond5eSheet.mjs @@ -1,4 +1,4 @@ -// SPDX-FileCopyrightText: 2023 Andrew Krigline +// SPDX-FileCopyrightText: 2024 Andrew Krigline & Cameron East // // SPDX-License-Identifier: MIT import { CompactBeyond5eSheet } from './compact-beyond-5e-sheet.mjs'; diff --git a/src/templates/character-sheet.hbs b/src/templates/character-sheet.hbs index 84f1cb2..7593b98 100644 --- a/src/templates/character-sheet.hbs +++ b/src/templates/character-sheet.hbs @@ -22,7 +22,7 @@ {{numberFormat ability.save decimals=0 sign=true}} - +