mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-08 13:48:11 +02:00
[Feature] Configurable starting gold amounts in Homebrew settings (#1969)
* [Feature] Configurable starting gold amounts in Homebrew settings
This commit is contained in:
parent
67cd28f991
commit
a148aa3bcb
6 changed files with 72 additions and 24 deletions
|
|
@ -64,7 +64,18 @@ export default class DhCharacter extends DhCreature {
|
|||
core: new fields.BooleanField({ initial: false })
|
||||
})
|
||||
),
|
||||
gold: new GoldField(),
|
||||
gold: new GoldField({
|
||||
initial: () => {
|
||||
const homebrew = game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew);
|
||||
const { coins, handfuls, bags, chests } = homebrew.currency;
|
||||
return {
|
||||
coins: coins.enabled ? coins.initialAmount : 0,
|
||||
handfuls: handfuls.enabled ? handfuls.initialAmount : 0,
|
||||
bags: bags.enabled ? bags.initialAmount : 0,
|
||||
chests: chests.enabled ? chests.initialAmount : 0
|
||||
};
|
||||
}
|
||||
}),
|
||||
scars: new fields.NumberField({ initial: 0, integer: true, label: 'DAGGERHEART.GENERAL.scars' }),
|
||||
biography: new fields.SchemaField({
|
||||
background: new fields.HTMLField(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue