diff --git a/module/apps/rdd-import-stats.js b/module/apps/rdd-import-stats.js index cd05e1e8..c7fb0ab9 100644 --- a/module/apps/rdd-import-stats.js +++ b/module/apps/rdd-import-stats.js @@ -211,6 +211,7 @@ export class RdDStatBlockParser { } } + if (type == "personnage") { // Now process armors const armors = await SystemCompendiums.getWorldOrCompendiumItems("armure", "equipement") for (let armor of armors) { @@ -223,21 +224,21 @@ export class RdDStatBlockParser { } - if (type == "personnage") { await RdDStatBlockParser.parseHautReve(statString, actorData, items); RdDStatBlockParser.parsePersonnage(statString, actorData); } - let name = RdDStatBlockParser.extractName(type, statString); + const name = RdDStatBlockParser.extractName(type, statString); - let newActor = await RdDBaseActorReve.create({ name, type: type, system: actorData, items }); - await newActor.remiseANeuf() - await RdDStatBlockParser.setValActuelle(newActor, statString) - // DUmp.... console.log(actorData); + + let newActor = await RdDBaseActorReve.create({ name, type, system: actorData, items }); + await newActor.remiseANeuf() + await RdDStatBlockParser.setValeursActuelles(newActor, statString) + await newActor?.sheet.render(true) } - static async setValActuelle(newActor, statString) { + static async setValeursActuelles(newActor, statString) { const updates = { } const endurance = XRegExp.exec(statString, XRegExp("endurance\\s+(?\\d+)\\s+(\\(actuelle\\s*:\\s+(?\\d+)\\))?", 'giu'));