diff --git a/CHANGELOG.md b/CHANGELOG.md index f7a7825..2dabb94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,11 +2,16 @@ ## Version 1.6.1 - ????-??-?? +### **Features:** + +- [#255](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/255) - Added option to toggle display of tooltips per client + ### **Bug Fixes:** - [#259](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/259) - Fixed "Keep Sanity Private" setting in agent sheets. - [#263](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/263) - Fixed inability to edit item descriptions. - [#253](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/253) - Close "Automation Menu" & "Handler Settings" when settings are saved. +- [#252](https://github.com/deltagreen-foundryvtt/delta-green-foundry-vtt-system/issues/252) - Removed redundant lines in tooltip texts ## Version 1.6.0 - 2025-09-04 diff --git a/module/settings.js b/module/settings.js index 20a17bd..e9f7b11 100644 --- a/module/settings.js +++ b/module/settings.js @@ -1,5 +1,6 @@ /* eslint-disable max-classes-per-file */ import DG, { BASE_TEMPLATE_PATH } from "./config.js"; +import DGActorSheet from "./sheets/base-actor-sheet.js"; const { ApplicationV2, HandlebarsApplicationMixin } = foundry.applications.api; @@ -317,9 +318,15 @@ export default function registerSystemSettings() { hint: game.i18n.localize("DG.Settings.hideSkillTooltips.hint"), scope: "client", config: true, - requiresReload: true, type: Boolean, default: false, + onChange: () => { + foundry.applications.instances.forEach((app) => { + if (app instanceof DGActorSheet) { + app.render(); + } + }); + }, }); // obsolete - will be removed at some point diff --git a/module/sheets/base-actor-sheet.js b/module/sheets/base-actor-sheet.js index 95fca9d..657213e 100644 --- a/module/sheets/base-actor-sheet.js +++ b/module/sheets/base-actor-sheet.js @@ -399,8 +399,7 @@ export default class DGActorSheet extends DGSheetMixin(ActorSheetV2) { * @returns {void} */ _prepareSkillTooltips() { - const skillsWithTooltips = []; - for (const [_, skill] of Object.entries(this.actor.system.sortedSkills)) { + for (const skill of Object.values(this.actor.system.sortedSkills)) { skill.tooltip = game.i18n.localize(`DG.Skills.Tooltip.${skill.key}`); if (!skill.proficiency) { skill.tooltip = skill.tooltip.concat( @@ -409,9 +408,7 @@ export default class DGActorSheet extends DGSheetMixin(ActorSheetV2) { game.i18n.localize("DG.Tooltip.CannotRollSkillLabel"), ); } - skillsWithTooltips.push(skill); } - this.actor.system.sortedSkills = skillsWithTooltips; } /**