This commit is contained in:
WBHarry 2025-07-05 22:29:59 +02:00
parent af24b5064e
commit baa7f6352e
10 changed files with 10 additions and 11 deletions

View file

@ -151,7 +151,7 @@ export default class DHAdversarySettings extends HandlebarsApplicationMixin(Appl
await this.actor.createEmbeddedDocuments('Item', [
{
type: 'feature',
name: game.i18n.localize('DAGGERHEART.General.newFeature'),
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
img: 'icons/skills/melee/weapons-crossed-swords-black.webp'
}
]);

View file

@ -127,7 +127,7 @@ export default class DHEnvironmentSettings extends HandlebarsApplicationMixin(Ap
await this.actor.createEmbeddedDocuments('Item', [
{
type: 'feature',
name: game.i18n.localize('DAGGERHEART.General.newFeature'),
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') }),
img: 'icons/magic/perception/orb-crystal-ball-scrying-blue.webp'
}
]);

View file

@ -153,7 +153,7 @@ export default class DHBaseItemSheet extends DHApplicationMixin(ItemSheetV2) {
static async #addFeature(_event, _button) {
const feature = await game.items.documentClass.create({
type: 'feature',
name: game.i18n.localize('DAGGERHEART.General.newFeature')
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
});
await this.document.update({
'system.features': [...this.document.system.features.filter(x => x).map(x => x.uuid), feature.uuid]

View file

@ -175,7 +175,7 @@ export default class ClassSheet extends DHBaseItemSheet {
const actionPath = this.getActionPath(target.dataset.type);
const feature = await game.items.documentClass.create({
type: 'feature',
name: game.i18n.localize('DAGGERHEART.General.newFeature')
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
});
await this.document.update({
[`system.${actionPath}`]: [

View file

@ -40,7 +40,7 @@ export default class SubclassSheet extends DHBaseItemSheet {
static async addFeature(_, target) {
const feature = await game.items.documentClass.create({
type: 'feature',
name: game.i18n.localize('DAGGERHEART.General.newFeature')
name: game.i18n.format('DOCUMENT.New', { type: game.i18n.localize('TYPES.Item.feature') })
});
await this.document.update({
[`system.${target.dataset.type}`]: feature.uuid