Remove buttons from generic roll for non-gm

This commit is contained in:
Dapoolp 2025-08-12 04:15:48 +02:00
parent e64a046000
commit 01a7f52ed7
2 changed files with 8 additions and 4 deletions

View file

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

View file

@ -8,7 +8,7 @@
<h4 class="dice-total">{{total}}</h4> <h4 class="dice-total">{{total}}</h4>
</div> </div>
</div> </div>
<div class="roll-buttons"> <div class="roll-buttons apply-buttons">
<button class="simple-roll-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button> <button class="simple-roll-button">{{localize "DAGGERHEART.UI.Chat.damageRoll.dealDamage"}}</button>
<button class="simple-roll-button" data-type="healing">{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}</button> <button class="simple-roll-button" data-type="healing">{{localize "DAGGERHEART.UI.Chat.healingRoll.applyHealing"}}</button>
</div> </div>