Ouverture de l'acteur après import

This commit is contained in:
Vincent Vandemeulebrouck 2024-12-06 22:59:03 +01:00
parent d5686b81ed
commit f7fc7fbefb

View File

@ -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+(?<value>\\d+)\\s+(\\(actuelle\\s*:\\s+(?<actuelle>\\d+)\\))?", 'giu'));