Language Organization (#281)

* Organized language

* Organized high level folders

* Some deeper organization

* More org. That's enough ._.

* Capitalized initial system localization categories
This commit is contained in:
WBHarry 2025-07-06 17:43:12 +02:00 committed by GitHub
parent 8a7ff2306a
commit 488844603a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
149 changed files with 2130 additions and 2512 deletions

View file

@ -113,7 +113,7 @@ export class DHDamageData extends foundry.abstract.DataModel {
}),
resultBased: new fields.BooleanField({
initial: false,
label: 'DAGGERHEART.Actions.Settings.ResultBased.label'
label: 'DAGGERHEART.ACTIONS.Settings.resultBased.label'
}),
value: new fields.EmbeddedDataField(DHActionDiceData),
valueAlt: new fields.EmbeddedDataField(DHActionDiceData)

View file

@ -110,7 +110,7 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
}),
resultBased: new fields.BooleanField({
initial: false,
label: 'DAGGERHEART.Actions.Settings.ResultBased.label'
label: 'DAGGERHEART.ACTIONS.Settings.resultBased.label'
}),
value: new fields.EmbeddedDataField(DHActionDiceData),
valueAlt: new fields.EmbeddedDataField(DHActionDiceData)
@ -563,7 +563,7 @@ export default class DHBaseAction extends foundry.abstract.DataModel {
async toChat(origin) {
const cls = getDocumentClass('ChatMessage');
const systemData = {
title: game.i18n.localize('DAGGERHEART.ActionType.action'),
title: game.i18n.localize('DAGGERHEART.CONFIG.ActionType.action'),
origin: origin,
img: this.img,
name: this.name,

View file

@ -19,7 +19,7 @@ export default class DHDamageAction extends DHBaseAction {
if (isNaN(formula)) formula = Roll.replaceFormulaData(formula, this.getRollData(data.system ?? data));
const config = {
title: game.i18n.format('DAGGERHEART.Chat.DamageRoll.Title', { damage: this.name }),
title: game.i18n.format('DAGGERHEART.UI.Chat.damageRoll.title', { damage: this.name }),
roll: { formula },
targets: data.system?.targets.filter(t => t.hit) ?? data.targets,
hasSave: this.hasSave,

View file

@ -12,7 +12,7 @@ export default class DHEffectAction extends DHBaseAction {
async chatApplyEffects(event, data) {
const cls = getDocumentClass('ChatMessage'),
systemData = {
title: game.i18n.format('DAGGERHEART.Chat.ApplyEffect.Title', { name: this.name }),
title: game.i18n.format('DAGGERHEART.UI.Chat.applyEffect.title', { name: this.name }),
origin: this.actor._id,
description: '',
targets: data.targets.map(x => ({ id: x.id, name: x.name, img: x.img, hit: true })),

View file

@ -23,7 +23,7 @@ export default class DHHealingAction extends DHBaseAction {
bonusDamage = [];
const config = {
title: game.i18n.format('DAGGERHEART.Chat.HealingRoll.Title', {
title: game.i18n.format('DAGGERHEART.UI.Chat.healingRoll.title', {
healing: game.i18n.localize(CONFIG.DH.GENERAL.healingTypes[this.healing.type].label)
}),
roll: { formula },

View file

@ -8,7 +8,7 @@ const resourceField = () =>
});
export default class DhpAdversary extends BaseDataActor {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Adversary'];
static LOCALIZATION_PREFIXES = ['DAGGERHEART.ACTORS.Adversary'];
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {

View file

@ -251,11 +251,11 @@ export default class DhCharacter extends BaseDataActor {
values: subclassFeatures
},
companionFeatures: {
title: game.i18n.localize('DAGGERHEART.Sheets.PC.CompanionFeatures'),
title: game.i18n.localize('DAGGERHEART.ACTORS.Character.companionFeatures'),
type: 'companion',
values: companionFeatures
},
features: { title: game.i18n.localize('DAGGERHEART.Sheets.PC.Features'), type: 'feature', values: features }
features: { title: game.i18n.localize('DAGGERHEART.GENERAL.features'), type: 'feature', values: features }
};
}

View file

@ -5,7 +5,7 @@ import ActionField from '../fields/actionField.mjs';
import { adjustDice, adjustRange } from '../../helpers/utils.mjs';
export default class DhCompanion extends BaseDataActor {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Companion'];
static LOCALIZATION_PREFIXES = ['DAGGERHEART.ACTORS.Companion'];
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {

View file

@ -1,9 +1,8 @@
import BaseDataActor from './base.mjs';
import ActionField from '../fields/actionField.mjs';
import ForeignDocumentUUIDArrayField from '../fields/foreignDocumentUUIDArrayField.mjs';
export default class DhEnvironment extends BaseDataActor {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Sheets.Environment'];
static LOCALIZATION_PREFIXES = ['DAGGERHEART.ACTORS.Environment'];
static get metadata() {
return foundry.utils.mergeObject(super.metadata, {

View file

@ -14,7 +14,7 @@ export default class DhCountdowns extends foundry.abstract.DataModel {
}
class DhCountdownData extends foundry.abstract.DataModel {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Countdown']; // Nots ure why this won't work. Setting labels manually for now
static LOCALIZATION_PREFIXES = ['DAGGERHEART.APPLICATIONS.Countdown']; // Nots ure why this won't work. Setting labels manually for now
static defineSchema() {
const fields = foundry.data.fields;
@ -62,7 +62,7 @@ class DhCountdown extends foundry.abstract.DataModel {
return {
name: new fields.StringField({
required: true,
label: 'DAGGERHEART.Countdown.FIELDS.countdowns.element.name.label'
label: 'DAGGERHEART.APPLICATIONS.Countdown.FIELDS.countdowns.element.name.label'
}),
img: new fields.FilePathField({
categories: ['IMAGE'],
@ -90,23 +90,23 @@ class DhCountdown extends foundry.abstract.DataModel {
required: true,
integer: true,
initial: 1,
label: 'DAGGERHEART.Countdown.FIELDS.countdowns.element.progress.current.label'
label: 'DAGGERHEART.APPLICATIONS.Countdown.FIELDS.countdowns.element.progress.current.label'
}),
max: new fields.NumberField({
required: true,
integer: true,
initial: 1,
label: 'DAGGERHEART.Countdown.FIELDS.countdowns.element.progress.max.label'
label: 'DAGGERHEART.APPLICATIONS.Countdown.FIELDS.countdowns.element.progress.max.label'
}),
type: new fields.SchemaField({
value: new fields.StringField({
required: true,
choices: CONFIG.DH.GENERAL.countdownTypes,
initial: CONFIG.DH.GENERAL.countdownTypes.spotlight.id,
label: 'DAGGERHEART.Countdown.FIELDS.countdowns.element.progress.type.value.label'
label: 'DAGGERHEART.APPLICATIONS.Countdown.FIELDS.countdowns.element.progress.type.value.label'
}),
label: new fields.StringField({
label: 'DAGGERHEART.Countdown.FIELDS.countdowns.element.progress.type.label.label'
label: 'DAGGERHEART.APPLICATIONS.Countdown.FIELDS.countdowns.element.progress.type.label.label'
})
})
})

View file

@ -43,12 +43,12 @@ export default class DHBeastform extends BaseDataItem {
if (!this.actor) return;
if (this.actor.type !== 'character') {
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.notifications.beastformInapplicable'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.beastformInapplicable'));
return false;
}
if (this.actor.items.find(x => x.type === 'beastform')) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.notifications.beastformAlreadyApplied'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.beastformAlreadyApplied'));
return false;
}
@ -64,7 +64,7 @@ export default class DHBeastform extends BaseDataItem {
await this.parent.parent.createEmbeddedDocuments('ActiveEffect', [
{
type: 'beastform',
name: game.i18n.localize('DAGGERHEART.Sheets.Beastform.beastformEffect'),
name: game.i18n.localize('DAGGERHEART.ITEMS.Beastform.beastformEffect'),
img: 'icons/creatures/abilities/paw-print-pair-purple.webp',
system: {
isBeastform: true,

View file

@ -24,9 +24,9 @@ export default class DHClass extends BaseDataItem {
integer: true,
min: 1,
initial: 5,
label: 'DAGGERHEART.Sheets.Class.HitPoints'
label: 'DAGGERHEART.GENERAL.hitPoints'
}),
evasion: new fields.NumberField({ initial: 0, integer: true, label: 'DAGGERHEART.Sheets.Class.Evasion' }),
evasion: new fields.NumberField({ initial: 0, integer: true, label: 'DAGGERHEART.GENERAL.evasion' }),
hopeFeatures: new ForeignDocumentUUIDArrayField({ type: 'Item' }),
classFeatures: new ForeignDocumentUUIDArrayField({ type: 'Item' }),
subclasses: new ForeignDocumentUUIDArrayField({ type: 'Item', required: false }),
@ -67,7 +67,7 @@ export default class DHClass extends BaseDataItem {
if (this.actor?.type === 'character') {
const path = data.system.isMulticlass ? 'system.multiclass.value' : 'system.class.value';
if (foundry.utils.getProperty(this.actor, path)) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.ClassAlreadySelected'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.classAlreadySelected'));
return false;
}
}

View file

@ -40,17 +40,17 @@ export default class DHDomainCard extends BaseDataItem {
if (this.actor?.type === 'character') {
if (!this.actor.system.class.value) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.NoClassSelected'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.noClassSelected'));
return false;
}
if (!this.actor.system.domains.find(x => x === this.domain)) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.LacksDomain'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.lacksDomain'));
return false;
}
if (this.actor.system.domainCards.total.find(x => x.name === this.parent.name)) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.DuplicateDomainCard'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.duplicateDomainCard'));
return false;
}
}

View file

@ -50,13 +50,13 @@ export default class DHSubclass extends BaseDataItem {
x => x.type === 'subclass' && x.system.isMulticlass === data.system.isMulticlass
);
if (!classData) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.MissingClass'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.missingClass'));
return false;
} else if (subclassData) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.SubclassAlreadySelected'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.subclassAlreadySelected'));
return false;
} else if (classData.system.subclasses.every(x => x.uuid !== (data.uuid ?? `Item.${data._id}`))) {
ui.notifications.error(game.i18n.localize('DAGGERHEART.Item.Errors.SubclassNotInClass'));
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.subclassNotInClass'));
return false;
}
}

View file

@ -68,9 +68,9 @@ export const CompanionLevelOptionType = {
label: 'Creature Comfort',
features: [
{
name: 'DAGGERHEART.LevelUp.Actions.CreatureComfort.Name',
name: 'DAGGERHEART.APPLICATIONS.Levelup.actions.creatureComfort.name',
img: 'icons/magic/life/heart-cross-purple-orange.webp',
description: 'DAGGERHEART.LevelUp.Actions.CreatureComfort.Description'
description: 'DAGGERHEART.APPLICATIONS.Levelup.actions.creatureComfort.description'
}
]
},
@ -79,9 +79,9 @@ export const CompanionLevelOptionType = {
label: 'Armored',
features: [
{
name: 'DAGGERHEART.LevelUp.Actions.Armored.Name',
name: 'DAGGERHEART.APPLICATIONS.Levelup.actions.armored.name',
img: 'icons/equipment/shield/kite-wooden-oak-glow.webp',
description: 'DAGGERHEART.LevelUp.Actions.Armored.Description'
description: 'DAGGERHEART.APPLICATIONS.Levelup.actions.armored.description'
}
]
},
@ -98,9 +98,9 @@ export const CompanionLevelOptionType = {
label: 'Bonded',
features: [
{
name: 'DAGGERHEART.LevelUp.Actions.Bonded.Name',
name: 'DAGGERHEART.APPLICATIONS.Levelup.actions.bonded.name',
img: 'icons/magic/life/heart-red-blue.webp',
description: 'DAGGERHEART.LevelUp.Actions.Bonded.Description'
description: 'DAGGERHEART.APPLICATIONS.Levelup.actions.bonded.description'
}
]
},
@ -182,14 +182,14 @@ export const defaultLevelTiers = {
domainCardByLevel: 1,
options: {
trait: {
label: 'DAGGERHEART.LevelUp.Options.trait',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.trait',
checkboxSelections: 3,
minCost: 1,
type: LevelOptionType.trait.id,
amount: 2
},
hitPoint: {
label: 'DAGGERHEART.LevelUp.Options.hitPoint',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.hitPoint',
checkboxSelections: 2,
minCost: 1,
type: LevelOptionType.hitPoint.id,
@ -197,14 +197,14 @@ export const defaultLevelTiers = {
value: 1
},
stress: {
label: 'DAGGERHEART.LevelUp.Options.stress',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.stress',
checkboxSelections: 2,
minCost: 1,
type: LevelOptionType.stress.id,
value: 1
},
experience: {
label: 'DAGGERHEART.LevelUp.Options.experience',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.experience',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.experience.id,
@ -212,14 +212,14 @@ export const defaultLevelTiers = {
amount: 2
},
domainCard: {
label: 'DAGGERHEART.LevelUp.Options.domainCard',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.domainCard',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.domainCard.id,
amount: 1
},
evasion: {
label: 'DAGGERHEART.LevelUp.Options.evasion',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.evasion',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.evasion.id,
@ -245,28 +245,28 @@ export const defaultLevelTiers = {
domainCardByLevel: 1,
options: {
trait: {
label: 'DAGGERHEART.LevelUp.Options.trait',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.trait',
checkboxSelections: 3,
minCost: 1,
type: LevelOptionType.trait.id,
amount: 2
},
hitPoint: {
label: 'DAGGERHEART.LevelUp.Options.hitPoint',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.hitPoint',
checkboxSelections: 2,
minCost: 1,
type: LevelOptionType.hitPoint.id,
value: 1
},
stress: {
label: 'DAGGERHEART.LevelUp.Options.stress',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.stress',
checkboxSelections: 2,
minCost: 1,
type: LevelOptionType.stress.id,
value: 1
},
experience: {
label: 'DAGGERHEART.LevelUp.Options.experience',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.experience',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.experience.id,
@ -274,34 +274,34 @@ export const defaultLevelTiers = {
amount: 2
},
domainCard: {
label: 'DAGGERHEART.LevelUp.Options.domainCard',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.domainCard',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.domainCard.id,
amount: 1
},
evasion: {
label: 'DAGGERHEART.LevelUp.Options.evasion',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.evasion',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.evasion.id,
value: 1
},
subclass: {
label: 'DAGGERHEART.LevelUp.Options.subclass',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.subclass',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.subclass.id
},
proficiency: {
label: 'DAGGERHEART.LevelUp.Options.proficiency',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.proficiency',
checkboxSelections: 2,
minCost: 2,
type: LevelOptionType.proficiency.id,
value: 1
},
multiclass: {
label: 'DAGGERHEART.LevelUp.Options.multiclass',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.multiclass',
checkboxSelections: 2,
minCost: 2,
type: LevelOptionType.multiclass.id
@ -326,28 +326,28 @@ export const defaultLevelTiers = {
domainCardByLevel: 1,
options: {
trait: {
label: 'DAGGERHEART.LevelUp.Options.trait',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.trait',
checkboxSelections: 3,
minCost: 1,
type: LevelOptionType.trait.id,
amount: 2
},
hitPoint: {
label: 'DAGGERHEART.LevelUp.Options.hitPoint',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.hitPoint',
checkboxSelections: 2,
minCost: 1,
type: LevelOptionType.hitPoint.id,
value: 1
},
stress: {
label: 'DAGGERHEART.LevelUp.Options.stress',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.stress',
checkboxSelections: 2,
minCost: 1,
type: LevelOptionType.stress.id,
value: 1
},
experience: {
label: 'DAGGERHEART.LevelUp.Options.experience',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.experience',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.experience.id,
@ -355,34 +355,34 @@ export const defaultLevelTiers = {
amount: 2
},
domainCard: {
label: 'DAGGERHEART.LevelUp.Options.domainCard',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.domainCard',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.domainCard.id,
amount: 1
},
evasion: {
label: 'DAGGERHEART.LevelUp.Options.evasion',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.evasion',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.evasion.id,
value: 1
},
subclass: {
label: 'DAGGERHEART.LevelUp.Options.subclass',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.subclass',
checkboxSelections: 1,
minCost: 1,
type: LevelOptionType.subclass.id
},
proficiency: {
label: 'DAGGERHEART.LevelUp.Options.proficiency',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.proficiency',
checkboxSelections: 2,
minCost: 2,
type: LevelOptionType.proficiency.id,
value: 1
},
multiclass: {
label: 'DAGGERHEART.LevelUp.Options.multiclass',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.multiclass',
checkboxSelections: 2,
minCost: 2,
type: LevelOptionType.multiclass.id
@ -406,7 +406,7 @@ export const defaultCompanionTier = {
domainCardByLevel: 0,
options: {
experience: {
label: 'DAGGERHEART.LevelUp.Options.intelligent',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.intelligent',
checkboxSelections: 3,
minCost: 1,
type: LevelOptionType.experience.id,
@ -414,28 +414,28 @@ export const defaultCompanionTier = {
amount: 1
},
hope: {
label: 'DAGGERHEART.LevelUp.Options.lightInTheDark',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.lightInTheDark',
checkboxSelections: 1,
minCost: 1,
type: CompanionLevelOptionType.hope.id,
value: 1
},
creatureComfort: {
label: 'DAGGERHEART.LevelUp.Options.creatureComfort',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.creatureComfort',
checkboxSelections: 1,
minCost: 1,
type: CompanionLevelOptionType.creatureComfort.id,
value: 1
},
armored: {
label: 'DAGGERHEART.LevelUp.Options.armored',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.armored',
checkboxSelections: 1,
minCost: 1,
type: CompanionLevelOptionType.armored.id,
value: 1
},
vicious: {
label: 'DAGGERHEART.LevelUp.Options.vicious',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.vicious',
checkboxSelections: 3,
minCost: 1,
type: CompanionLevelOptionType.vicious.id,
@ -443,21 +443,21 @@ export const defaultCompanionTier = {
amount: 1
},
stress: {
label: 'DAGGERHEART.LevelUp.Options.resilient',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.resilient',
checkboxSelections: 3,
minCost: 1,
type: LevelOptionType.stress.id,
value: 1
},
bonded: {
label: 'DAGGERHEART.LevelUp.Options.bonded',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.bonded',
checkboxSelections: 1,
minCost: 1,
type: CompanionLevelOptionType.bonded.id,
value: 1
},
evasion: {
label: 'DAGGERHEART.LevelUp.Options.aware',
label: 'DAGGERHEART.APPLICATIONS.Levelup.options.aware',
checkboxSelections: 3,
minCost: 1,
type: LevelOptionType.evasion.id,

View file

@ -8,7 +8,7 @@ export default class DhAppearance extends foundry.abstract.DataModel {
required: true,
choices: fearDisplay,
initial: fearDisplay.token.value,
label: 'DAGGERHEART.Settings.Appearance.FIELDS.displayFear.label'
label: 'DAGGERHEART.SETTINGS.Appearance.FIELDS.displayFear.label'
}),
dualityColorScheme: new fields.StringField({
required: true,
@ -48,10 +48,10 @@ export default class DhAppearance extends foundry.abstract.DataModel {
export const DualityRollColor = {
colorful: {
value: 'colorful',
label: 'DAGGERHEART.Settings.DualityRollColor.Options.Colorful'
label: 'DAGGERHEART.SETTINGS.DualityRollColor.options.colorful'
},
normal: {
value: 'normal',
label: 'DAGGERHEART.Settings.DualityRollColor.Options.Normal'
label: 'DAGGERHEART.SETTINGS.DualityRollColor.options.normal'
}
};

View file

@ -1,5 +1,5 @@
export default class DhAutomation extends foundry.abstract.DataModel {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Settings.Automation']; // Doesn't work for some reason
static LOCALIZATION_PREFIXES = ['DAGGERHEART.SETTINGS.Automation']; // Doesn't work for some reason
static defineSchema() {
const fields = foundry.data.fields;

View file

@ -1,7 +1,7 @@
import { defaultRestOptions } from '../../config/generalConfig.mjs';
export default class DhHomebrew extends foundry.abstract.DataModel {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Settings.Homebrew']; // Doesn't work for some reason
static LOCALIZATION_PREFIXES = ['DAGGERHEART.SETTINGS.Homebrew']; // Doesn't work for some reason
static defineSchema() {
const fields = foundry.data.fields;
@ -11,7 +11,7 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
integer: true,
min: 0,
initial: 12,
label: 'DAGGERHEART.Settings.Homebrew.FIELDS.maxFear.label'
label: 'DAGGERHEART.SETTINGS.Homebrew.FIELDS.maxFear.label'
}),
traitArray: new fields.ArrayField(new fields.NumberField({ required: true, integer: true }), {
initial: () => [2, 1, 1, 0, 0, -1]
@ -20,32 +20,32 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
enabled: new fields.BooleanField({
required: true,
initial: false,
label: 'DAGGERHEART.Settings.Homebrew.Currency.enabled'
label: 'DAGGERHEART.SETTINGS.Homebrew.currency.enabled'
}),
title: new fields.StringField({
required: true,
initial: 'Gold',
label: 'DAGGERHEART.Settings.Homebrew.Currency.currencyName'
label: 'DAGGERHEART.SETTINGS.Homebrew.currency.currencyName'
}),
coins: new fields.StringField({
required: true,
initial: 'Coins',
label: 'DAGGERHEART.Settings.Homebrew.Currency.coinName'
label: 'DAGGERHEART.SETTINGS.Homebrew.currency.coinName'
}),
handfulls: new fields.StringField({
required: true,
initial: 'Handfulls',
label: 'DAGGERHEART.Settings.Homebrew.Currency.handfullName'
label: 'DAGGERHEART.SETTINGS.Homebrew.currency.handfullName'
}),
bags: new fields.StringField({
required: true,
initial: 'Bags',
label: 'DAGGERHEART.Settings.Homebrew.Currency.bagName'
label: 'DAGGERHEART.SETTINGS.Homebrew.currency.bagName'
}),
chests: new fields.StringField({
required: true,
initial: 'Chests',
label: 'DAGGERHEART.Settings.Homebrew.Currency.chestName'
label: 'DAGGERHEART.SETTINGS.Homebrew.currency.chestName'
})
}),
restMoves: new fields.SchemaField({

View file

@ -2,16 +2,24 @@ export default class DhRangeMeasurement extends foundry.abstract.DataModel {
static defineSchema() {
const fields = foundry.data.fields;
return {
enabled: new fields.BooleanField({ required: true, initial: false, label: 'DAGGERHEART.General.Enabled' }),
melee: new fields.NumberField({ required: true, initial: 5, label: 'DAGGERHEART.Range.melee.name' }),
enabled: new fields.BooleanField({ required: true, initial: false, label: 'DAGGERHEART.GENERAL.enabled' }),
melee: new fields.NumberField({ required: true, initial: 5, label: 'DAGGERHEART.CONFIG.Range.melee.name' }),
veryClose: new fields.NumberField({
required: true,
initial: 15,
label: 'DAGGERHEART.Range.veryClose.name'
label: 'DAGGERHEART.CONFIG.Range.veryClose.name'
}),
close: new fields.NumberField({ required: true, initial: 30, label: 'DAGGERHEART.Range.close.name' }),
far: new fields.NumberField({ required: true, initial: 60, label: 'DAGGERHEART.Range.far.name' }),
veryFar: new fields.NumberField({ required: true, initial: 120, label: 'DAGGERHEART.Range.veryFar.name' })
close: new fields.NumberField({
required: true,
initial: 30,
label: 'DAGGERHEART.CONFIG.Range.close.name'
}),
far: new fields.NumberField({ required: true, initial: 60, label: 'DAGGERHEART.CONFIG.Range.far.name' }),
veryFar: new fields.NumberField({
required: true,
initial: 120,
label: 'DAGGERHEART.CONFIG.Range.veryFar.name'
})
};
}
}

View file

@ -1,5 +1,5 @@
export default class DhVariantRules extends foundry.abstract.DataModel {
static LOCALIZATION_PREFIXES = ['DAGGERHEART.Settings.VariantRules'];
static LOCALIZATION_PREFIXES = ['DAGGERHEART.SETTINGS.VariantRules'];
static defineSchema() {
const fields = foundry.data.fields;
@ -8,18 +8,18 @@ export default class DhVariantRules extends foundry.abstract.DataModel {
enabled: new fields.BooleanField({
required: true,
initial: false,
label: 'DAGGERHEART.Settings.VariantRules.FIELDS.actionTokens.enabled.label'
label: 'DAGGERHEART.SETTINGS.VariantRules.FIELDS.actionTokens.enabled.label'
}),
tokens: new fields.NumberField({
required: true,
integer: true,
initial: 3,
label: 'DAGGERHEART.Settings.VariantRules.FIELDS.actionTokens.tokens.label'
label: 'DAGGERHEART.SETTINGS.VariantRules.FIELDS.actionTokens.tokens.label'
})
}),
useCoins: new fields.BooleanField({
initial: false,
label: 'DAGGERHEART.Settings.VariantRules.FIELDS.useCoins.label'
label: 'DAGGERHEART.SETTINGS.VariantRules.FIELDS.useCoins.label'
})
};
}