Skip to content

Commit

Permalink
Merge branch 'release/0.7.5' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
caewok committed May 23, 2024
2 parents 52daac9 + 89cf8b7 commit 0b2b844
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@

sync_to_module.sh
sync_module.sh

eslint.config.mjs
3 changes: 3 additions & 0 deletions Changelog.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 4 additions & 2 deletions scripts/AmbientSoundDocument.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
});
Expand All @@ -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 };

0 comments on commit 0b2b844

Please sign in to comment.