Skip to content

Commit

Permalink
release 2.2.3
Browse files Browse the repository at this point in the history
  • Loading branch information
Drental committed Feb 17, 2022
1 parent f98b420 commit 11a380c
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 5 deletions.
6 changes: 6 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## [2.2.3] 2022-02-17

### Changed

- pf2e - restore inventory after 3.4

## [2.2.2] 2022-02-15

### Changed
Expand Down
4 changes: 2 additions & 2 deletions module.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
],
"url": "https://github.com/Drental/fvtt-tokenactionhud",
"flags": {},
"version": "2.2.2",
"version": "2.2.3",
"minimumCoreVersion": "9.236",
"compatibleCoreVersion": "9",
"scripts": ["./lib/tagify/tagify.min.js", "./scripts/bundle.min.js"],
Expand Down Expand Up @@ -103,7 +103,7 @@
"dependencies": [],
"socket": false,
"manifest": "https://github.com/Drental/fvtt-tokenactionhud/releases/latest/download/module.json",
"download": "https://github.com/Drental/fvtt-tokenactionhud/releases/download/2.2.2/module.zip",
"download": "https://github.com/Drental/fvtt-tokenactionhud/releases/download/2.2.3/module.zip",
"protected": false,
"coreTranslation": false,
"library": false
Expand Down
6 changes: 3 additions & 3 deletions scripts/actions/pf2e/pf2e-actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,21 +203,21 @@ export class ActionHandlerPf2e extends ActionHandler {
let items = (actor.items ?? [])
.filter(
(a) =>
a.data.data.equipped?.value && !a.data.data.containerId?.value?.length
["held","worn"].includes(a.data.data.equipped?.carryType) && !a.data.data.containerId?.value?.length
)
.filter((i) => filter.includes(i.data.type))
.sort(this._foundrySort);

let weaponList = items.filter((i) => i.type === "weapon");
if (actor.data.type === "character")
weaponList = weaponList.filter((i) => i.data.data.equipped.value);
weaponList = weaponList.filter((i) => ["held","worn"].includes(i.data.data.equipped?.carryType));
let weaponActions = this._buildItemActions(tokenId, macroType, weaponList);
let weapons = this.initializeEmptySubcategory();
weapons.actions = weaponActions;

let armourList = items.filter((i) => i.type === "armor");
if (actor.data.type === "character")
armourList = armourList.filter((i) => i.data.data.equipped.value);
armourList = armourList.filter((i) => ["held","worn"].includes(i.data.data.equipped?.carryType));
let armourActions = this._buildItemActions(tokenId, macroType, armourList);
let armour = this.initializeEmptySubcategory();
armour.actions = armourActions;
Expand Down

0 comments on commit 11a380c

Please sign in to comment.