From 0c3fc958fe2ef220aaa251ade457863e6afb4a5a Mon Sep 17 00:00:00 2001 From: TheLastScrub <67403321+TheLastScrub@users.noreply.github.com> Date: Sun, 14 Mar 2021 16:25:26 -0700 Subject: [PATCH] added missing localization keys for break point --- lang/en.json | 4 +++- lang/es.json | 4 +++- lang/ja.json | 4 +++- module/actor/actor-sheet.js | 12 +++--------- templates/actor/actor-sheet.html | 2 +- 5 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lang/en.json b/lang/en.json index 2e4b8c9..5a46739 100644 --- a/lang/en.json +++ b/lang/en.json @@ -214,5 +214,7 @@ "DG.ModifyDamageRollDialogue.OuterModifierTooltip": "Use this field to modify the outer part of the formula, such as to double the result.", "DG.ModifyDamageRollDialogue.InnerModifierTooltip": "Use this field to add a flat modifier such as '+1' or another dice term such as '+1d4'.", - "DG.Roll.Inhuman": "Inhuman" + "DG.Roll.Inhuman": "Inhuman", + "DG.Tooltip.BreakPoint": "The current breaking point, reset when current sanity falls to or below this value. The starting breaking point is SAN - POW.", + "DG.Tooltip.BreakPointReset": "Reset breaking point to be current SAN - WP." } \ No newline at end of file diff --git a/lang/es.json b/lang/es.json index 42dd84f..c9b5c93 100644 --- a/lang/es.json +++ b/lang/es.json @@ -214,5 +214,7 @@ "DG.ModifyDamageRollDialogue.OuterModifierTooltip": "Utilice este campo para modificar la fórmula, como duplicar el resultado.", "DG.ModifyDamageRollDialogue.InnerModifierTooltip": "Utilice este campo para añadir un modificador como '+1' u otro término como '+1d4'.", - "DG.Roll.Inhuman": "Inhuman" + "DG.Roll.Inhuman": "Inhuman", + "DG.Tooltip.BreakPoint": "The current breaking point, reset when current sanity falls to or below this value. The starting breaking point is SAN - POW.", + "DG.Tooltip.BreakPointReset": "Reset breaking point to be current SAN - WP." } \ No newline at end of file diff --git a/lang/ja.json b/lang/ja.json index 17137dc..bf70607 100644 --- a/lang/ja.json +++ b/lang/ja.json @@ -214,5 +214,7 @@ "DG.ModifyDamageRollDialogue.OuterModifierTooltip": "ここでダイスの式の外を変えられる、結果を二倍にするために使われる。", "DG.ModifyDamageRollDialogue.InnerModifierTooltip": "ここでダイスの式の内側を変えられる、結果を「+1」とか、「+1d4」とかにするために使われる。", - "DG.Roll.Inhuman": "人ならざるもの" + "DG.Roll.Inhuman": "人ならざるもの", + "DG.Tooltip.BreakPoint": "現在のブレーキポイント。初めの数値は「正気 ー 判断力」。", + "DG.Tooltip.BreakPointReset": "ブレーキポイントをレセットする。新しい数値は「正気 ー 判断力」。" } \ No newline at end of file diff --git a/module/actor/actor-sheet.js b/module/actor/actor-sheet.js index c5c6ec1..20cf667 100644 --- a/module/actor/actor-sheet.js +++ b/module/actor/actor-sheet.js @@ -322,19 +322,13 @@ export class DeltaGreenActorSheet extends ActorSheet { let requestedModifyRoll = (event && event.shiftKey || event.which === 3); //(event && (event.shiftKey || event.altKey || event.ctrlKey || event.metaKey)); // check the 'data-target="something" property to determine how to grab the target for the roll - let inhuman_flag = false; // inhuman_flag to be used for stats above 20 if(rollType === "skill" || rollType === "typeskill"){ targetVal = dataset.target; label = game.i18n.localize(label).toUpperCase(); } else if(dataset.target === "statistic.x5"){ let stat = this.actor.data.data.statistics[key]; - if (stat.value>=20){ - targetVal = stat.value; - inhuman_flag = true; // you use the value instead of the x5 but you set the inhuman_flag to true - }else{ - targetVal = stat.x5; - } + targetVal = stat.x5; label = game.i18n.localize("DG.Attributes." + key).toUpperCase(); } else if(rollType === "sanity"){ @@ -362,7 +356,7 @@ export class DeltaGreenActorSheet extends ActorSheet { } else{ if(requestedModifyRoll){ - showModifyPercentileTestDialogue(this.actor, label, targetVal, isLethalityRoll,inhuman_flag); + showModifyPercentileTestDialogue(this.actor, label, targetVal, isLethalityRoll); } else{ if(isLethalityRoll) @@ -370,7 +364,7 @@ export class DeltaGreenActorSheet extends ActorSheet { sendLethalityTestToChat(this.actor, label, targetVal); } else{ - sendPercentileTestToChat(this.actor, label, targetVal,inhuman_flag); + sendPercentileTestToChat(this.actor, label, targetVal); } } } diff --git a/templates/actor/actor-sheet.html b/templates/actor/actor-sheet.html index faa99e5..cd4ed46 100644 --- a/templates/actor/actor-sheet.html +++ b/templates/actor/actor-sheet.html @@ -153,7 +153,7 @@
- + {{localize 'DG.Mental.Reset'}}