Fix the localization function and provide a special placeholder for when the user doesn't have a die assigned to their stat
This commit is contained in:
parent
c1ee1a9ef8
commit
2065596686
6 changed files with 71 additions and 40 deletions
|
|
@ -87,7 +87,7 @@ export class PlayerSheetv2 extends GenericActorSheet {
|
|||
name: game.i18n.format(`dotdungeon.skills.${skill}`),
|
||||
value,
|
||||
formula: `1` + stat.value + modifierToString(value, { spaces: true }),
|
||||
rollDisabled: stat.value === `` || value === -1,
|
||||
rollDisabled: value === -1,
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ export function localizer(key, args = {}, depth = 0) {
|
|||
const subkey = match.groups.key;
|
||||
localized =
|
||||
localized.slice(0, match.index)
|
||||
+ localizer(subkey.slice(1), args, depth + 1)
|
||||
+ localized.slice(match.index + subkey.length)
|
||||
+ localizer(subkey, args, depth + 1)
|
||||
+ localized.slice(match.index + subkey.length + 1)
|
||||
};
|
||||
return localized;
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue