Remove invalid DataModels - keep only template.json types
Removed DataModels that are NOT in template.json types array: - scar, annency-item, boheme, contact, confrontation Only valid Item types are: equipment, weapon, trait, specialization, maneuver Only valid Actor types are: pc, npc, annency Updated: - modules/models/_module.js - modules/ecryme-main.js (CONFIG.Item.dataModels) - system.json (documentTypes) - modules/models/README.md Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -57,19 +57,14 @@ Hooks.once("init", async function () {
|
||||
npc: models.EcrymeNPCDataModel,
|
||||
annency: models.EcrymeAnnencyDataModel
|
||||
}
|
||||
|
||||
|
||||
CONFIG.Item.documentClass = EcrymeItem
|
||||
CONFIG.Item.dataModels = {
|
||||
equipment: models.EcrymeEquipmentDataModel,
|
||||
weapon: models.EcrymeWeaponDataModel,
|
||||
trait: models.EcrymeTraitDataModel,
|
||||
specialization: models.EcrymeSpecializationDataModel,
|
||||
maneuver: models.EcrymeManeuverDataModel,
|
||||
scar: models.EcrymeScarDataModel,
|
||||
annency: models.EcrymeAnnencyItemDataModel,
|
||||
boheme: models.EcrymeBohemeDataModel,
|
||||
contact: models.EcrymeContactDataModel,
|
||||
confrontation: models.EcrymeConfrontationDataModel
|
||||
maneuver: models.EcrymeManeuverDataModel
|
||||
}
|
||||
|
||||
game.system.ecryme = {
|
||||
|
||||
@@ -17,11 +17,6 @@ Le système Ecryme a été migré de l'ancien système `template.json` vers les
|
||||
- **trait.js** - Traits de personnage
|
||||
- **specialization.js** - Spécialisations de compétences
|
||||
- **maneuver.js** - Manœuvres de combat
|
||||
- **scar.js** - Cicatrices (impacts permanents)
|
||||
- **annency-item.js** - Items Annency
|
||||
- **boheme.js** - Bohèmes
|
||||
- **contact.js** - Contacts
|
||||
- **confrontation.js** - Confrontations
|
||||
|
||||
### Modèles d'Acteurs
|
||||
|
||||
|
||||
@@ -3,17 +3,12 @@
|
||||
* Ce fichier centralise tous les exports des modèles de données
|
||||
*/
|
||||
|
||||
// Modèles d'items
|
||||
// Modèles d'items (uniquement les types définis dans template.json types array)
|
||||
export { default as EcrymeEquipmentDataModel } from './equipment.js';
|
||||
export { default as EcrymeWeaponDataModel } from './weapon.js';
|
||||
export { default as EcrymeTraitDataModel } from './trait.js';
|
||||
export { default as EcrymeSpecializationDataModel } from './specialization.js';
|
||||
export { default as EcrymeManeuverDataModel } from './maneuver.js';
|
||||
export { default as EcrymeScarDataModel } from './scar.js';
|
||||
export { default as EcrymeAnnencyItemDataModel } from './annency-item.js';
|
||||
export { default as EcrymeBohemeDataModel } from './boheme.js';
|
||||
export { default as EcrymeContactDataModel } from './contact.js';
|
||||
export { default as EcrymeConfrontationDataModel } from './confrontation.js';
|
||||
|
||||
// Modèles d'acteurs
|
||||
export { default as EcrymePCDataModel } from './pc.js';
|
||||
|
||||
@@ -1,14 +0,0 @@
|
||||
/**
|
||||
* Data model pour les annency (items)
|
||||
*/
|
||||
export default class EcrymeAnnencyItemDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
description: new fields.HTMLField({ initial: "" }),
|
||||
collective: new fields.BooleanField({ initial: false }),
|
||||
multiple: new fields.BooleanField({ initial: false }),
|
||||
improvements: new fields.StringField({ initial: "" })
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
/**
|
||||
* Data model pour les bohèmes
|
||||
*/
|
||||
export default class EcrymeBohemeDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
description: new fields.HTMLField({ initial: "" }),
|
||||
ideals: new fields.StringField({ initial: "" }),
|
||||
political: new fields.StringField({ initial: "" })
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
/**
|
||||
* 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 })
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,23 +0,0 @@
|
||||
/**
|
||||
* Data model pour les contacts
|
||||
*/
|
||||
export default class EcrymeContactDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
description: new fields.HTMLField({ initial: "" }),
|
||||
attitude: new fields.StringField({
|
||||
initial: "neutral",
|
||||
choices: {
|
||||
hostile: "Hostile",
|
||||
unfriendly: "Inamical",
|
||||
neutral: "Neutre",
|
||||
friendly: "Amical",
|
||||
allied: "Allié"
|
||||
}
|
||||
}),
|
||||
organization: new fields.StringField({ initial: "" }),
|
||||
location: new fields.StringField({ initial: "" })
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -1,25 +0,0 @@
|
||||
/**
|
||||
* Data model pour les cicatrices
|
||||
*/
|
||||
export default class EcrymeScarDataModel extends foundry.abstract.TypeDataModel {
|
||||
static defineSchema() {
|
||||
const fields = foundry.data.fields;
|
||||
return {
|
||||
description: new fields.HTMLField({ initial: "" }),
|
||||
skillcategory: new fields.ArrayField(
|
||||
new fields.StringField({
|
||||
choices: {
|
||||
physical: "Physique",
|
||||
mental: "Mental",
|
||||
social: "Social",
|
||||
cephalie: "Céphalie"
|
||||
}
|
||||
}),
|
||||
{
|
||||
initial: ["physical", "mental", "social", "cephalie"]
|
||||
}
|
||||
),
|
||||
scarLevel: new fields.NumberField({ initial: 1, integer: true, min: 1 })
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -119,12 +119,7 @@
|
||||
"weapon": { "htmlFields": ["description"] },
|
||||
"trait": { "htmlFields": ["description"] },
|
||||
"specialization": { "htmlFields": ["description"] },
|
||||
"maneuver": { "htmlFields": ["description"] },
|
||||
"scar": { "htmlFields": ["description"] },
|
||||
"annency": { "htmlFields": ["description"] },
|
||||
"boheme": { "htmlFields": ["description"] },
|
||||
"contact": { "htmlFields": ["description"] },
|
||||
"confrontation": { "htmlFields": ["description"] }
|
||||
"maneuver": { "htmlFields": ["description"] }
|
||||
}
|
||||
},
|
||||
"primaryTokenAttribute": "secondary.health",
|
||||
|
||||
Reference in New Issue
Block a user