fix(#255): allow disabling the display of skill tooltips in the agent sheet
This commit is contained in:
@@ -395,6 +395,8 @@
|
||||
"DG.Settings.charactersheet.program": "The Program",
|
||||
"DG.Settings.sortskills.name": "Sort Skills By Column?",
|
||||
"DG.Settings.sortskills.hint": "Checked sorts by column. Unchecked sorts by row.",
|
||||
"DG.Settings.hideSkillTooltips.name": "Hide Skill Tooltips",
|
||||
"DG.Settings.hideSkillTooltips.hint": "Do not display skill tooltips in Agent sheets.",
|
||||
"DG.Settings.keepSanityPrivate.name": "Keep Sanity Private",
|
||||
"DG.Settings.keepSanityPrivate.hint": "Hide sanity from players in both Agent sheets and rolls.",
|
||||
"DG.Settings.skillImprovementFormula.name": "Default Skill Improvement Roll",
|
||||
|
||||
@@ -254,4 +254,8 @@ export default function registerHandlebarsHelpers() {
|
||||
|
||||
return result;
|
||||
});
|
||||
|
||||
Handlebars.registerHelper("hideSkillTooltips", () => {
|
||||
return game.settings.get("deltagreen", "hideSkillTooltips");
|
||||
});
|
||||
}
|
||||
|
||||
@@ -312,6 +312,16 @@ export default function registerSystemSettings() {
|
||||
default: false,
|
||||
});
|
||||
|
||||
game.settings.register("deltagreen", "hideSkillTooltips", {
|
||||
name: game.i18n.localize("DG.Settings.hideSkillTooltips.name"),
|
||||
hint: game.i18n.localize("DG.Settings.hideSkillTooltips.hint"),
|
||||
scope: "client",
|
||||
config: true,
|
||||
requiresReload: true,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
});
|
||||
|
||||
// obsolete - will be removed at some point
|
||||
game.settings.register("deltagreen", "characterSheetFont", {
|
||||
name: "World Font Choice",
|
||||
|
||||
@@ -24,7 +24,10 @@
|
||||
data-key="{{skill.key}}"
|
||||
data-rolltype="skill"
|
||||
for="system.skills.{{skill.key}}.value"
|
||||
data-tooltip="{{concat (localize (concat 'DG.Skills.Tooltip.' skill.key)) '<br><br>' (localize (ifThen skill.proficiency 'DG.Tooltip.SkillLabel' 'DG.Tooltip.CannotRollSkillLabel')) }}">
|
||||
{{#unless (hideSkillTooltips) }}
|
||||
data-tooltip="{{concat (localize (concat 'DG.Skills.Tooltip.' skill.key)) '<br><br>' (localize (ifThen skill.proficiency 'DG.Tooltip.SkillLabel' 'DG.Tooltip.CannotRollSkillLabel')) }}"
|
||||
{{/unless }}
|
||||
>
|
||||
{{localizeWithFallback (concat "DG.Skills." skill.key) skill.label }}
|
||||
<i class="fas fa-dice"></i>
|
||||
</label>
|
||||
|
||||
Reference in New Issue
Block a user