mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-03-07 22:46:12 +01:00
Merge branch 'main' into refactor/275-actor-sheets-simplification
This commit is contained in:
commit
b5da2a6fcc
153 changed files with 2159 additions and 2545 deletions
|
|
@ -41,7 +41,7 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.format('DAGGERHEART.CharacterCreation.Title', { actor: this.character.name });
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.CharacterCreation.title', { actor: this.character.name });
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -87,14 +87,14 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
|||
cssClass: '',
|
||||
group: 'primary',
|
||||
id: 'setup',
|
||||
label: 'DAGGERHEART.CharacterCreation.Tabs.Setup'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.setup'
|
||||
},
|
||||
equipment: {
|
||||
active: false,
|
||||
cssClass: '',
|
||||
group: 'primary',
|
||||
id: 'equipment',
|
||||
label: 'DAGGERHEART.CharacterCreation.Tabs.Equipment',
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.equipment',
|
||||
optional: true
|
||||
}
|
||||
// story: {
|
||||
|
|
@ -102,7 +102,7 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
|||
// cssClass: '',
|
||||
// group: 'primary',
|
||||
// id: 'story',
|
||||
// label: 'DAGGERHEART.CharacterCreation.Tabs.Story',
|
||||
// label: 'DAGGERHEART.GENERAL.Tabs.story',
|
||||
// optional: true
|
||||
// }
|
||||
};
|
||||
|
|
@ -188,7 +188,7 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
|||
context.suggestedTraits = this.setup.class.system
|
||||
? Object.keys(this.setup.class.system.characterGuide.suggestedTraits).map(traitKey => {
|
||||
const trait = this.setup.class.system.characterGuide.suggestedTraits[traitKey];
|
||||
return `${game.i18n.localize(`DAGGERHEART.Abilities.${traitKey}.short`)} ${trait > 0 ? `+${trait}` : trait}`;
|
||||
return `${game.i18n.localize(`DAGGERHEART.CONFIG.Traits.${traitKey}.short`)} ${trait > 0 ? `+${trait}` : trait}`;
|
||||
})
|
||||
: [];
|
||||
context.traits = {
|
||||
|
|
@ -417,9 +417,7 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
|||
};
|
||||
} else if (item.type === 'subclass' && event.target.closest('.subclass-card')) {
|
||||
if (this.setup.class.system.subclasses.every(subclass => subclass.uuid !== item.uuid)) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.SubclassNotInClass')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.subclassNotInClass'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -430,68 +428,58 @@ export default class DhCharacterCreation extends HandlebarsApplicationMixin(Appl
|
|||
};
|
||||
} else if (item.type === 'domainCard' && event.target.closest('.domain-card')) {
|
||||
if (!this.setup.class.uuid) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.MissingClass'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.missingClass'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!this.setup.class.system.domains.includes(item.system.domain)) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.WrongDomain'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.wrongDomain'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.system.level > 1) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.CardTooHighLevel')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.cardTooHighLevel'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (Object.values(this.setup.domainCards).some(card => card.uuid === item.uuid)) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.DuplicateCard'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.duplicateCard'));
|
||||
return;
|
||||
}
|
||||
|
||||
this.setup.domainCards[event.target.closest('.domain-card').dataset.card] = { ...item, uuid: item.uuid };
|
||||
} else if (item.type === 'armor' && event.target.closest('.armor-card')) {
|
||||
if (item.system.tier > 1) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.ItemTooHighTier')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.itemTooHighTier'));
|
||||
return;
|
||||
}
|
||||
|
||||
this.equipment.armor = { ...item, uuid: item.uuid };
|
||||
} else if (item.type === 'weapon' && event.target.closest('.primary-weapon-card')) {
|
||||
if (item.system.secondary) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.NotPrimary'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.notPrimary'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.system.tier > 1) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.ItemTooHighTier')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.itemTooHighTier'));
|
||||
return;
|
||||
}
|
||||
|
||||
this.equipment.primaryWeapon = { ...item, uuid: item.uuid };
|
||||
} else if (item.type === 'weapon' && event.target.closest('.secondary-weapon-card')) {
|
||||
if (this.equipment.primaryWeapon?.system?.burden === burden.twoHanded.value) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.PrimaryIsTwoHanded')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.primaryIsTwoHanded'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!item.system.secondary) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.NotSecondary'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.notSecondary'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.system.tier > 1) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.CharacterCreation.Notifications.ItemTooHighTier')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.itemTooHighTier'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default class BeastformDialog extends HandlebarsApplicationMixin(Applicat
|
|||
};
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.Sheets.Beastform.dialogTitle');
|
||||
return game.i18n.localize('DAGGERHEART.ITEMS.Beastform.dialogTitle');
|
||||
}
|
||||
|
||||
/** @override */
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.DamageReduction.Title');
|
||||
return game.i18n.localize('DAGGERHEART.APPLICATIONS.DamageReduction.title');
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -79,7 +79,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
|
|||
|
||||
/** @inheritDoc */
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.DamageReduction.Title');
|
||||
return game.i18n.localize('DAGGERHEART.APPLICATIONS.DamageReduction.title');
|
||||
}
|
||||
|
||||
async _prepareContext(_options) {
|
||||
|
|
@ -136,14 +136,12 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
|
|||
const currentMark = this.marks[target.dataset.type][target.dataset.key];
|
||||
const { selectedStressMarks, stressReductions, currentMarks, currentDamage } = this.getDamageInfo();
|
||||
if (!currentMark.selected && currentDamage === 0) {
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.DamageReduction.Notifications.DamageAlreadyNone'));
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.damageAlreadyNone'));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!currentMark.selected && currentMarks === this.actor.system.armorScore) {
|
||||
ui.notifications.info(
|
||||
game.i18n.localize('DAGGERHEART.DamageReduction.Notifications.NoAvailableArmorMarks')
|
||||
);
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noAvailableArmorMarks'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -187,7 +185,7 @@ export default class DamageReductionDialog extends HandlebarsApplicationMixin(Ap
|
|||
const currentStress =
|
||||
this.actor.system.resources.stress.value + selectedStressMarks.length + stressReductionStress;
|
||||
if (currentStress + stressReduction.cost > this.actor.system.resources.stress.maxTotal) {
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.DamageReduction.Notifications.NotEnoughStress'));
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.notEnoughStress'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default class DhpDeathMove extends HandlebarsApplicationMixin(Application
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.format('DAGGERHEART.Application.DeathMove.Title', { actor: this.actor.name });
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.DeathMove.title', { actor: this.actor.name });
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
|||
static selectMove(_, button) {
|
||||
const nrSelected = Object.values(this.moveData.moves).reduce((acc, x) => acc + (x.selected ?? 0), 0);
|
||||
if (nrSelected === this.moveData.nrChoices) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.Downtime.Notifications.NoMoreMoves'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.noMoreMoves'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ export default class DhpDowntime extends HandlebarsApplicationMixin(ApplicationV
|
|||
content: await foundry.applications.handlebars.renderTemplate(
|
||||
'systems/daggerheart/templates/ui/chat/downtime.hbs',
|
||||
{
|
||||
title: `${this.actor.name} - ${game.i18n.localize(`DAGGERHEART.Downtime.${this.shortRest ? 'ShortRest' : 'LongRest'}.title`)}`,
|
||||
title: `${this.actor.name} - ${game.i18n.localize(`DAGGERHEART.APPLICATIONS.Downtime.${this.shortRest ? 'shortRest' : 'longRest'}.title`)}`,
|
||||
moves: moves
|
||||
}
|
||||
)
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ export default class OwnershipSelection extends HandlebarsApplicationMixin(Appli
|
|||
};
|
||||
|
||||
get title() {
|
||||
return game.i18n.format('DAGGERHEART.OwnershipSelection.Title', { name: this.name });
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.OwnershipSelection.title', { name: this.name });
|
||||
}
|
||||
|
||||
async _prepareContext(_options) {
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ export default class DhCharacterLevelUp extends LevelUpBase {
|
|||
? Math.min(domainCard.secondaryData.limit, levelBase)
|
||||
: levelBase;
|
||||
|
||||
return game.i18n.format('DAGGERHEART.Application.LevelUp.Selections.emptyDomainCardHint', {
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.Levelup.selections.emptyDomainCardHint', {
|
||||
domain: game.i18n.localize(domains[domain.domain].label),
|
||||
level: levelMax
|
||||
});
|
||||
|
|
|
|||
|
|
@ -63,8 +63,8 @@ export default class DhCompanionLevelUp extends BaseLevelUp {
|
|||
|
||||
context.vicious = advancementChoices.vicious ? Object.values(advancementChoices.vicious) : null;
|
||||
context.viciousChoices = {
|
||||
damage: game.i18n.localize('DAGGERHEART.Application.LevelUp.Selections.viciousDamage'),
|
||||
range: game.i18n.localize('DAGGERHEART.Application.LevelUp.Selections.viciousRange')
|
||||
damage: game.i18n.localize('DAGGERHEART.APPLICATIONS.Levelup.selections.viciousDamage'),
|
||||
range: game.i18n.localize('DAGGERHEART.APPLICATIONS.Levelup.selections.viciousRange')
|
||||
};
|
||||
|
||||
break;
|
||||
|
|
@ -142,7 +142,7 @@ export default class DhCompanionLevelUp extends BaseLevelUp {
|
|||
: null,
|
||||
range: advancement.vicious?.range
|
||||
? {
|
||||
old: game.i18n.localize(`DAGGERHEART.Range.${actorRange}.name`),
|
||||
old: game.i18n.localize(`DAGGERHEART.CONFIG.Range.${actorRange}.name`),
|
||||
new: game.i18n.localize(advancement.vicious.range.label)
|
||||
}
|
||||
: null
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.format('DAGGERHEART.Application.LevelUp.Title', { actor: this.actor.name });
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.Levelup.title', { actor: this.actor.name });
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -56,7 +56,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
group: 'primary',
|
||||
id: 'advancements',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.Application.LevelUp.Tabs.advancement'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.advancement'
|
||||
},
|
||||
selections: {
|
||||
active: false,
|
||||
|
|
@ -64,7 +64,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
group: 'primary',
|
||||
id: 'selections',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.Application.LevelUp.Tabs.selections'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.selections'
|
||||
},
|
||||
summary: {
|
||||
active: false,
|
||||
|
|
@ -72,7 +72,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
group: 'primary',
|
||||
id: 'summary',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.Application.LevelUp.Tabs.summary'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.summary'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -110,14 +110,14 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
previous: {
|
||||
disabled: !previous,
|
||||
label: previous
|
||||
? game.i18n.format('DAGGERHEART.Application.LevelUp.navigateLevel', { level: previous })
|
||||
? game.i18n.format('DAGGERHEART.APPLICATIONS.Levelup.navigateLevel', { level: previous })
|
||||
: '',
|
||||
fromSummary: this.tabGroups.primary === 'summary'
|
||||
},
|
||||
next: {
|
||||
disabled: !this.levelup.currentLevelFinished,
|
||||
label: next
|
||||
? game.i18n.format('DAGGERHEART.Application.LevelUp.navigateLevel', { level: next })
|
||||
? game.i18n.format('DAGGERHEART.APPLICATIONS.Levelup.navigateLevel', { level: next })
|
||||
: '',
|
||||
toSummary: !next,
|
||||
show: this.tabGroups.primary !== 'summary'
|
||||
|
|
@ -384,9 +384,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
);
|
||||
|
||||
if (!updatePath) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.Application.LevelUp.notifications.error.noSelectionsLeft')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.noSelectionsLeft'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -414,18 +412,14 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
!this.actor.system.domains.includes(item.system.domain) &&
|
||||
this.levelup.classUpgradeChoices?.multiclass?.domain !== item.system.domain
|
||||
) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.Application.LevelUp.notifications.error.domainCardWrongDomain')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.domainCardWrongDomain'));
|
||||
return;
|
||||
}
|
||||
|
||||
const levelBase = isMulticlass ? Math.ceil(this.levelup.currentLevel / 2) : this.levelup.currentLevel;
|
||||
const levelMax = target.dataset.limit ? Math.min(Number(target.dataset.limit), levelBase) : levelBase;
|
||||
if (levelMax < item.system.level) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.Application.LevelUp.notifications.error.domainCardToHighLevel')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.domainCardToHighLevel'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -443,9 +437,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
return achievementExists || advancementExists;
|
||||
});
|
||||
if (cardExistsInCharacter || cardExistsInLevelup) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.Application.LevelUp.notifications.error.domainCardDuplicate')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.domainCardDuplicate'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -456,9 +448,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
const target = event.target.closest('.multiclass-cards');
|
||||
if (item.type === 'class') {
|
||||
if (item.name === this.actor.system.class.value.name) {
|
||||
ui.notifications.error(
|
||||
game.i18n.localize('DAGGERHEART.Application.LevelUp.notifications.error.alreadySelectedClass')
|
||||
);
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.alreadySelectedClass'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -498,9 +488,7 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
}
|
||||
} else {
|
||||
if (this.levelup.levels[this.levelup.currentLevel].nrSelections.available < Number(button.dataset.cost)) {
|
||||
ui.notifications.info(
|
||||
game.i18n.localize('DAGGERHEART.Application.LevelUp.notifications.info.insufficentAdvancements')
|
||||
);
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.insufficentAdvancements'));
|
||||
this.render();
|
||||
return;
|
||||
}
|
||||
|
|
@ -571,9 +559,9 @@ export default class DhlevelUp extends HandlebarsApplicationMixin(ApplicationV2)
|
|||
if (!button.dataset.forward) {
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.localize('DAGGERHEART.Application.LevelUp.Delevel.title')
|
||||
title: game.i18n.localize('DAGGERHEART.APPLICATIONS.Levelup.delevel.title')
|
||||
},
|
||||
content: game.i18n.format('DAGGERHEART.Application.LevelUp.Delevel.content')
|
||||
content: game.i18n.format('DAGGERHEART.APPLICATIONS.Levelup.delevel.content')
|
||||
});
|
||||
|
||||
if (!confirmed) return;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.Settings.Menu.Appearance.name');
|
||||
return game.i18n.localize('DAGGERHEART.SETTINGS.Menu.appearance.name');
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default class DhAutomationSettings extends HandlebarsApplicationMixin(App
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.Settings.Menu.Automation.Name');
|
||||
return game.i18n.localize('DAGGERHEART.SETTINGS.Menu.automation.name');
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.Settings.Menu.Homebrew.Name');
|
||||
return game.i18n.localize('DAGGERHEART.SETTINGS.Menu.homebrew.name');
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -59,7 +59,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
static async addItem(_, target) {
|
||||
await this.settings.updateSource({
|
||||
[`restMoves.${target.dataset.type}.moves.${foundry.utils.randomID()}`]: {
|
||||
name: game.i18n.localize('DAGGERHEART.Settings.Homebrew.NewDowntimeMove'),
|
||||
name: game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.newDowntimeMove'),
|
||||
img: 'icons/magic/life/cross-worn-green.webp',
|
||||
description: '',
|
||||
actions: []
|
||||
|
|
@ -74,7 +74,7 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
new DhSettingsActionView(
|
||||
resolve,
|
||||
reject,
|
||||
game.i18n.localize('DAGGERHEART.Settings.Homebrew.DowntimeMoves'),
|
||||
game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.downtimeMoves'),
|
||||
move.name,
|
||||
move.img,
|
||||
move.description,
|
||||
|
|
@ -104,13 +104,13 @@ export default class DhHomebrewSettings extends HandlebarsApplicationMixin(Appli
|
|||
static async resetMoves(_, target) {
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.format('DAGGERHEART.Settings.Homebrew.ResetMovesTitle', {
|
||||
title: game.i18n.format('DAGGERHEART.SETTINGS.Homebrew.resetMovesTitle', {
|
||||
type: game.i18n.localize(
|
||||
`DAGGERHEART.Downtime.${target.dataset.type === 'shortRest' ? 'ShortRest' : 'LongRest'}.title`
|
||||
`DAGGERHEART.APPLICATIONS.Downtime.${target.dataset.type === 'shortRest' ? 'shortRest' : 'longRest'}.title`
|
||||
)
|
||||
})
|
||||
},
|
||||
content: game.i18n.localize('DAGGERHEART.Settings.Homebrew.ResetMovesText')
|
||||
content: game.i18n.localize('DAGGERHEART.SETTINGS.Homebrew.resetMovesText')
|
||||
});
|
||||
|
||||
if (!confirmed) return;
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default class DhRangeMeasurementSettings extends HandlebarsApplicationMix
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.Settings.Menu.Automation.Name');
|
||||
return game.i18n.localize('DAGGERHEART.SETTINGS.Menu.automation.name');
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default class DHVariantRuleSettings extends HandlebarsApplicationMixin(Ap
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.localize('DAGGERHEART.Settings.Menu.VariantRules.name');
|
||||
return game.i18n.localize('DAGGERHEART.SETTINGS.Menu.variantRules.name');
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
}
|
||||
|
||||
get title() {
|
||||
return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}: ${this.action.name}`;
|
||||
return `${game.i18n.localize('DAGGERHEART.GENERAL.Tabs.settings')}: ${this.action.name}`;
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -117,7 +117,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
|
||||
const settingsTiers = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.LevelTiers).tiers;
|
||||
context.tierOptions = [
|
||||
{ key: 1, label: game.i18n.localize('DAGGERHEART.Tiers.tier1') },
|
||||
{ key: 1, label: game.i18n.localize('DAGGERHEART.GENERAL.Tiers.tier1') },
|
||||
...Object.values(settingsTiers).map(x => ({ key: x.tier, label: x.name }))
|
||||
];
|
||||
|
||||
|
|
@ -132,7 +132,7 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
disableOption(index, options, choices) {
|
||||
const filtered = foundry.utils.deepClone(options);
|
||||
Object.keys(filtered).forEach(o => {
|
||||
if (choices.find((c, idx) => c.type === o && index !== idx)) delete filtered[o];
|
||||
if (choices.find((c, idx) => c.type === o && index !== idx)) filtered[o].disabled = true;
|
||||
});
|
||||
return filtered;
|
||||
}
|
||||
|
|
@ -181,11 +181,11 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
|
||||
}
|
||||
|
||||
static removeElement(event) {
|
||||
static removeElement(event, button) {
|
||||
event.stopPropagation();
|
||||
const data = this.action.toObject(),
|
||||
key = event.target.closest('[data-key]').dataset.key,
|
||||
index = event.target.dataset.index;
|
||||
index = button.dataset.index;
|
||||
data[key].splice(index, 1);
|
||||
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
|
||||
}
|
||||
|
|
@ -197,10 +197,10 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
|
||||
}
|
||||
|
||||
static removeDamage(event) {
|
||||
static removeDamage(event, button) {
|
||||
if (!this.action.damage.parts) return;
|
||||
const data = this.action.toObject(),
|
||||
index = event.target.dataset.index;
|
||||
index = button.dataset.index;
|
||||
data.damage.parts.splice(index, 1);
|
||||
this.constructor.updateForm.bind(this)(null, null, { object: foundry.utils.flattenObject(data) });
|
||||
}
|
||||
|
|
@ -229,9 +229,9 @@ export default class DHActionConfig extends DaggerheartSheet(ApplicationV2) {
|
|||
};
|
||||
}
|
||||
|
||||
static removeEffect(event) {
|
||||
static removeEffect(event, button) {
|
||||
if (!this.action.effects) return;
|
||||
const index = event.target.dataset.index,
|
||||
const index = button.dataset.index,
|
||||
effectId = this.action.effects[index]._id;
|
||||
this.constructor.removeElement.bind(this)(event);
|
||||
this.action.item.deleteEmbeddedDocuments('ActiveEffect', [effectId]);
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
|||
}
|
||||
|
||||
get title() {
|
||||
return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}`;
|
||||
return `${game.i18n.localize('DAGGERHEART.GENERAL.Tabs.settings')}`;
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -69,7 +69,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'details',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.details'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.details'
|
||||
},
|
||||
attack: {
|
||||
active: false,
|
||||
|
|
@ -77,7 +77,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'attack',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.attack'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.attack'
|
||||
},
|
||||
experiences: {
|
||||
active: false,
|
||||
|
|
@ -85,7 +85,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'experiences',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.experiences'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.experiences'
|
||||
},
|
||||
features: {
|
||||
active: false,
|
||||
|
|
@ -93,7 +93,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'features',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.features'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.features'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export default class DHCompanionSettings extends HandlebarsApplicationMixin(Appl
|
|||
}
|
||||
|
||||
get title() {
|
||||
return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}`;
|
||||
return `${game.i18n.localize('DAGGERHEART.GENERAL.Tabs.settings')}`;
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -59,7 +59,7 @@ export default class DHCompanionSettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'details',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.details'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.details'
|
||||
},
|
||||
experiences: {
|
||||
active: false,
|
||||
|
|
@ -67,7 +67,7 @@ export default class DHCompanionSettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'experiences',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.experiences'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.experiences'
|
||||
},
|
||||
attack: {
|
||||
active: false,
|
||||
|
|
@ -75,7 +75,7 @@ export default class DHCompanionSettings extends HandlebarsApplicationMixin(Appl
|
|||
group: 'primary',
|
||||
id: 'attack',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.attack'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.attack'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
}
|
||||
|
||||
get title() {
|
||||
return `${game.i18n.localize('DAGGERHEART.Sheets.TABS.settings')}`;
|
||||
return `${game.i18n.localize('DAGGERHEART.GENERAL.Tabs.settings')}`;
|
||||
}
|
||||
|
||||
static DEFAULT_OPTIONS = {
|
||||
|
|
@ -68,7 +68,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
group: 'primary',
|
||||
id: 'details',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.details'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.details'
|
||||
},
|
||||
features: {
|
||||
active: false,
|
||||
|
|
@ -76,7 +76,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
group: 'primary',
|
||||
id: 'features',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.features'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.features'
|
||||
},
|
||||
adversaries: {
|
||||
active: false,
|
||||
|
|
@ -84,7 +84,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
group: 'primary',
|
||||
id: 'adversaries',
|
||||
icon: null,
|
||||
label: 'DAGGERHEART.General.tabs.adversaries'
|
||||
label: 'DAGGERHEART.GENERAL.Tabs.adversaries'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -146,7 +146,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
static async #addCategory() {
|
||||
await this.actor.update({
|
||||
[`system.potentialAdversaries.${foundry.utils.randomID()}.label`]: game.i18n.localize(
|
||||
'DAGGERHEART.Sheets.Environment.newAdversary'
|
||||
'DAGGERHEART.ACTORS.Environment.newAdversary'
|
||||
)
|
||||
});
|
||||
this.render();
|
||||
|
|
@ -160,7 +160,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
|
|||
static async #viewAdversary(_, button) {
|
||||
const adversary = await foundry.utils.fromUuid(button.dataset.adversary);
|
||||
if (!adversary) {
|
||||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.adversaryMissing'));
|
||||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.adversaryMissing'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'features' }, { id: 'notes'}, { id: 'effects'}],
|
||||
initial: 'features',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.Adversary.Tabs'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -82,7 +82,7 @@ export default class AdversarySheet extends DHBaseActorSheet {
|
|||
const experience = this.document.system.experiences[button.dataset.uuid];
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
name: game.i18n.localize('DAGGERHEART.General.Experience.Single'),
|
||||
name: game.i18n.localize('DAGGERHEART.GENERAL.Experience.single'),
|
||||
description: `${experience.name} ${
|
||||
experience.modifier < 0 ? experience.modifier : `+${experience.modifier}`
|
||||
}`
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
useFeature: this.useFeature,
|
||||
takeShortRest: this.takeShortRest,
|
||||
takeLongRest: this.takeLongRest,
|
||||
addScar: this.addScar,
|
||||
deleteScar: this.deleteScar,
|
||||
makeDeathMove: this.makeDeathMove,
|
||||
itemQuantityDecrease: (_, button) => this.setItemQuantity(button, -1),
|
||||
|
|
@ -96,23 +95,9 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
/** @inheritdoc */
|
||||
static TABS = {
|
||||
primary: {
|
||||
tabs: [{
|
||||
id: 'features',
|
||||
label: "DAGGERHEART.Sheets.PC.Tabs.Features"
|
||||
}, {
|
||||
id: 'loadout',
|
||||
label: "DAGGERHEART.Sheets.PC.Tabs.Loadout"
|
||||
}, {
|
||||
id: 'inventory',
|
||||
label: "DAGGERHEART.Sheets.PC.Tabs.Inventory"
|
||||
}, {
|
||||
id: 'biography',
|
||||
label: "DAGGERHEART.Sheets.PC.Tabs.biography"
|
||||
}, {
|
||||
id: 'effects',
|
||||
label: "DAGGERHEART.Sheets.PC.Tabs.effects"
|
||||
}],
|
||||
tabs: [{ id: 'features' }, { id: 'loadout' }, { id: 'inventory' }, { id: 'biography' }, { id: 'effects' }],
|
||||
initial: 'features',
|
||||
labelPrefix: 'DAGGERHEART.General.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -167,11 +152,11 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
context.inventory = {
|
||||
currency: {
|
||||
title: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Title'),
|
||||
coins: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Coins'),
|
||||
handfulls: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Handfulls'),
|
||||
bags: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Bags'),
|
||||
chests: game.i18n.localize('DAGGERHEART.Sheets.PC.Gold.Chests')
|
||||
title: game.i18n.localize('DAGGERHEART.CONFIG.Gold.title'),
|
||||
coins: game.i18n.localize('DAGGERHEART.CONFIG.Gold.coins'),
|
||||
handfulls: game.i18n.localize('DAGGERHEART.CONFIG.Gold.handfulls'),
|
||||
bags: game.i18n.localize('DAGGERHEART.CONFIG.Gold.bags'),
|
||||
chests: game.i18n.localize('DAGGERHEART.CONFIG.Gold.chests')
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -383,8 +368,10 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
const abilityLabel = game.i18n.localize(abilities[button.dataset.attribute].label);
|
||||
const config = {
|
||||
event: event,
|
||||
title: `${game.i18n.localize('DAGGERHEART.General.dualityRoll')}: ${this.actor.name}`,
|
||||
headerTitle: game.i18n.format('DAGGERHEART.Chat.DualityRoll.AbilityCheckTitle', { ability: abilityLabel }),
|
||||
title: `${game.i18n.localize('DAGGERHEART.GENERAL.dualityRoll')}: ${this.actor.name}`,
|
||||
headerTitle: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilitychecktitle', {
|
||||
ability: abilityLabel
|
||||
}),
|
||||
roll: {
|
||||
trait: button.dataset.attribute
|
||||
}
|
||||
|
|
@ -493,7 +480,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
const abilityLabel = game.i18n.localize(abilities[button.dataset.attribute].label);
|
||||
const config = {
|
||||
event: event,
|
||||
title: game.i18n.format('DAGGERHEART.Chat.DualityRoll.AbilityCheckTitle', { ability: abilityLabel }),
|
||||
title: game.i18n.format('DAGGERHEART.UI.Chat.dualityRoll.abilitychecktitle', { ability: abilityLabel }),
|
||||
roll: {
|
||||
trait: button.dataset.attribute
|
||||
}
|
||||
|
|
@ -570,7 +557,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
openLevelUp() {
|
||||
if (!this.document.system.class.value || !this.document.system.class.subclass) {
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.Sheets.PC.Errors.missingClassOrSubclass'));
|
||||
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.missingClassOrSubclass'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -583,7 +570,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
title: `${game.i18n.localize('DAGGERHEART.Chat.DomainCard.Title')} - ${capitalize(button.dataset.domain)}`,
|
||||
title: `${game.i18n.localize('DAGGERHEART.UI.Chat.domainCard.title')} - ${capitalize(button.dataset.domain)}`,
|
||||
origin: this.document.id,
|
||||
img: card.img,
|
||||
name: card.name,
|
||||
|
|
@ -662,17 +649,6 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
await this.minimize();
|
||||
}
|
||||
|
||||
static async addScar() {
|
||||
if (this.document.system.story.scars.length === 5) return;
|
||||
|
||||
await this.document.update({
|
||||
'system.story.scars': [
|
||||
...this.document.system.story.scars,
|
||||
{ name: game.i18n.localize('DAGGERHEART.Sheets.PC.NewScar'), description: '' }
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
static async deleteScar(event, button) {
|
||||
event.stopPropagation();
|
||||
await this.document.update({
|
||||
|
|
@ -705,7 +681,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
title: game.i18n.localize('DAGGERHEART.Chat.FeatureTitle'),
|
||||
title: game.i18n.localize('DAGGERHEART.UI.Chat.featureTitle'),
|
||||
origin: this.document.id,
|
||||
img: item.img,
|
||||
name: item.name,
|
||||
|
|
@ -730,7 +706,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
const experience = this.document.system.experiences[button.dataset.uuid];
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
name: game.i18n.localize('DAGGERHEART.General.Experience.Single'),
|
||||
name: game.i18n.localize('DAGGERHEART.GENERAL.Experience.single'),
|
||||
description: `${experience.name} ${experience.total < 0 ? experience.total : `+${experience.total}`}`
|
||||
};
|
||||
const msg = new cls({
|
||||
|
|
@ -758,12 +734,12 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
: this.document.system.class.subclass;
|
||||
const ability = item.system[`${button.dataset.key}Feature`];
|
||||
const title = `${item.name} - ${game.i18n.localize(
|
||||
`DAGGERHEART.Sheets.PC.DomainCard.${button.dataset.key.capitalize()}Title`
|
||||
`DAGGERHEART.ITEMS.DomainCard.${button.dataset.key.capitalize()}Title`
|
||||
)}`;
|
||||
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
title: game.i18n.localize('DAGGERHEART.Chat.FoundationCard.SubclassFeatureTitle'),
|
||||
title: game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.subclassFeatureTitle'),
|
||||
origin: this.document.id,
|
||||
name: title,
|
||||
img: item.img,
|
||||
|
|
@ -787,7 +763,7 @@ export default class CharacterSheet extends DHBaseActorSheet {
|
|||
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
title: game.i18n.localize('DAGGERHEART.Chat.FoundationCard.SubclassFeatureTitle'),
|
||||
title: game.i18n.localize('DAGGERHEART.UI.Chat.foundationCard.subclassFeatureTitle'),
|
||||
origin: this.document.id,
|
||||
name: item.name,
|
||||
img: item.img,
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export default class DhCompanionSheet extends DHBaseActorSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'details' }, { id: 'effects', label: 'DAGGERHEART.Sheets.TABS.effects' }],
|
||||
initial: 'details',
|
||||
labelPrefix: 'DAGGERHEART.General.tabs'
|
||||
labelPrefix: 'DAGGERHEART.General.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ export default class DhCompanionSheet extends DHBaseActorSheet {
|
|||
const experience = this.document.system.experiences[button.dataset.uuid];
|
||||
const cls = getDocumentClass('ChatMessage');
|
||||
const systemData = {
|
||||
name: game.i18n.localize('DAGGERHEART.General.Experience.Single'),
|
||||
name: game.i18n.localize('DAGGERHEART.GENERAL.Experience.single'),
|
||||
description: `${experience.name} ${experience.total < 0 ? experience.total : `+${experience.total}`}`
|
||||
};
|
||||
const msg = new cls({
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'features' }, { id: 'potentialAdversaries' }, { id: 'notes', label: "DAGGERHEART.Sheets.Adversary.Tabs.notes" }],
|
||||
initial: 'features',
|
||||
labelPrefix: 'DAGGERHEART.General.tabs'
|
||||
labelPrefix: 'DAGGERHEART.General.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
|||
static async addAdversary() {
|
||||
await this.document.update({
|
||||
[`system.potentialAdversaries.${foundry.utils.randomID()}.label`]: game.i18n.localize(
|
||||
'DAGGERHEART.Sheets.Environment.newAdversary'
|
||||
'DAGGERHEART.ACTORS.Environment.newAdversary'
|
||||
)
|
||||
});
|
||||
this.render();
|
||||
|
|
@ -69,7 +69,7 @@ export default class DhpEnvironment extends DHBaseActorSheet {
|
|||
const target = button.closest('[data-item-uuid]');
|
||||
const adversary = await foundry.utils.fromUuid(target.dataset.itemUuid);
|
||||
if (!adversary) {
|
||||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.notifications.adversaryMissing'));
|
||||
ui.notifications.warn(game.i18n.localize('DAGGERHEART.UI.Notifications.adversaryMissing'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
|
|||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'actions' }, { id: 'settings' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default class DHHeritageSheet extends DHBaseItemSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'effects' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ export default class BeastformSheet extends DHBaseItemSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'settings' }, { id: 'features' }, { id: 'effects' }],
|
||||
initial: 'settings',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,7 @@ export default class ClassSheet extends DHBaseItemSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'settings' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ export default class DomainCardSheet extends DHBaseItemSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'actions' }, { id: 'settings' }, { id: 'effects' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ export default class FeatureSheet extends DHBaseItemSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'actions' }, { id: 'effects' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ export default class SubclassSheet extends DHBaseItemSheet {
|
|||
primary: {
|
||||
tabs: [{ id: 'description' }, { id: 'features' }, { id: 'settings' }],
|
||||
initial: 'description',
|
||||
labelPrefix: 'DAGGERHEART.Sheets.TABS'
|
||||
labelPrefix: 'DAGGERHEART.GENERAL.Tabs'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
if (!action || !action?.applyEffects) return;
|
||||
const { isHit, targets } = this.getTargetList(event, message);
|
||||
if (targets.length === 0)
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.Notification.Info.NoTargetsSelected'));
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected'));
|
||||
await action.applyEffects(event, message, targets);
|
||||
}
|
||||
};
|
||||
|
|
@ -148,7 +148,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
msg = ui.chat.collection.get(message._id);
|
||||
if (msg.system.targetSelection === targetSelection) return;
|
||||
if (targetSelection !== true && !Array.from(game.user.targets).length)
|
||||
return ui.notifications.info(game.i18n.localize('DAGGERHEART.Notification.Info.NoTargetsSelected'));
|
||||
return ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected'));
|
||||
msg.system.targetSelection = targetSelection;
|
||||
msg.system.prepareDerivedData();
|
||||
ui.chat.updateMessage(msg);
|
||||
|
|
@ -182,7 +182,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
event.stopPropagation();
|
||||
const token = canvas.tokens.get(event.currentTarget.dataset.token);
|
||||
if (!token) {
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.Notification.Info.AttackTargetDoesNotExist'));
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.attackTargetDoesNotExist'));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -207,7 +207,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
}
|
||||
|
||||
if (targets.length === 0)
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.Notification.Info.NoTargetsSelected'));
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected'));
|
||||
for (let target of targets) {
|
||||
let damage = message.system.roll.total;
|
||||
if (message.system.onSave && message.system.targets.find(t => t.id === target.id)?.saved?.success === true)
|
||||
|
|
@ -222,7 +222,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
|
|||
const targets = Array.from(game.user.targets);
|
||||
|
||||
if (targets.length === 0)
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.Notification.Info.NoTargetsSelected'));
|
||||
ui.notifications.info(game.i18n.localize('DAGGERHEART.UI.Notifications.noTargetsSelected'));
|
||||
|
||||
for (var target of targets) {
|
||||
await target.actor.takeHealing([{ value: message.system.roll.total, type: message.system.roll.type }]);
|
||||
|
|
|
|||
|
|
@ -13,8 +13,8 @@ class Countdowns extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
}
|
||||
|
||||
get title() {
|
||||
return game.i18n.format('DAGGERHEART.Countdown.Title', {
|
||||
type: game.i18n.localize(`DAGGERHEART.Countdown.Types.${this.basePath}`)
|
||||
return game.i18n.format('DAGGERHEART.APPLICATIONS.Countdown.Title', {
|
||||
type: game.i18n.localize(`DAGGERHEART.APPLICATIONS.Countdown.types.${this.basePath}`)
|
||||
});
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ class Countdowns extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
const button = constructHTMLButton({
|
||||
label: '',
|
||||
classes: ['header-control', 'icon', 'fa-solid', 'fa-wrench'],
|
||||
dataset: { action: 'toggleSimpleView', tooltip: 'DAGGERHEART.Countdown.ToggleSimple' }
|
||||
dataset: { action: 'toggleSimpleView', tooltip: 'DAGGERHEART.APPLICATIONS.Countdown.toggleSimple' }
|
||||
});
|
||||
this.window.controls.after(button);
|
||||
}
|
||||
|
|
@ -265,7 +265,7 @@ class Countdowns extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
const countdownSetting = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Countdowns);
|
||||
await countdownSetting.updateSource({
|
||||
[`${this.basePath}.countdowns.${foundry.utils.randomID()}`]: {
|
||||
name: game.i18n.localize('DAGGERHEART.Countdown.NewCountdown'),
|
||||
name: game.i18n.localize('DAGGERHEART.APPLICATIONS.Countdown.newCountdown'),
|
||||
ownership: game.user.isGM
|
||||
? {}
|
||||
: {
|
||||
|
|
@ -285,9 +285,9 @@ class Countdowns extends HandlebarsApplicationMixin(ApplicationV2) {
|
|||
|
||||
const confirmed = await foundry.applications.api.DialogV2.confirm({
|
||||
window: {
|
||||
title: game.i18n.localize('DAGGERHEART.Countdown.RemoveCountdownTitle')
|
||||
title: game.i18n.localize('DAGGERHEART.APPLICATIONS.Countdown.removeCountdownTitle')
|
||||
},
|
||||
content: game.i18n.format('DAGGERHEART.Countdown.RemoveCountdownText', { name: countdownName })
|
||||
content: game.i18n.format('DAGGERHEART.APPLICATIONS.Countdown.removeCountdownText', { name: countdownName })
|
||||
});
|
||||
if (!confirmed) return;
|
||||
|
||||
|
|
|
|||
|
|
@ -178,7 +178,7 @@ export default class FilterMenu extends foundry.applications.ux.ContextMenu {
|
|||
}));
|
||||
|
||||
const burdenFilter = Object.values(CONFIG.DH.GENERAL.burden).map(({ value, label }) => ({
|
||||
group: game.i18n.localize('DAGGERHEART.Sheets.Weapon.Burden'),
|
||||
group: game.i18n.localize('DAGGERHEART.GENERAL.burden'),
|
||||
name: game.i18n.localize(label),
|
||||
filter: {
|
||||
field: 'system.burden',
|
||||
|
|
@ -220,7 +220,7 @@ export default class FilterMenu extends foundry.applications.ux.ContextMenu {
|
|||
}));
|
||||
|
||||
const domainFilter = Object.values(CONFIG.DH.DOMAIN.domains).map(({ id, label }) => ({
|
||||
group: game.i18n.localize('DAGGERHEART.Sheets.DomainCard.Domain'),
|
||||
group: game.i18n.localize('DAGGERHEART.GENERAL.Domain.single'),
|
||||
name: game.i18n.localize(label),
|
||||
filter: {
|
||||
field: 'system.domain',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue