feat: add Settlement actor type with Overview/Buildings/Inventory tabs

- New TypeDataModel: archetype, territory, renown, currency (gp/sp/cp),
  garrison, underSiege, isCapital, founded, taxNotes, description, notes
- 3-tab ApplicationV2 sheet with drag & drop for building/weapon/armor/equipment
- Currency steppers (+/−), building constructed toggle, qty controls
- LESS-based CSS (settlement-sheet.less) + base.less updated for shared styles
- Full i18n keys in lang/en.json (8 settlement archetypes)
- system.json: registered settlement actor type

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
2026-03-20 17:01:38 +01:00
parent b67d85c6be
commit b3fd7e1aa1
28 changed files with 966 additions and 270 deletions

View File

@@ -27,7 +27,8 @@
background-size: 100% 100%;
}
.oathhammer .character-content,
.oathhammer .npc-content {
.oathhammer .npc-content,
.oathhammer .settlement-content {
font-family: "Calibri", "Segoe UI", sans-serif;
font-size: 0.86rem;
color: #2a1a0a;
@@ -38,32 +39,39 @@
padding: 10px 20px;
}
.oathhammer .character-content nav.tabs [data-tab],
.oathhammer .npc-content nav.tabs [data-tab] {
.oathhammer .npc-content nav.tabs [data-tab],
.oathhammer .settlement-content nav.tabs [data-tab] {
color: #535128;
}
.oathhammer .character-content nav.tabs [data-tab].active,
.oathhammer .npc-content nav.tabs [data-tab].active {
.oathhammer .npc-content nav.tabs [data-tab].active,
.oathhammer .settlement-content nav.tabs [data-tab].active {
color: #084a74;
}
.oathhammer .character-content input:disabled,
.oathhammer .npc-content input:disabled,
.oathhammer .settlement-content input:disabled,
.oathhammer .character-content select:disabled,
.oathhammer .npc-content select:disabled {
.oathhammer .npc-content select:disabled,
.oathhammer .settlement-content select:disabled {
background-color: rgba(0, 0, 0, 0.08);
border-color: transparent;
color: #2a1a0a;
}
.oathhammer .character-content input,
.oathhammer .npc-content input,
.oathhammer .settlement-content input,
.oathhammer .character-content select,
.oathhammer .npc-content select {
.oathhammer .npc-content select,
.oathhammer .settlement-content select {
height: 1.5rem;
background-color: rgba(255, 255, 255, 0.3);
border-color: #084a74;
color: #2a1a0a;
}
.oathhammer .character-content input[name="name"],
.oathhammer .npc-content input[name="name"] {
.oathhammer .npc-content input[name="name"],
.oathhammer .settlement-content input[name="name"] {
height: 2.5rem;
font-family: "Sherwood", "Palatino Linotype", serif;
font-size: calc(0.86rem * 1.2);
@@ -73,13 +81,15 @@
background: transparent;
}
.oathhammer .character-content fieldset,
.oathhammer .npc-content fieldset {
.oathhammer .npc-content fieldset,
.oathhammer .settlement-content fieldset {
margin-bottom: 4px;
border-radius: 4px;
border-color: #535128;
}
.oathhammer .character-content legend,
.oathhammer .npc-content legend {
.oathhammer .npc-content legend,
.oathhammer .settlement-content legend {
font-family: "BlueDragon", "Palatino Linotype", serif;
font-size: calc(0.86rem * 1.1);
font-weight: bold;
@@ -87,7 +97,8 @@
color: #084a74;
}
.oathhammer .character-content label,
.oathhammer .npc-content label {
.oathhammer .npc-content label,
.oathhammer .settlement-content label {
font-family: "BlueDragon", "Palatino Linotype", serif;
font-size: 0.86rem;
color: #2a1a0a;
@@ -229,11 +240,6 @@
font-size: calc(0.86rem * 0.9);
font-weight: bold;
}
.oathhammer .skills-container .skill-row a.skill-name-col {
display: inline-flex;
align-items: center;
gap: 5px;
}
.oathhammer .skills-container .skill-row .skill-rank-col select,
.oathhammer .skills-container .skill-row .skill-modifier-col input {
width: 100%;
@@ -438,19 +444,6 @@
font-size: 0.86rem;
font-weight: bold;
}
.oathhammer .character-main .character-identity-bar .identity-slot a.class-open-link {
flex: 1;
font-family: "BlueDragon", "Palatino Linotype", serif;
font-size: 0.86rem;
font-weight: bold;
opacity: 1;
text-decoration: none;
cursor: pointer;
}
.oathhammer .character-main .character-identity-bar .identity-slot a.class-open-link:hover {
text-decoration: underline;
opacity: 1;
}
.oathhammer .character-main .character-identity-bar .identity-slot .slot-icon {
font-size: calc(0.86rem * 0.9);
opacity: 0.8;
@@ -575,51 +568,6 @@
width: 4rem;
text-align: center;
}
.oathhammer .currency-stepper {
display: flex;
align-items: center;
gap: 2px;
}
.oathhammer .currency-stepper input {
width: 3.5rem;
text-align: center;
}
/* Shared +/- button style */
.oathhammer .qty-btn {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px;
height: 18px;
font-size: 0.9rem;
font-weight: bold;
line-height: 1;
color: #2a1a0a;
background: rgba(200, 168, 75, 0.2);
border: 1px solid rgba(200, 168, 75, 0.5);
border-radius: 3px;
cursor: pointer;
user-select: none;
flex-shrink: 0;
text-decoration: none;
}
.oathhammer .qty-btn:hover {
background: rgba(200, 168, 75, 0.45);
color: #2a1a0a;
}
/* Quantity stepper in item rows */
.oathhammer .item-qty-stepper {
display: flex;
align-items: center;
gap: 3px;
justify-content: center;
}
.oathhammer .item-qty-stepper .qty-value {
min-width: 1.6rem;
text-align: center;
font-size: calc(0.86rem * 0.9);
font-weight: bold;
}
.oathhammer .identity-lineage-class {
gap: 8px;
margin-bottom: 8px;
@@ -734,9 +682,6 @@
.oathhammer .item-list-header .col-name {
text-align: left;
}
.oathhammer .item-list-header .col-oath-effect {
text-align: left;
}
.oathhammer .item-entry {
display: grid;
align-items: center;
@@ -833,7 +778,7 @@
}
.oathhammer .item-list--ammo .item-list-header,
.oathhammer .item-list--ammo .item-entry {
grid-template-columns: 24px 1fr 5.5rem 3.5rem;
grid-template-columns: 24px 1fr 4rem 3.5rem;
}
.oathhammer .item-list--spell .item-list-header,
.oathhammer .item-list--spell .item-entry {
@@ -849,7 +794,7 @@
}
.oathhammer .item-list--equipment .item-list-header,
.oathhammer .item-list--equipment .item-entry {
grid-template-columns: 24px 1fr 5rem 5.5rem 3.5rem;
grid-template-columns: 24px 1fr 5rem 3rem 3.5rem;
}
.oathhammer .item-list--magic-item .item-list-header,
.oathhammer .item-list--magic-item .item-entry {
@@ -865,21 +810,7 @@
}
.oathhammer .item-list--oath .item-list-header,
.oathhammer .item-list--oath .item-entry {
grid-template-columns: 24px 1fr 10rem 3.5rem 3.5rem;
}
.oathhammer .item-oath-effect {
font-size: calc(0.86rem * 0.88);
color: #2a1a0a;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.oathhammer .item-oath-effect.oath-boon {
color: #1a5c2a;
}
.oathhammer .item-oath-effect.oath-bane {
color: #c0392b;
font-style: italic;
grid-template-columns: 24px 1fr 7rem 3.5rem 3.5rem;
}
.oathhammer .item-usage {
font-size: calc(0.86rem * 0.9);
@@ -978,44 +909,6 @@
background: rgba(192, 57, 43, 0.1);
border-color: rgba(192, 57, 43, 0.4);
}
/* Initiative bar */
.initiative-bar {
display: flex;
align-items: center;
gap: 10px;
padding: 4px 6px 6px;
}
.initiative-roll-btn {
display: inline-flex;
align-items: center;
gap: 5px;
padding: 3px 10px;
font-size: calc(0.86rem * 0.9);
font-weight: bold;
color: #2a1a0a;
background: rgba(200, 168, 75, 0.2);
border: 1px solid rgba(200, 168, 75, 0.5);
border-radius: 4px;
cursor: pointer;
text-decoration: none;
text-transform: uppercase;
letter-spacing: 0.04em;
transition: background 0.15s;
}
.initiative-roll-btn:hover {
background: rgba(200, 168, 75, 0.4);
color: #2a1a0a;
}
.initiative-score {
font-size: calc(0.86rem * 0.95);
font-weight: bold;
color: #2a1a0a;
background: rgba(200, 168, 75, 0.15);
border: 1px solid rgba(200, 168, 75, 0.4);
border-radius: 4px;
padding: 2px 10px;
}
.oathhammer .item-sheet-common {
overflow: auto;
padding: 10px 20px;
@@ -1237,14 +1130,6 @@
.fvtt-oath-hammer .window-content {
background: #f5ead0;
padding: 6px 8px;
/* iOS Safari flex-overflow fix: prevent flex child collapse */
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
/* iOS Safari: ensure dialog content is not hidden due to flex-height collapse */
.fvtt-oath-hammer.dialog .window-content {
min-height: 80px;
height: auto;
}
.fvtt-oath-hammer .oh-roll-dialog {
font-family: "Calibri", "Segoe UI", sans-serif;
@@ -1413,27 +1298,6 @@
cursor: pointer;
flex: 1 1 auto;
}
/* Range conditions stacked checkbox block */
.fvtt-oath-hammer .oh-roll-dialog .roll-option-block {
display: flex;
flex-direction: column;
gap: 4px;
padding: 4px 0;
border-top: 1px solid rgba(83, 81, 40, 0.15);
}
.fvtt-oath-hammer .oh-roll-dialog .roll-option-block-label {
font-size: calc(0.86rem * 0.85);
font-weight: bold;
color: #5a3e1b;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.fvtt-oath-hammer .oh-roll-dialog .range-conditions {
display: flex;
flex-direction: column;
gap: 2px;
padding-left: 4px;
}
.fvtt-oath-hammer .oh-roll-dialog .roll-visibility-block select {
width: 100%;
padding: 4px 6px;
@@ -1886,98 +1750,150 @@
.item-list--armor .item-actions a[data-action="edit"] {
margin-left: 6px;
}
/* ============================================================
FREE ROLL BAR — Chat sidebar widget
============================================================ */
.oh-free-roll-bar {
pointer-events: all;
display: flex;
align-items: center;
gap: 6px;
padding: 5px 8px;
background: linear-gradient(135deg, #2a1a0a 0%, #3d2812 100%);
border-top: 1px solid rgba(255, 200, 80, 0.25);
border-bottom: 1px solid rgba(0, 0, 0, 0.3);
flex-wrap: wrap;
.oathhammer .settlement-main {
padding: 0 0 8px;
border-bottom: 1px solid rgba(42, 26, 10, 0.25);
margin-bottom: 4px;
}
.oh-free-roll-bar .oh-frb-label {
color: #f5d78e;
font-family: "BlueDragon", "Palatino Linotype", serif;
font-size: calc(0.86rem * 0.9);
.oathhammer .settlement-header {
align-items: flex-start;
gap: 10px;
}
.oathhammer .settlement-header .actor-img {
width: 72px;
height: 72px;
-o-object-fit: cover;
object-fit: cover;
border: 2px solid rgba(42, 26, 10, 0.4);
border-radius: 4px;
cursor: pointer;
flex-shrink: 0;
}
.oathhammer .settlement-header-info {
flex: 1;
display: flex;
flex-direction: column;
gap: 6px;
}
.oathhammer .settlement-name-row {
align-items: center;
gap: 8px;
}
.oathhammer .settlement-archetype-badge {
font-size: calc(0.86rem * 0.85);
color: #cd9d2c;
background: rgba(200, 168, 75, 0.15);
border: 1px solid rgba(200, 168, 75, 0.4);
border-radius: 3px;
padding: 1px 6px;
white-space: nowrap;
}
.oathhammer .settlement-stats {
gap: 8px;
flex-wrap: wrap;
align-items: flex-start;
}
.oathhammer .settlement-stats .stat-item {
display: flex;
flex-direction: column;
gap: 2px;
min-width: 80px;
}
.oathhammer .settlement-stats .stat-item label {
font-size: 0.72rem;
color: #2a1a0a;
opacity: 0.8;
text-transform: uppercase;
letter-spacing: 0.03em;
}
.oathhammer .settlement-stats .stat-item input {
padding: 2px 4px;
}
.oathhammer .settlement-stats .stat-item--flags {
display: flex;
flex-direction: row;
gap: 8px;
align-items: center;
flex-wrap: wrap;
min-width: unset;
}
.oathhammer .settlement-stats .stat-item--flags label {
display: flex;
align-items: center;
gap: 4px;
opacity: 0.9;
}
.oh-free-roll-bar .oh-frb-controls {
display: flex;
align-items: center;
gap: 5px;
flex: 1;
flex-wrap: wrap;
}
.oh-free-roll-bar .oh-frb-pool {
height: 1.6rem;
font-size: 0.8rem;
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 200, 80, 0.3);
border-radius: 3px;
color: #f5ead0;
cursor: pointer;
padding: 0 3px;
}
.oh-free-roll-bar .oh-frb-pool option {
background: #2a1a0a;
color: #f5ead0;
}
.oh-free-roll-bar .oh-frb-color {
height: 1.6rem;
font-size: 0.8rem;
background: rgba(255, 255, 255, 0.12);
border: 1px solid rgba(255, 200, 80, 0.3);
border-radius: 3px;
color: #f5ead0;
cursor: pointer;
padding: 0 3px;
}
.oh-free-roll-bar .oh-frb-color option {
background: #2a1a0a;
color: #f5ead0;
}
.oh-free-roll-bar .oh-frb-explode-label {
display: flex;
align-items: center;
gap: 3px;
color: #f5d78e;
font-size: 0.78rem;
cursor: pointer;
white-space: nowrap;
opacity: 0.85;
}
.oh-free-roll-bar .oh-frb-explode-label input[type="checkbox"] {
cursor: pointer;
accent-color: #c9a227;
}
.oh-free-roll-bar .oh-frb-roll-btn {
margin-left: auto;
height: 1.7rem;
padding: 0 10px;
background: linear-gradient(135deg, #c9a227 0%, #8a6a10 100%);
border: 1px solid rgba(255, 200, 80, 0.4);
border-radius: 4px;
color: #1a0e00;
font-family: "BlueDragon", "Palatino Linotype", serif;
font-size: calc(0.86rem * 0.85);
font-weight: bold;
text-transform: none;
letter-spacing: 0;
cursor: pointer;
white-space: nowrap;
transition: filter 0.15s;
}
.oh-free-roll-bar .oh-frb-roll-btn:hover {
filter: brightness(1.15);
.oathhammer .settlement-badge {
font-size: 0.75rem;
font-weight: bold;
border-radius: 3px;
padding: 2px 7px;
}
.oh-free-roll-bar .oh-frb-roll-btn:active {
filter: brightness(0.9);
.oathhammer .settlement-badge--capital {
background: rgba(200, 168, 75, 0.2);
border: 1px solid rgba(200, 168, 75, 0.5);
color: #5d4d1d;
}
.oathhammer .settlement-badge--siege {
background: rgba(180, 40, 40, 0.12);
border: 1px solid rgba(180, 40, 40, 0.4);
color: #8a1a1a;
}
.oathhammer .settlement-content .tab {
padding: 8px 0;
}
.oathhammer .settlement-overview-grid {
display: grid;
grid-template-columns: 1fr 1fr 2fr;
gap: 8px;
margin-bottom: 8px;
}
.oathhammer .settlement-hint {
font-size: 0.78rem;
color: #2a1a0a;
opacity: 0.7;
margin: 0 0 8px;
font-style: italic;
}
.oathhammer .item-list--buildings .item-list-header,
.oathhammer .item-list--buildings .item-entry {
display: grid;
grid-template-columns: 28px 1fr 3rem 5rem 4rem 3rem;
align-items: center;
gap: 4px;
}
.oathhammer .item-entry.building-constructed {
background: rgba(60, 140, 60, 0.08);
}
.oathhammer .item-entry.building-constructed .item-name {
font-weight: 600;
}
.oathhammer .item-constructed {
text-align: center;
font-size: 1rem;
color: #3a7a3a;
}
.oathhammer .item-tax {
font-size: calc(0.86rem * 0.85);
color: #312f17;
text-align: center;
}
.oathhammer .item-tax--inactive {
opacity: 0.4;
}
.oathhammer .item-cost {
font-size: calc(0.86rem * 0.85);
color: #856d28;
text-align: right;
}
.oathhammer .construct-toggle {
color: #3a7a3a;
cursor: pointer;
font-size: 1rem;
}
.oathhammer .construct-toggle:hover {
color: #214621;
}