mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-17 23:49:02 +01:00
Remove buttons from generic roll for non-gm
This commit is contained in:
parent
e64a046000
commit
01a7f52ed7
2 changed files with 8 additions and 4 deletions
|
|
@ -70,11 +70,15 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!game.user.isGM && !this.isAuthor && !this.speakerActor?.isOwner) {
|
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");
|
const buttons = html.querySelectorAll(".ability-card-footer > .ability-use-button");
|
||||||
buttons.forEach(b => b.remove());
|
buttons.forEach(b => b.remove());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
addChatListeners(html) {
|
addChatListeners(html) {
|
||||||
html.querySelectorAll('.damage-button').forEach(element =>
|
html.querySelectorAll('.damage-button').forEach(element =>
|
||||||
|
|
|
||||||
|
|
@ -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>
|
||||||
Loading…
Add table
Add a link
Reference in a new issue