Skip to content

Commit

Permalink
finished preparing for v12 & 5e 3.2
Browse files Browse the repository at this point in the history
  • Loading branch information
eastcw committed May 26, 2024
1 parent d573da8 commit bc2502a
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 16 deletions.
8 changes: 8 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,5 +54,8 @@
"lint-staged": {
"*.(js|cjs|mjs)": "eslint --fix",
"*.(json|yml|scss)": "prettier --write"
},
"dependencies": {
"all": "^0.0.0"
}
}
13 changes: 7 additions & 6 deletions src/module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"],
Expand All @@ -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"
}
}
],
Expand All @@ -55,7 +56,7 @@
"type": "module",
"compatibility": {
"minimum": "7.1.0",
"verified": "7.1.0"
"verified": "7.1.1"
}
}
],
Expand Down
12 changes: 4 additions & 8 deletions src/module/compact-beyond-5e-sheet.mjs
Original file line number Diff line number Diff line change
@@ -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';
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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);
Expand All @@ -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);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/module/foundryvtt-compactBeyond5eSheet.mjs
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
2 changes: 1 addition & 1 deletion src/templates/character-sheet.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<span class="ability-save" data-tooltip="{{ localize 'DND5E.SavingThrow' }}">{{numberFormat ability.save decimals=0
sign=true}}</span>
</div>
<a class="config-button" data-action="ability" data-tooltip="{{localize 'DND5E.AbilityConfigure'}}">
<a class="config-button" data-action="ability" data-tooltip="{{localize "DND5E.AbilityConfigure" ability=ability.label}}">
<i class="fas fa-cog"></i>
</a>
</li>
Expand Down

0 comments on commit bc2502a

Please sign in to comment.