From 2a30e075ed434ca1a927274f001f701e066af722 Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Thu, 23 May 2024 15:09:15 -0700 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=A4=96=20chore|GitIgnore|Ignore=20esl?= =?UTF-8?q?int=20file?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index ed8e599..765c5d4 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,5 @@ sync_to_module.sh sync_module.sh + +eslint.config.mjs From 95921463215d88ca91c2d6e02831ac25b4425976 Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Thu, 23 May 2024 16:37:49 -0700 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=90=9B=20fix|Sound|Fix=20for=20sound?= =?UTF-8?q?=20not=20following=20token=20when=20attached?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Turns out at some point Foundry added `_onUpdate` for sound class (maybe parent class?). So use a wrap so the sound can be updated properly. Closes issue #17 (again). --- scripts/AmbientSoundDocument.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/AmbientSoundDocument.js b/scripts/AmbientSoundDocument.js index 929c347..6277b32 100644 --- a/scripts/AmbientSoundDocument.js +++ b/scripts/AmbientSoundDocument.js @@ -11,7 +11,9 @@ PATCHES.BASIC = {}; * Add AmbientSoundDocument.prototype._onUpdate to update the preview. * See AmbientLightDocument.prototype._onUpdate. */ -function _onUpdate(data, options, userId) { +function _onUpdate(wrapped, data, options, userId) { + wrapped(data, options, userId); + Object.values(this.apps).forEach(app => { if ( !app.closing ) app.preview.updateSource(data, options); }); @@ -22,4 +24,4 @@ function _onUpdate(data, options, userId) { if ( this.object ) this.object.updateSource(); // Force the sound placeable to refresh on update. Issue #15. } -PATCHES.BASIC.METHODS = { _onUpdate }; +PATCHES.BASIC.WRAPS = { _onUpdate }; From 89cf8b7ff29de8e3ab4c67c1b66c94abb0181d07 Mon Sep 17 00:00:00 2001 From: Michael Enion Date: Thu, 23 May 2024 16:40:40 -0700 Subject: [PATCH 3/3] =?UTF-8?q?=E2=9C=8F=EF=B8=8F=20docs|Changelog|Update?= =?UTF-8?q?=20for=200.7.5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Changelog.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Changelog.md b/Changelog.md index 6104cf2..dca83e1 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,3 +1,6 @@ +## 0.7.5 +Fix for sound not following the token when attached until going back to the sound controls layer. Issue #17. + ## 0.7.4 Fix for incompatibiity with Sound of Token and Token Attacher. Issues #16 and #17.