From 49a3e081041ffc4499c577c8e9943b81a0461f29 Mon Sep 17 00:00:00 2001 From: Hamish Date: Tue, 15 Sep 2020 09:21:15 +0200 Subject: [PATCH 1/3] Try to suppress worldtransform error --- scripts/tokenactionhud.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/tokenactionhud.js b/scripts/tokenactionhud.js index 4b564256..fa2027b3 100644 --- a/scripts/tokenactionhud.js +++ b/scripts/tokenactionhud.js @@ -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(); From 78bb7ebf900bca7ea81b334ed9caf13e97b013f5 Mon Sep 17 00:00:00 2001 From: Hamish Date: Tue, 15 Sep 2020 09:21:34 +0200 Subject: [PATCH 2/3] Don't show ability checks for abilities with value 0 --- scripts/actions/dnd5e/dnd5e-actions.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/scripts/actions/dnd5e/dnd5e-actions.js b/scripts/actions/dnd5e/dnd5e-actions.js index fd18c1c7..d59cdaba 100644 --- a/scripts/actions/dnd5e/dnd5e-actions.js +++ b/scripts/actions/dnd5e/dnd5e-actions.js @@ -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); @@ -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); From 9af6da97d662f380fa0a48d2bea3cab8094f0f82 Mon Sep 17 00:00:00 2001 From: Hamish Date: Tue, 15 Sep 2020 09:21:49 +0200 Subject: [PATCH 3/3] update changelog --- changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.md b/changelog.md index 3288e863..a8f0821e 100644 --- a/changelog.md +++ b/changelog.md @@ -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.