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

@@ -0,0 +1,47 @@
<div class="settlement-main settlement-main-{{ifThen isPlayMode 'play' 'edit'}}">
<header class="settlement-header flexrow">
<img class="actor-img" src="{{actor.img}}" data-edit="img" data-action="editImage" data-tooltip="{{actor.name}}" />
<div class="settlement-header-info">
<div class="settlement-name-row flexrow">
{{formInput fields.name value=source.name rootId=partId disabled=isPlayMode}}
{{#unless isPlayMode}}
{{formInput systemFields.archetype value=system.archetype name="system.archetype" localize=true}}
{{else}}
<span class="settlement-archetype-badge">{{localize (lookup archetypeChoices system.archetype)}}</span>
{{/unless}}
<a class="control" data-action="toggleSheet" data-tooltip="OATHHAMMER.ToggleSheet" data-tooltip-direction="UP">
<i class="fa-solid fa-{{ifThen isPlayMode 'lock' 'pen'}}"></i>
</a>
</div>
<div class="settlement-stats flexrow">
<div class="stat-item">
<label>{{localize "OATHHAMMER.Label.Renown"}}</label>
{{formInput systemFields.renown value=system.renown name="system.renown" disabled=isPlayMode}}
</div>
<div class="stat-item">
<label>{{localize "OATHHAMMER.Label.Territory"}}</label>
{{formInput systemFields.territory value=system.territory name="system.territory" disabled=isPlayMode}}
</div>
<div class="stat-item">
<label>{{localize "OATHHAMMER.Label.Population"}}</label>
{{formInput systemFields.population value=system.population name="system.population" disabled=isPlayMode}}
</div>
<div class="stat-item stat-item--flags">
{{#unless isPlayMode}}
<label>
{{formInput systemFields.isCapital value=system.isCapital name="system.isCapital"}}
{{localize "OATHHAMMER.Label.IsCapital"}}
</label>
<label>
{{formInput systemFields.underSiege value=system.underSiege name="system.underSiege"}}
{{localize "OATHHAMMER.Label.UnderSiege"}}
</label>
{{else}}
{{#if system.isCapital}}<span class="settlement-badge settlement-badge--capital">★ {{localize "OATHHAMMER.Label.Capital"}}</span>{{/if}}
{{#if system.underSiege}}<span class="settlement-badge settlement-badge--siege">⚔ {{localize "OATHHAMMER.Label.UnderSiege"}}</span>{{/if}}
{{/unless}}
</div>
</div>
</div>
</header>
</div>