From 314ff07769725d9df0c949706a53750ef279b013 Mon Sep 17 00:00:00 2001 From: Hamish Date: Mon, 7 Dec 2020 11:34:40 +0100 Subject: [PATCH 1/5] update readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index b8cf89f9..36071b7a 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -[![Support me on Patreon](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Fshieldsio-patreon.vercel.app%2Fapi%3Fusername%3Dcaret_and_stick%26type%3Dpledges%26suffix%3D%252Fmo%2520wasted&style=flat)](https://patreon.com/caret_and_stick) +[![Support this project on Patreon](https://img.shields.io/badge/Patreon-donate-purple.svg){data-external="1"}](https://patreon.com/caret_and_stick) # Token Action HUD This module populates a repositionable HUD showing the most common basic actions for a selected token. Currently the HUD supports DND5e, WFRP4e, Dungeon World, Pathfinder 2E, Pathfinder 1E, Star Wars 5e, Shadow of the Demonlord (thanks to Xacus#7239) and SFRPG (thanks to Rainer#5041). From 299ee62a17d82f6df55f11d9fc3b58605322ae0d Mon Sep 17 00:00:00 2001 From: Hamish Date: Mon, 7 Dec 2020 11:38:02 +0100 Subject: [PATCH 2/5] update readme --- readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readme.md b/readme.md index 36071b7a..44305ff3 100644 --- a/readme.md +++ b/readme.md @@ -1,4 +1,4 @@ -[![Support this project on Patreon](https://img.shields.io/badge/Patreon-donate-purple.svg){data-external="1"}](https://patreon.com/caret_and_stick) +[![Support this project on Patreon](https://img.shields.io/badge/Patreon-donate-red.svg)](https://patreon.com/caret_and_stick) Patreon donations welcome. # Token Action HUD This module populates a repositionable HUD showing the most common basic actions for a selected token. Currently the HUD supports DND5e, WFRP4e, Dungeon World, Pathfinder 2E, Pathfinder 1E, Star Wars 5e, Shadow of the Demonlord (thanks to Xacus#7239) and SFRPG (thanks to Rainer#5041). From 3720d3abe58cc6262c1fa224f0233ddb062c4740 Mon Sep 17 00:00:00 2001 From: Hamish Date: Tue, 8 Dec 2020 21:27:53 +0100 Subject: [PATCH 3/5] PF1 switch some icons --- scripts/actions/pf1/pf1-actions.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/actions/pf1/pf1-actions.js b/scripts/actions/pf1/pf1-actions.js index 3e440299..661316da 100644 --- a/scripts/actions/pf1/pf1-actions.js +++ b/scripts/actions/pf1/pf1-actions.js @@ -768,8 +768,8 @@ export class ActionHandlerPf1 extends ActionHandler { _getActionIcon(action) { const img = { //standard: ``, - immediate: ``, - swift: ``, + immediate: ``, + swift: ``, full: ``, round: ``, minute: ``, From 229765ff29914378f8b48f136a8efea10c63b378 Mon Sep 17 00:00:00 2001 From: Hamish Date: Tue, 8 Dec 2020 21:28:05 +0100 Subject: [PATCH 4/5] PF2 fix passive actions not showing --- scripts/actions/pf2e/pf2e-actions.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/scripts/actions/pf2e/pf2e-actions.js b/scripts/actions/pf2e/pf2e-actions.js index deb43cd9..4581be0a 100644 --- a/scripts/actions/pf2e/pf2e-actions.js +++ b/scripts/actions/pf2e/pf2e-actions.js @@ -147,19 +147,24 @@ export class ActionHandlerPf2e extends ActionHandler { let reactions = this.initializeEmptySubcategory(); reactions.actions = this._produceActionMap(tokenId, (filteredActions ?? []).filter(a => a.data.data.actionType.value === 'reaction' && this._actionIsShort(a)), macroType); - + let free = this.initializeEmptySubcategory(); free.actions = this._produceActionMap(tokenId, (filteredActions ?? []).filter(a => a.data.data.actionType.value === 'free' && this._actionIsShort(a)), macroType); + + let passive = this.initializeEmptySubcategory(); + passive.actions = this._produceActionMap(tokenId, (filteredActions ?? []).filter(a => a.data.data.actionType.value === 'passive' && this._actionIsShort(a)), macroType); let exploration = this.initializeEmptySubcategory(); exploration.actions = this._produceActionMap(tokenId, (filteredActions ?? []).filter(a => a.data.data.traits?.value.includes('exploration')), macroType); let downtime = this.initializeEmptySubcategory(); downtime.actions = this._produceActionMap(tokenId, (filteredActions ?? []).filter(a => a.data.data.traits?.value.includes('downtime')), macroType); + this._combineSubcategoryWithCategory(result, this.i18n('tokenactionhud.actions'), actions); this._combineSubcategoryWithCategory(result, this.i18n('tokenactionhud.reactions'), reactions); this._combineSubcategoryWithCategory(result, this.i18n('tokenactionhud.free'), free); + this._combineSubcategoryWithCategory(result, this.i18n('tokenactionhud.passive'), passive); this._combineSubcategoryWithCategory(result, this.i18n('tokenactionhud.exploration'), exploration); this._combineSubcategoryWithCategory(result, this.i18n('tokenactionhud.downtime'), downtime); @@ -422,7 +427,7 @@ export class ActionHandlerPf2e extends ActionHandler { let result = this.initializeEmptyCategory('feats'); let filter = [macroType]; - let items = (actor.items ?? []).filter(a => filter.includes(a.type)).sort(this._foundrySort);; + let items = (actor.items ?? []).filter(a => filter.includes(a.type)).sort(this._foundrySort); let active = this.initializeEmptySubcategory(); active.actions = this._produceActionMap(tokenId, (items ?? []).filter(a => a.data.data.actionType.value !== 'passive'), macroType); From 94a1aef16d3d72090635e95652a434f2034c8023 Mon Sep 17 00:00:00 2001 From: Hamish Date: Tue, 8 Dec 2020 21:54:24 +0100 Subject: [PATCH 5/5] update changelog --- changelog.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/changelog.md b/changelog.md index 3ffa418e..057b9aa8 100644 --- a/changelog.md +++ b/changelog.md @@ -1,5 +1,12 @@ # Changelog +## [0.10.3] 2020-12-07 +### Bugfix +- PF2E - Passive actions should correctly show when setting is disabled + +### Changed +- PF1E - swapped icons for immediate and swift actions + ## [0.10.2] 2020-12-07 ### Changed - PF2E - Check for null actions just in cases