Fix 0.8.2 actors

This commit is contained in:
sladecraven 2021-05-01 19:12:55 +02:00
parent c7ba56b90b
commit 6d7d55e12b
4 changed files with 8 additions and 2 deletions

View File

@ -63,6 +63,7 @@ export class RdDActorSheet extends ActorSheet {
// // Copy Active Effects
// data.effects = effects;
console.log("---- data");
// // Return template data
let formData = {

View File

@ -108,7 +108,7 @@ export class RdDActor extends Actor {
}
const competences = await RdDUtility.loadCompendium(RdDItemCompetence.actorCompendium(actorData.type));
actorData.items = competences.map(it => Misc.data(it));
actorData.items = competences.map(i => i.toObject());
if (isPersonnage) {
actorData.items = actorData.items.concat(Monnaie.monnaiesData());
}
@ -2014,6 +2014,7 @@ export class RdDActor extends Actor {
return draconicList;
}
/* -------------------------------------------- */
getDraconicsSort(draconicList, sort) {
//console.log(draconicList, bestDraconic, draconic, voie);
switch (Grammar.toLowerCaseNoAccent(sort.name)) {

View File

@ -488,6 +488,7 @@ export class RdDUtility {
/* -------------------------------------------- */
static async loadCompendium(compendium, filter = item => true) {
let compendiumData = await RdDUtility.loadCompendiumData(compendium);
console.log(compendiumData);
return compendiumData.filter(filter);
}

View File

@ -22,15 +22,18 @@ export class PixiTMR {
load(onLoad = (loader, resources) => {}) {
let loader = this.pixiApp.loader;
console.log("LOADING 1");
for (const [name, img] of Object.entries(PixiTMR.textures)) {
loader = loader.add(name, img);
}
console.log("LOADING 2");
loader.load((loader, resources) => {
onLoad(loader, resources);
for (let onAnimate of this.callbacksOnAnimate) {
onAnimate();
}
});
console.log("LOADING 3");
}
static register(name, img) {