Skip to content

Commit 7782a87

Browse files
committed
0.3.1
1 parent 9d9b00b commit 7782a87

2 files changed

Lines changed: 17 additions & 3 deletions

File tree

CHANGELOG.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
## [0.3.1] - 2024-08-09
11+
12+
### Added
13+
14+
- Add support for animations on other tokens to be customized by their granter / origin.
15+
16+
### Fixed
17+
18+
- Reduce console and Sequence spam.
19+
1020
## [0.3.0] - 2024-08-08
1121

1222
### Added
@@ -145,7 +155,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
145155
[0.1.0]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.0.9...v0.1.0
146156
[0.0.9]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.0.8-alpha...v0.0.9
147157

148-
[Unreleased]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.3.0...HEAD
158+
[Unreleased]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.3.1...HEAD
159+
[0.3.1]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.3.0...v0.3.1
149160
[0.3.0]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.2.1...v0.3.0
150161
[0.2.1]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.2.0...v0.2.1
151162
[0.2.0]: https://github.com/MrVauxs/pf2e-graphics/compare/v0.1.3...v0.2.0

src/storage/AnimCore.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,9 +137,10 @@ export let AnimCore = class AnimCore {
137137
const userKeys = user.getFlag('pf2e-graphics', 'customAnimations') ?? {}
138138
const actorKeys = actor?.getFlag('pf2e-graphics', 'customAnimations') ?? {}
139139
const itemKeys = item?.getFlag('pf2e-graphics', 'customAnimations') ?? {}
140+
const itemOriginKeys = item?.origin?.getFlag('pf2e-graphics', 'customAnimations') ?? {}
140141

141-
// Priority (highest to lowest): Item > Actor > User > Global
142-
const customAnimations = merge(userKeys, merge(actorKeys, itemKeys)) as ReturnType<typeof this.getAnimations>
142+
// Priority (highest to lowest): Item > Actor (Affected) > Actor (Origin) > User > Global
143+
const customAnimations = merge(userKeys, merge(itemOriginKeys, merge(actorKeys, itemKeys))) as ReturnType<typeof this.getAnimations>
143144
const preparedOptions = this.prepRollOptions(array)
144145
const keys = merge(AnimCore.getKeys(), Object.keys(customAnimations))
145146
return keys
@@ -260,6 +261,8 @@ export let AnimCore = class AnimCore {
260261
devMessage('Animating the Following', validAnimations, { trigger, rollOptions, item, actor, source })
261262

262263
for (const anim of Object.values(validAnimations)) {
264+
if (!anim.length) return
265+
263266
const sequence = new Sequence({ inModuleName: 'pf2e-graphics', softFail: !dev })
264267

265268
for (const animation of anim) {

0 commit comments

Comments
 (0)