Nombreuses corrections sur les fiches settlement/NPC

This commit is contained in:
2026-03-22 21:35:47 +01:00
parent ec291e9c60
commit b46c6d804c
51 changed files with 2892 additions and 227 deletions

View File

@@ -0,0 +1,37 @@
import OathHammerItemSheet from "./base-item-sheet.mjs"
import { SYSTEM } from "../../config/system.mjs"
export default class OathHammerSkillNPCSheet extends OathHammerItemSheet {
/** @override */
static DEFAULT_OPTIONS = {
classes: ["skillnpc"],
position: { width: 460 },
window: { contentClasses: ["skillnpc-content"] },
}
/** @override */
static PARTS = {
main: { template: "systems/fvtt-oath-hammer/templates/item/skillnpc-sheet.hbs" },
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
// Build dicePool selector (020)
context.dicePoolChoices = Object.fromEntries(
Array.from({ length: 21 }, (_, i) => [i, String(i)])
)
// Color choices (localized labels)
context.colorChoices = Object.fromEntries(
Object.entries(SYSTEM.DICE_COLOR_TYPES).map(([k, v]) => [k, game.i18n.localize(v)])
)
// Skill reference choices (optional)
context.skillRefChoices = {
"": `${game.i18n.localize("OATHHAMMER.Label.None")}`,
...Object.fromEntries(
Object.entries(SYSTEM.SKILLS).map(([k, v]) => [k, game.i18n.localize(v.label)])
)
}
return context
}
}