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

@@ -23,7 +23,8 @@ Hooks.once("init", function () {
CONFIG.Combat.documentClass = OathHammerCombat
CONFIG.Actor.dataModels = {
character: models.OathHammerCharacter,
npc: models.OathHammerNPC
npc: models.OathHammerNPC,
settlement: models.OathHammerSettlement
}
CONFIG.Item.documentClass = documents.OathHammerItem
@@ -52,6 +53,11 @@ Hooks.once("init", function () {
makeDefault: true,
label: "OATHHAMMER.Sheet.NPC"
})
foundry.documents.collections.Actors.registerSheet("fvtt-oath-hammer", applications.OathHammerSettlementSheet, {
types: ["settlement"],
makeDefault: true,
label: "OATHHAMMER.Sheet.Settlement"
})
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet)
foundry.documents.collections.Items.registerSheet("fvtt-oath-hammer", applications.OathHammerWeaponSheet, { types: ["weapon"], makeDefault: true, label: "OATHHAMMER.Sheet.Weapon" })