Merge branch 'main' into refactor/275-actor-sheets-simplification

This commit is contained in:
Joaquin Pereyra 2025-07-06 13:04:41 -03:00
commit b5da2a6fcc
153 changed files with 2159 additions and 2545 deletions

View file

@ -37,14 +37,14 @@ export default class DhpActor extends Actor {
game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LevelTiers).tiers
).reduce((acc, tier) => Math.max(acc, tier.levels.end), 0);
if (newLevel > maxLevel) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.Sheets.PC.Errors.tooHighLevel'));
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.tooHighLevel'));
}
await this.update({ 'system.levelData.level.changed': Math.min(newLevel, maxLevel) });
} else {
const usedLevel = Math.max(newLevel, 1);
if (newLevel < 1) {
ui.notifications.warn(game.i18n.localize('DAGGERHEART.Sheets.PC.Errors.tooLowLevel'));
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.tooLowLevel'));
}
const updatedLevelups = Object.keys(this.system.levelData.levelups).reduce((acc, level) => {
@ -415,7 +415,7 @@ export default class DhpActor extends Actor {
const cls = getDocumentClass('ChatMessage');
const systemData = {
title: game.i18n.format('DAGGERHEART.Chat.DamageRoll.Title', { damage: title }),
title: game.i18n.format('DAGGERHEART.UI.Chat.damageRoll.title', { damage: title }),
roll: rollString,
damage: {
total: rollResult.total,
@ -475,7 +475,7 @@ export default class DhpActor extends Actor {
const cls = getDocumentClass('ChatMessage');
const msg = new cls({
user: game.user.id,
content: game.i18n.format('DAGGERHEART.DamageReduction.Notifications.DamageIgnore', {
content: game.i18n.format('DAGGERHEART.UI.Notifications.damageIgnore', {
character: this.name
})
});