mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-13 04:01:06 +01:00
use enabled toggle to use localized initial label values.
This commit is contained in:
parent
32c224c472
commit
27ac324694
6 changed files with 33 additions and 14 deletions
|
|
@ -329,9 +329,20 @@ export default class CharacterSheet extends DaggerheartSheet(ActorSheetV2) {
|
|||
},
|
||||
items: this.document.items.filter(x => x.type === 'armor')
|
||||
},
|
||||
currency: game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Homebrew).currency
|
||||
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')
|
||||
}
|
||||
};
|
||||
|
||||
const homebrewCurrency = game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Homebrew).currency;
|
||||
if (homebrewCurrency.enabled) {
|
||||
context.inventory.currency = homebrewCurrency;
|
||||
}
|
||||
|
||||
if (context.inventory.length === 0) {
|
||||
context.inventory = Array(1).fill(Array(5).fill([]));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,11 @@ export default class DhHomebrew extends foundry.abstract.DataModel {
|
|||
initial: () => [2, 1, 1, 0, 0, -1]
|
||||
}),
|
||||
currency: new fields.SchemaField({
|
||||
enabled: new fields.BooleanField({
|
||||
required: true,
|
||||
initial: false,
|
||||
label: 'DAGGERHEART.Settings.Homebrew.Currency.enabled'
|
||||
}),
|
||||
title: new fields.StringField({
|
||||
required: true,
|
||||
initial: 'Gold',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue