Added chat distinction for roll using target (@T:) with min or max for non disclose the target to players

This commit is contained in:
Vlyan
2022-07-31 15:29:12 +02:00
parent f8e45c1e32
commit ad427d99e4
7 changed files with 19 additions and 5 deletions

View File

@@ -7,6 +7,7 @@ __! Be certain to carefully back up any critical user data before installing thi
- Updated the initiative behaviour, he now open the DicePicker for connected players.
- Added a `game.user.isFirstGM` property for some traitements (socket and migration) to prevent multiple executions with multiple GM connected.
- Added socket API `openDicePicker` to remotely open the DicePicker (see usage below).
- Added chat distinction for roll using target (`@T:`) with `min` or `max` for non disclose the target to players.
- Added a distinction when clicking on the dice icon on Chat tab :
- Left clic, open the DP locally (as usual).
- Right clic (GM only), now open the DP for players with all skills in list.

View File

@@ -128,7 +128,8 @@
"initiative_roll": "Initiative roll",
"success_text": "Success!",
"bonus_text": "bonus successes",
"fail_text": "Fail!"
"fail_text": "Fail!",
"unknown_target": "Unknown target"
},
"dicepicker": {
"title": "Dice Picker",

View File

@@ -128,7 +128,8 @@
"initiative_roll": "Tirada de Iniciativa",
"success_text": "¡Éxito!",
"bonus_text": "Éxitos adicionales",
"fail_text": "¡Fallo!"
"fail_text": "¡Fallo!",
"unknown_target": "Unknown target"
},
"dicepicker": {
"title": "Dice Picker",

View File

@@ -128,7 +128,8 @@
"initiative_roll": "Jet d'initiative",
"success_text": "Succès !",
"bonus_text": "succès bonus",
"fail_text": "Échec !"
"fail_text": "Échec !",
"unknown_target": "Cible inconnue"
},
"dicepicker": {
"title": "Dice Picker",

View File

@@ -128,7 +128,8 @@
"initiative_roll": "Tiro Iniziativa",
"success_text": "Successo!",
"bonus_text": "successi bonus",
"fail_text": "Fallimento!"
"fail_text": "Fallimento!",
"unknown_target": "Unknown target"
},
"dicepicker": {
"title": "Selezione dadi",

View File

@@ -290,6 +290,9 @@ export class RollL5r5e extends Roll {
tooltip: isPrivate ? "" : await this.getTooltip({ from: "render" }),
total: isPrivate ? "?" : this.total,
profileImg: this.l5r5e.actor?.img || "icons/svg/mystery-man.svg",
noTargetDisclosure:
this.l5r5e.item?.system?.difficulty?.startsWith("@T:") &&
/\|m(in|ax)/.test(this.l5r5e.item.system.difficulty),
l5r5e: isPrivate
? {}
: {

View File

@@ -38,10 +38,16 @@
{{/if}}
{{#if l5r5e.target.uuid}}
<div class="l5r5e target">
<div class="l5r5e target {{#if noTargetDisclosure}}gm-only{{/if}}">
<div class="profile"><img class="profile-img" src="{{l5r5e.target.texture.src}}" alt="{{l5r5e.target.name}}" /></div>
<div class="name"> &nbsp; @UUID[{{l5r5e.target.actor.uuid}}]&#123;{{l5r5e.target.name}}&#125;</div>
</div>
{{#if noTargetDisclosure}}
<div class="l5r5e target player-only">
<div class="profile"><img class="profile-img" src="icons/svg/mystery-man.svg" alt="{{localize 'l5r5e.dice.chat.unknown_target'}}" /></div>
<div class="name"> &nbsp; {{localize 'l5r5e.dice.chat.unknown_target'}}</div>
</div>
{{/if}}
{{/if}}
{{#if l5r5e.item.uuid}}