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
|
|
@ -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'
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue