Fix/857 generic roll buttons (#866)

* Action Macro working again

* Remove buttons from generic roll for non-gm
This commit is contained in:
Dapoulp 2025-08-12 16:47:59 +02:00 committed by GitHub
parent e90355b08b
commit f62e51c4f6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 27 additions and 69 deletions

View file

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