Remove ability use buttons for not owned abilities (#795)

This commit is contained in:
Dapoulp 2025-08-10 19:38:42 +02:00 committed by GitHub
parent 8aa46f4cd1
commit 6acb6c16c7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -69,6 +69,11 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
break;
}
}
if(!game.user.isGM && !this.isAuthor && !this.speakerActor?.isOwner) {
const buttons = html.querySelectorAll(".ability-card-footer > .ability-use-button");
buttons.forEach(b => b.remove());
}
}
addChatListeners(html) {