Migration datamodels !

This commit is contained in:
2026-01-10 16:05:56 +01:00
parent 627ccc707b
commit 438caf3b1c
3946 changed files with 318813 additions and 3453 deletions

View File

@@ -0,0 +1,40 @@
import WastelandActorSheet from "./base-actor-sheet.mjs"
export default class WastelandCreatureSheet extends WastelandActorSheet {
/** @override */
static DEFAULT_OPTIONS = {
...super.DEFAULT_OPTIONS,
classes: [...super.DEFAULT_OPTIONS.classes, "creature"],
window: {
...super.DEFAULT_OPTIONS.window,
title: "Feuille de Créature",
},
}
/** @override */
static PARTS = {
sheet: {
template: "systems/fvtt-wasteland/templates/actor-creature-sheet.hbs",
},
}
/** @override */
tabGroups = {
primary: "stats",
}
/** @override */
async _prepareContext() {
const context = await super._prepareContext()
const actor = this.document
// Add creature-specific data
context.skills = actor.getSkills()
context.armes = foundry.utils.duplicate(actor.getWeapons())
context.protections = foundry.utils.duplicate(actor.getArmors())
context.capacites = foundry.utils.duplicate(actor.getCapacites())
context.combat = actor.getCombatValues()
return context
}
}