mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-06-06 12:54:16 +02:00
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
232 lines
4.8 KiB
Text
232 lines
4.8 KiB
Text
@import '../../utils/colors.less';
|
|
|
|
.daggerheart.dh-style.setting {
|
|
--color-form-label: @color-text-primary;
|
|
|
|
h2,
|
|
h3,
|
|
h4 {
|
|
margin: 8px 0 4px;
|
|
text-align: center;
|
|
}
|
|
|
|
footer {
|
|
margin-top: 8px;
|
|
display: flex;
|
|
gap: 8px;
|
|
|
|
button {
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
.standard-form {
|
|
gap: var(--spacer-8);
|
|
.form-group .form-fields {
|
|
width: unset;
|
|
}
|
|
}
|
|
|
|
.form-group {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
gap: 0.25rem 0.5rem;
|
|
flex-wrap: wrap;
|
|
|
|
label {
|
|
font-size: var(--font-size-14);
|
|
font-weight: normal;
|
|
line-height: var(--input-height);
|
|
}
|
|
|
|
.form-fields {
|
|
display: flex;
|
|
gap: 4px;
|
|
align-items: center;
|
|
}
|
|
|
|
&.setting-two-values {
|
|
display: grid;
|
|
grid-template-columns: repeat(3, 1fr);
|
|
gap: 0.25rem 0.5rem;
|
|
|
|
.form-group {
|
|
justify-content: end;
|
|
flex-wrap: nowrap;
|
|
}
|
|
|
|
.hint {
|
|
grid-column: 1 / -1;
|
|
}
|
|
}
|
|
}
|
|
|
|
fieldset {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
|
|
&.two-columns {
|
|
display: grid;
|
|
grid-template-columns: 1fr 2fr;
|
|
gap: 10px;
|
|
|
|
&.even {
|
|
grid-template-columns: 1fr 1fr;
|
|
}
|
|
}
|
|
|
|
&.three-columns {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1fr;
|
|
gap: 4px;
|
|
.form-group label {
|
|
line-height: unset;
|
|
}
|
|
}
|
|
|
|
&.six-columns {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr 1fr 1fr 1fr 1fr;
|
|
gap: 2px;
|
|
}
|
|
|
|
&.start-align {
|
|
align-self: flex-start;
|
|
}
|
|
}
|
|
|
|
.toggleable-row {
|
|
width: 100%;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
|
|
&.spaced {
|
|
padding-right: 28.5px;
|
|
}
|
|
|
|
.form-group {
|
|
flex: 1;
|
|
}
|
|
}
|
|
|
|
.setting-group-field {
|
|
white-space: nowrap;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
flex-wrap: nowrap;
|
|
}
|
|
|
|
.settings-items {
|
|
width: 100%;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 8px;
|
|
|
|
.settings-item {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
border: 1px solid;
|
|
border-radius: 8px;
|
|
padding: 0 8px 0 0;
|
|
|
|
.settings-sub-item {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
|
|
img {
|
|
width: 60px;
|
|
border-radius: 8px 0 0 8px;
|
|
}
|
|
|
|
i {
|
|
font-size: var(--font-size-18);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.settings-item-header {
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.profile {
|
|
height: 100px;
|
|
width: 100px;
|
|
object-fit: cover;
|
|
box-sizing: border-box;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.item-info {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: center;
|
|
gap: 5px;
|
|
text-align: center;
|
|
width: 80%;
|
|
|
|
.item-name input[type='text'] {
|
|
font-size: var(--font-size-32);
|
|
height: 42px;
|
|
text-align: center;
|
|
width: 90%;
|
|
transition: all 0.3s ease;
|
|
outline: 2px solid transparent;
|
|
border: 1px solid transparent;
|
|
|
|
&:hover[type='text'],
|
|
&:focus[type='text'] {
|
|
box-shadow: none;
|
|
outline: 2px solid light-dark(@dark-blue, @golden);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.settings-col {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 4px;
|
|
}
|
|
|
|
.trait-item {
|
|
input {
|
|
text-align: center;
|
|
}
|
|
}
|
|
|
|
.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;
|
|
justify-content: end;
|
|
|
|
label {
|
|
width: 240px;
|
|
font-style: italic;
|
|
text-align: center;
|
|
}
|
|
}
|
|
}
|