Nombreuses corrections sur les fiches settlement/NPC
This commit is contained in:
28
module/applications/sheets/npcattack-sheet.mjs
Normal file
28
module/applications/sheets/npcattack-sheet.mjs
Normal file
@@ -0,0 +1,28 @@
|
||||
import OathHammerItemSheet from "./base-item-sheet.mjs"
|
||||
import { SYSTEM } from "../../config/system.mjs"
|
||||
|
||||
export default class OathHammerNpcAttackSheet extends OathHammerItemSheet {
|
||||
/** @override */
|
||||
static DEFAULT_OPTIONS = {
|
||||
classes: ["npcattack"],
|
||||
position: { width: 460 },
|
||||
window: { contentClasses: ["npcattack-content"] },
|
||||
}
|
||||
|
||||
/** @override */
|
||||
static PARTS = {
|
||||
main: { template: "systems/fvtt-oath-hammer/templates/item/npcattack-sheet.hbs" },
|
||||
}
|
||||
|
||||
/** @override */
|
||||
async _prepareContext() {
|
||||
const context = await super._prepareContext()
|
||||
context.dicePoolChoices = Object.fromEntries(
|
||||
Array.from({ length: 21 }, (_, i) => [i, String(i)])
|
||||
)
|
||||
context.colorChoices = Object.fromEntries(
|
||||
Object.entries(SYSTEM.DICE_COLOR_TYPES).map(([k, v]) => [k, game.i18n.localize(v)])
|
||||
)
|
||||
return context
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user