Modifications suite beta 2
Release Creation / build (release) Failing after 1m32s

This commit is contained in:
2026-05-11 00:28:36 +02:00
parent 122cd29041
commit b44918fded
8 changed files with 2167 additions and 6 deletions
+23 -5
View File
@@ -243,16 +243,31 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
.map((s) => s.trim().toLowerCase())
.filter(Boolean);
const allGroupIds = new Set(CONFIG.l5r5e.skills.values());
// Build reverse lookups: lowercased label OR id → skillId / groupId
const skillLabelToId = new Map();
const groupLabelToId = new Map();
for (const [skillId, groupId] of CONFIG.l5r5e.skills.entries()) {
skillLabelToId.set(skillId, skillId);
const label = game.i18n.localize(`l5r5e.skills.${groupId}.${skillId}`).toLowerCase();
skillLabelToId.set(label, skillId);
}
for (const groupId of new Set(CONFIG.l5r5e.skills.values())) {
groupLabelToId.set(groupId, groupId);
const label = game.i18n.localize(`l5r5e.skills.${groupId}.title`).toLowerCase();
groupLabelToId.set(label, groupId);
}
const skillIds = [];
for (const entry of rawEntries) {
if (allGroupIds.has(entry)) {
if (groupLabelToId.has(entry)) {
// Expand group → all skills belonging to that group
const resolvedGroup = groupLabelToId.get(entry);
for (const [skillId, groupId] of CONFIG.l5r5e.skills.entries()) {
if (groupId === entry && !skillIds.includes(skillId)) skillIds.push(skillId);
if (groupId === resolvedGroup && !skillIds.includes(skillId)) skillIds.push(skillId);
}
} else if (CONFIG.l5r5e.skills.has(entry) && !skillIds.includes(entry)) {
skillIds.push(entry);
} else if (skillLabelToId.has(entry)) {
const resolvedSkill = skillLabelToId.get(entry);
if (!skillIds.includes(resolvedSkill)) skillIds.push(resolvedSkill);
}
}
@@ -266,6 +281,9 @@ export class CharacterSheetL5r5e extends BaseCharacterSheetL5r5e {
}
/**
* Override base dice picker to open Chiaroscuro d6 dialog for skill/weapon rolls.
*/
_openDicePickerForSkill(event) {
event.preventDefault();
const el = $(event.currentTarget);
const weapon = this._getWeaponInfos(el.data("weapon-id") || null);