fix(#255): allow disabling the display of skill tooltips in the agent sheet

This commit is contained in:
tobifroe
2025-09-09 12:49:37 +02:00
committed by Tobias Frölich
parent 05503bf8d9
commit fbca7824b1
4 changed files with 20 additions and 1 deletions
+2
View File
@@ -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",
+4
View File
@@ -254,4 +254,8 @@ export default function registerHandlebarsHelpers() {
return result;
});
Handlebars.registerHelper("hideSkillTooltips", () => {
return game.settings.get("deltagreen", "hideSkillTooltips");
});
}
+10
View File
@@ -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",
+4 -1
View File
@@ -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>