From a926560b2cf8a21b39775be3847452a8467af04c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20V=C3=B6gele?= Date: Mon, 7 Dec 2020 14:48:38 +0100 Subject: [PATCH] Locked Door Alert: Use the players character (if available) as speaker --- CHANGELOG.md | 1 + main.js | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 36ca5c5..73d3a06 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,3 @@ ## v1.0.1 (in development) - When adding a door to a synchronization group adjust it's state to bring it in sync with the other doors +- Use the players character as speaker for the Locked Door Alert diff --git a/main.js b/main.js index 5888332..13360b9 100644 --- a/main.js +++ b/main.js @@ -179,7 +179,9 @@ function lockedDoorAlertLeftClick() { // Create and send the chat message const message = {} - message.user = game.user; + message.user = game.user + if (game.user.character) + message.speaker = {actor: game.user.character} message.content = "Just tried to open a locked door" message.sound = CONFIG.sounds.lock message.flags = {smartdoors: {sourceId: this.wall.data._id}}