Skip to content
This repository has been archived by the owner on Jul 10, 2021. It is now read-only.

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
espositos committed Sep 15, 2020
2 parents 449ea6d + 9af6da9 commit 3b84082
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
7 changes: 7 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## [0.7.11] 2020-09-15
### Bugfix
- Try to suppress worldtransform error (didn't do anything bad, was just annoying)

### Changed
- DND5e - if a token has 0 in a stat (e.g. vehicles in wisdom) then that save or ability will not be displayed while selected

## [0.7.10] 2020-09-15
### Bugfix
- DND5e - continue trying to fix multiple token selection.
Expand Down
5 changes: 4 additions & 1 deletion scripts/actions/dnd5e/dnd5e-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -444,6 +444,9 @@ export class ActionHandler5e extends ActionHandler {
let abbr = settings.get('abbreviateSkills');

let actions = Object.entries(game.dnd5e.config.abilities).map(e => {
if (abilities[e[0]].value === 0)
return;

let name = abbr ? e[0] : e[1];
name = name.charAt(0).toUpperCase() + name.slice(1);
let encodedValue = [macroType, tokenId, e[0]].join(this.delimiter);
Expand All @@ -456,7 +459,7 @@ export class ActionHandler5e extends ActionHandler {
return { name: name, id: e[0], encodedValue: encodedValue, icon: icon };
});
let abilityCategory = this.initializeEmptySubcategory();
abilityCategory.actions = actions;
abilityCategory.actions = actions.filter(a => !!a);

this._combineSubcategoryWithCategory(result, categoryName, abilityCategory);

Expand Down
4 changes: 2 additions & 2 deletions scripts/tokenactionhud.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,8 @@ export class TokenActionHUD extends Application {
if (hudTitle.length > 0)
hudTitle.css('top', -hudTitle[0].getBoundingClientRect().height)

if (settings.get('onTokenHover')) {
let token = canvas.tokens.placeables.find(t => t.data._id === this.targetActions.tokenId);
let token = canvas?.tokens?.placeables.find(t => t.data._id === this.targetActions?.tokenId);
if (settings.get('onTokenHover') && token) {
this.setHoverPos(token);
} else {
this.setUserPos();
Expand Down

0 comments on commit 3b84082

Please sign in to comment.