Added a different view for hidden roll in ChatMessage (GM/Players).
This commit is contained in:
@@ -68,10 +68,17 @@ export default class HooksL5r5e {
|
||||
* Chat Message
|
||||
*/
|
||||
static renderChatMessage(message, html, data) {
|
||||
// Add a extra CSS class to roll
|
||||
if (message.isRoll) {
|
||||
// Add an extra CSS class to roll
|
||||
html.addClass("roll");
|
||||
html.on("click", ".chat-dice-rnk", game.l5r5e.RollnKeepDialog.onChatAction.bind(this));
|
||||
|
||||
// Remove specific elements
|
||||
if (game.user.isGM) {
|
||||
html.find(".player-only").remove();
|
||||
} else {
|
||||
html.find(".gm-only").remove();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
"readme": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/README.md",
|
||||
"changelog": "https://gitlab.com/teaml5r/l5r5e/-/blob/master/CHANGELOG.md",
|
||||
"manifest": "https://gitlab.com/teaml5r/l5r5e/-/raw/master/system/system.json",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.7.2/raw/l5r5e.zip?job=build",
|
||||
"version": "1.7.2",
|
||||
"download": "https://gitlab.com/teaml5r/l5r5e/-/jobs/artifacts/v1.8.0/raw/l5r5e.zip?job=build",
|
||||
"version": "1.8.0",
|
||||
"minimumCoreVersion": "9",
|
||||
"compatibleCoreVersion": "9",
|
||||
"manifestPlusVersion": "1.0.0",
|
||||
|
||||
@@ -22,10 +22,9 @@
|
||||
|
||||
<span class="chat-profil-element">
|
||||
{{#if l5r5e.difficultyHidden}}
|
||||
{{localize 'l5r5e.dice.chat.difficulty'}} {{localize 'l5r5e.dice.chat.difficulty_hidden'}}
|
||||
{{else}}
|
||||
{{localize 'l5r5e.dice.chat.difficulty'}} {{l5r5e.difficulty}}
|
||||
<span class="player-only">{{localize 'l5r5e.dice.chat.difficulty'}} {{localize 'l5r5e.dice.chat.difficulty_hidden'}}</span>
|
||||
{{/if}}
|
||||
<span class="{{#if l5r5e.difficultyHidden}}gm-only{{/if}}">{{localize 'l5r5e.dice.chat.difficulty'}} {{l5r5e.difficulty}}</span>
|
||||
<br>
|
||||
{{#if l5r5e.voidPointUsed}}
|
||||
<i class="i_void" title="{{localize 'l5r5e.dice.chat.void_point_used'}}"></i>
|
||||
@@ -86,18 +85,17 @@
|
||||
|
||||
{{!-- Result text --}}
|
||||
{{#if ../l5r5e.difficultyHidden}}
|
||||
<div class="l5r5e dice-result-rnk unknown">
|
||||
<div class="l5r5e dice-result-rnk unknown player-only">
|
||||
{{totalSuccess}} {{localize 'l5r5e.dice.chat.successes'}}
|
||||
</div>
|
||||
{{else}}
|
||||
<div class="l5r5e dice-result-rnk {{#ifCond totalSuccess '>=' ../l5r5e.difficulty}}success{{else}}fail{{/ifCond}}">
|
||||
{{#ifCond totalSuccess '>=' ../l5r5e.difficulty}}
|
||||
{{localize "l5r5e.dice.chat.success_text"}} <i title="{{totalBonus}} {{localize 'l5r5e.dice.chat.successes'}}">({{totalBonus}} {{localize "l5r5e.dice.chat.bonus_text"}})</i>
|
||||
{{else}}
|
||||
{{localize "l5r5e.dice.chat.fail_text"}}
|
||||
{{/ifCond}}
|
||||
</div>
|
||||
{{/if}}
|
||||
<div class="l5r5e dice-result-rnk {{#ifCond totalSuccess '>=' ../l5r5e.difficulty}}success{{else}}fail{{/ifCond}} {{#if ../l5r5e.difficultyHidden}}gm-only{{/if}}">
|
||||
{{#ifCond totalSuccess '>=' ../l5r5e.difficulty}}
|
||||
{{localize "l5r5e.dice.chat.success_text"}} <i title="{{totalBonus}} {{localize 'l5r5e.dice.chat.successes'}}">({{totalBonus}} {{localize "l5r5e.dice.chat.bonus_text"}})</i>
|
||||
{{else}}
|
||||
{{localize "l5r5e.dice.chat.fail_text"}}
|
||||
{{/ifCond}}
|
||||
</div>
|
||||
{{/l5r5e.summary}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
Reference in New Issue
Block a user