diff --git a/README.md b/README.md index 0d7c4c3..614dcd5 100644 --- a/README.md +++ b/README.md @@ -44,6 +44,11 @@ The module also depends on [Babele](https://foundryvtt.com/packages/babele) for Also see the [releases page](https://github.com/League-of-Foundry-Developers/foundryvtt-dnd5e-lang-de/releases). +### Version 1.0.1 +- update the Module to Foundry Version 0.8.6 and DND 5E system version 1.3.3 +- include sorted alphabetically for D&D 5e OGL Character Sheet. [Project page](https://foundryvtt.com/packages/5e-ogl-character-sheet) +- new option to active the alphabetically sorted for 5e OGL Character Sheet + ### Version 1.0.0 - Added compendium content translations using the Babele module diff --git a/dnd5e-de.js b/dnd5e-de.js index 0396944..97fc926 100644 --- a/dnd5e-de.js +++ b/dnd5e-de.js @@ -33,12 +33,12 @@ Hooks.once('init', () => { }); Converters(module_id); } - + // Sort skills alphabetically // Thanks to Elvis Pereira for the polish translation // Fixed in upstream 1.3.0 (https://gitlab.com/foundrynet/dnd5e/-/issues/1070) - if (!isNewerVersion(game.system.data.version, '1.2.4')) { - async function sortSkillsAlpha() { + if (!isNewerVersion(game.system.data.version, '1.3.3')) { + async function sortSkillsAlpha() { const lists = document.getElementsByClassName('skills-list'); for (let list of lists) { const competences = list.childNodes; @@ -58,6 +58,14 @@ Hooks.once('init', () => { } Hooks.on('renderActorSheet', async function () { + // Sort the skills from 5e OGL Character Sheet + if (game.modules.get('5e-ogl-character-sheet')?.active && + game.i18n.lang === module_lang && + game.system.id === module_sys && + game.settings.get(module_id, 'oglOverrideSkillSortAlpha')) { + sortSkillsAlpha(); + } + if (game.i18n.lang === module_lang && game.system.id === module_sys && game.settings.get(module_id, 'overrideSkillSortAlpha')) { diff --git a/module.json b/module.json index 9689082..de34d74 100644 --- a/module.json +++ b/module.json @@ -2,9 +2,9 @@ "name": "FoundryVTT-dnd5e-DE", "title": "DnD5e German Translation (Deutsch)", "description": "German language support for the D&D5e system", - "version": "1.0.0", + "version": "1.0.1", "minimumCoreVersion": "0.7.5", - "compatibleCoreVersion": "0.8.2", + "compatibleCoreVersion": "0.8.6", "author": "Fallayn#6414, Hydroxi#0366, Smicman#1404, ThoGri#6692, Morvar#0915, crash#7509", "esmodules": [ "dnd5e-de.js" diff --git a/src/config.js b/src/config.js index c9c9317..47975c6 100644 --- a/src/config.js +++ b/src/config.js @@ -1,7 +1,7 @@ export default [ { name: 'overrideSkillSortAlpha', - onlyUntilSystemVersionIncluding: '1.2.4', + onlyUntilSystemVersionIncluding: '1.3.3', data: { name: 'Fertigkeiten alphabetisch sortieren', hint: 'Sortiert die Fertigkeitenliste alphabetisch.', @@ -11,6 +11,18 @@ export default [ default: true }, }, + { + name: 'oglOverrideSkillSortAlpha', + onlyUntilSystemVersionIncluding: '1.3.3', + data: { + name: 'Fertigkeiten alphabetisch sortieren im 5e OGL Character Sheet', + hint: 'Sortiert die Fertigkeitenliste alphabetisch.', + scope: 'client', + type: Boolean, + config: true, + default: false + }, + }, { name: 'enableCompendiumTranslation', data: {