DP : Added TN visibility for GM

This commit is contained in:
Vlyan
2022-02-12 14:27:06 +01:00
parent 5bbec503ea
commit da788d47c7
9 changed files with 25 additions and 12 deletions

View File

@@ -9,6 +9,9 @@
- Notes : Techniques in sheet need to be re-imported from the compendium or manually updated for this to work. - Notes : Techniques in sheet need to be re-imported from the compendium or manually updated for this to work.
- Compendiums : - Compendiums :
- Techniques : Added difficulty and skill values (not all techniques). - Techniques : Added difficulty and skill values (not all techniques).
- DicePicker :
- Added TN hidden difficulty visibility for GM.
- Added a selection for techniques with skill list.
Syntaxe quick explanation : Syntaxe quick explanation :
- Difficulty can be : - Difficulty can be :

View File

@@ -106,7 +106,7 @@
"opportunities": "Opportunities", "opportunities": "Opportunities",
"strife": "Strife", "strife": "Strife",
"difficulty": "TN", "difficulty": "TN",
"difficulty_hidden": "TN ???", "difficulty_hidden": "???",
"dicepicker": "Dice Picker", "dicepicker": "Dice Picker",
"void_point_used": "Void point used", "void_point_used": "Void point used",
"assistance_used": "Skill assistance used", "assistance_used": "Skill assistance used",

View File

@@ -106,7 +106,7 @@
"opportunities": "Oportunidades", "opportunities": "Oportunidades",
"strife": "Conflictos", "strife": "Conflictos",
"difficulty": "NO", "difficulty": "NO",
"difficulty_hidden": "NO ???", "difficulty_hidden": "???",
"dicepicker": "Dice Picker", "dicepicker": "Dice Picker",
"void_point_used": "Punto de Vacío utilizado", "void_point_used": "Punto de Vacío utilizado",
"assistance_used": "Asistencia de habilidad utilizada", "assistance_used": "Asistencia de habilidad utilizada",

View File

@@ -106,7 +106,7 @@
"opportunities": "Aubaines", "opportunities": "Aubaines",
"strife": "Conflits", "strife": "Conflits",
"difficulty": "ND", "difficulty": "ND",
"difficulty_hidden": "ND ???", "difficulty_hidden": "???",
"dicepicker": "Dice Picker", "dicepicker": "Dice Picker",
"void_point_used": "Point de vide utilisé", "void_point_used": "Point de vide utilisé",
"assistance_used": "Assistance de compétence utilisée", "assistance_used": "Assistance de compétence utilisée",

View File

@@ -686,7 +686,7 @@ export class DicePickerDialog extends FormApplication {
// 2: "vigilance" // 2: "vigilance"
// 3: "max" // 3: "max"
// 4: "statusRank" // 4: "statusRank"
const infos = difficulty.match(CONFIG.l5r5e.techniqueDifficulty); const infos = difficulty.match(CONFIG.l5r5e.regex.techniqueDifficulty);
if (!infos) { if (!infos) {
console.log("L5R5E | Fail to parse difficulty", difficulty); console.log("L5R5E | Fail to parse difficulty", difficulty);
return false; return false;
@@ -721,12 +721,16 @@ export class DicePickerDialog extends FormApplication {
return false; return false;
} }
// Before difficultyHiddenIsLock
this.difficulty = difficulty;
// Hide npc stats on target // Hide npc stats on target
if (infos[1] === "T") { if (infos[1] === "T") {
this.difficultyHidden = true; this.difficultyHidden = true;
this._difficultyHiddenIsLock.option = true; this._difficultyHiddenIsLock.option = true;
this.object.difficulty.targetTokenId = targetTokenId; this.object.difficulty.targetTokenId = targetTokenId;
} }
return true;
} }
// finally // finally

View File

@@ -231,6 +231,7 @@ export class RollnKeepDialog extends FormApplication {
return { return {
...super.getData(options), ...super.getData(options),
isGM: game.user.isGM,
cssClass: this.options.classes.join(" "), cssClass: this.options.classes.join(" "),
data: this.object, data: this.object,
l5r5e: this.roll.l5r5e, l5r5e: this.roll.l5r5e,

View File

@@ -17,8 +17,8 @@
<article class="tab parts part0" data-group="primary" data-tab="part0"> <article class="tab parts part0" data-group="primary" data-tab="part0">
<h1>{{localize 'l5r5e.twenty_questions.title'}}</h1> <h1>{{localize 'l5r5e.twenty_questions.title'}}</h1>
{{localize 'l5r5e.twenty_questions.part0.intro'}} {{localize 'l5r5e.twenty_questions.part0.intro'}}
<br /> <br>
<br /> <br>
<label> <label>
{{localize 'l5r5e.twenty_questions.part0.type'}} {{localize 'l5r5e.twenty_questions.part0.type'}}
<select name="template" class="skill-select"> <select name="template" class="skill-select">
@@ -29,8 +29,8 @@
{{/select}} {{/select}}
</select> </select>
</label> </label>
<br /> <br>
<br /> <br>
<i>{{localize (localize 'l5r5e.twenty_questions.part0.section{suffix}' suffix=suffix)}}</i> <i>{{localize (localize 'l5r5e.twenty_questions.part0.section{suffix}' suffix=suffix)}}</i>
<button class="next" name="next" type="button">{{localize 'l5r5e.twenty_questions.bt_next'}} <i class='fas fa-arrow-right'></i></button> <button class="next" name="next" type="button">{{localize 'l5r5e.twenty_questions.bt_next'}} <i class='fas fa-arrow-right'></i></button>
</article> </article>

View File

@@ -22,7 +22,7 @@
<span class="chat-profil-element"> <span class="chat-profil-element">
{{#if l5r5e.difficultyHidden}} {{#if l5r5e.difficultyHidden}}
{{localize 'l5r5e.chatdices.difficulty_hidden'}} {{localize 'l5r5e.chatdices.difficulty'}} {{localize 'l5r5e.chatdices.difficulty_hidden'}}
{{else}} {{else}}
{{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.difficulty}} {{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.difficulty}}
{{/if}} {{/if}}

View File

@@ -16,12 +16,17 @@
{{/if}} {{/if}}
</li> </li>
<li class="chat-profil-element"> <li class="chat-profil-element">
{{localize 'l5r5e.chatdices.difficulty'}}
{{#if l5r5e.difficultyHidden}} {{#if l5r5e.difficultyHidden}}
{{localize 'l5r5e.chatdices.difficulty_hidden'}} {{#if isGM}}
?{{l5r5e.difficulty}}?
{{else}}
{{localize 'l5r5e.chatdices.difficulty_hidden'}}
{{/if}}
{{else}} {{else}}
{{localize 'l5r5e.chatdices.difficulty'}} {{l5r5e.difficulty}} {{l5r5e.difficulty}}
{{/if}} {{/if}}
<br /> <br>
{{#if l5r5e.voidPointUsed}} {{#if l5r5e.voidPointUsed}}
<i class="i_void" title="{{localize 'l5r5e.chatdices.void_point_used'}}"></i> <i class="i_void" title="{{localize 'l5r5e.chatdices.void_point_used'}}"></i>
{{/if}} {{/if}}