Migration complète vers DataModels Foundry VTT
- Ajout de 14 DataModels (10 Items + 3 Acteurs) * Items: equipment, weapon, trait, specialization, maneuver, scar, annency, boheme, contact, confrontation * Acteurs: pc, npc, annency - Corrections d'initialisation * Ordre d'initialisation corrigé (CONFIG.dataModels avant game.system) * Import dynamique des DataModels pour éviter timing issues * Helper functions pour éviter réutilisation de champs - Documentation complète * AUDIT_DATAMODELS.md: Rapport d'audit complet (85+ champs vérifiés) * MIGRATION_DATAMODELS.md: Guide de migration * FIX_INIT_ERROR.md: Résolution des erreurs * BABELE_ERROR_ANALYSIS.md: Analyse erreur Babele * RESUME_MIGRATION.md: Résumé complet * modules/models/README.md: Documentation des DataModels - template.json marqué comme DEPRECATED - changelog.md mis à jour Note: Erreur Babele/LibWrapper non résolue (problème de module externe) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
16
modules/models/confrontation.js
Normal file
16
modules/models/confrontation.js
Normal file
@@ -0,0 +1,16 @@
|
||||
/**
|
||||
* Data model pour les confrontations
|
||||
*/
|
||||
export default class EcrymeConfrontationDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
description: new fields.HTMLField({ initial: "" }),
|
||||
attackerId: new fields.StringField({ initial: "" }),
|
||||
defenserId: new fields.StringField({ initial: "" }),
|
||||
rolllist: new fields.ArrayField(new fields.ObjectField(), { initial: [] }),
|
||||
bonusexecution: new fields.NumberField({ initial: 0, integer: true }),
|
||||
bonuspreservation: new fields.NumberField({ initial: 0, integer: true })
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user