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:
32
modules/models/annency.js
Normal file
32
modules/models/annency.js
Normal file
@@ -0,0 +1,32 @@
|
||||
/**
|
||||
* Data model pour les Annency (acteurs)
|
||||
*/
|
||||
export default class EcrymeAnnencyDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
|
||||
return {
|
||||
base: new fields.SchemaField({
|
||||
iscollective: new fields.BooleanField({ initial: false }),
|
||||
ismultiple: new fields.BooleanField({ initial: false }),
|
||||
characters: new fields.ArrayField(new fields.StringField(), { initial: [] }),
|
||||
location: new fields.SchemaField({
|
||||
"1": new fields.StringField({ initial: "" }),
|
||||
"2": new fields.StringField({ initial: "" }),
|
||||
"3": new fields.StringField({ initial: "" }),
|
||||
"4": new fields.StringField({ initial: "" }),
|
||||
"5": new fields.StringField({ initial: "" })
|
||||
}),
|
||||
description: new fields.HTMLField({ initial: "" }),
|
||||
enhancements: new fields.StringField({ initial: "" })
|
||||
}),
|
||||
|
||||
boheme: new fields.SchemaField({
|
||||
name: new fields.StringField({ initial: "" }),
|
||||
ideals: new fields.StringField({ initial: "" }),
|
||||
politic: new fields.StringField({ initial: "" }),
|
||||
description: new fields.HTMLField({ initial: "" })
|
||||
})
|
||||
};
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user