[Feature] Configurable starting gold amounts in Homebrew settings

Added `initialAmount` field to each currency type (coins, handfuls, bags, chests)
in the Homebrew settings schema. Defaults match book values (0, 1, 0, 0).

- Homebrew.mjs: added `initialAmount` NumberField per currency; `_initializeSource`
  coerces empty submissions to 0; `refreshConfig()` syncs values to
  `CONFIG.DH.RESOURCE.character.initialCurrency`
- resourceConfig.mjs: added mutable `initialCurrency` object on `character` export
- actorField.mjs: added `CharacterGoldField` subclass that reads initial values
  from config at actor creation time
- character.mjs: switched from `GoldField` to `CharacterGoldField`
- settings.hbs: restructured currency section to CSS Grid with column headers
  ("Quantity Name" / "Starting Amount") instead of per-field inline labels
- settings.less: added `.currency-rows` grid styles
- en.json: added `quantityName` and `initialAmount` localisation keys
This commit is contained in:
Iohan Trézze 2026-06-03 23:56:25 -03:00
parent 77c5cfcbb7
commit 7c84de6a96
7 changed files with 70 additions and 19 deletions

View file

@ -201,6 +201,23 @@
}
}
.currency-rows {
display: grid;
grid-template-columns: auto 1fr 1fr auto;
gap: 4px;
align-items: center;
width: 100%;
.currency-header-label {
text-align: center;
font-size: var(--font-size-14);
}
input[type='checkbox'] {
justify-self: center;
}
}
.settings-hint {
width: 100%;
display: flex;