Locked Door Alert: Use the players character (if available) as speaker

This commit is contained in:
2020-12-07 14:48:38 +01:00
parent f1574115f9
commit a926560b2c
2 changed files with 4 additions and 1 deletions

View File

@@ -1,2 +1,3 @@
## v1.0.1 (in development) ## 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 - 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

View File

@@ -179,7 +179,9 @@ function lockedDoorAlertLeftClick() {
// Create and send the chat message // Create and send the chat message
const 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.content = "Just tried to open a locked door"
message.sound = CONFIG.sounds.lock message.sound = CONFIG.sounds.lock
message.flags = {smartdoors: {sourceId: this.wall.data._id}} message.flags = {smartdoors: {sourceId: this.wall.data._id}}