Various fixes
This commit is contained in:
@ -11,14 +11,16 @@ export class PegasusActorCreate {
|
||||
name: "New Actor",
|
||||
type: "character"
|
||||
});
|
||||
this.actor.sheet.render(true);
|
||||
|
||||
const racesPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.race");
|
||||
this.races = racesPack.map(i => i.toObject());
|
||||
const rolesPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.role");
|
||||
this.roles = rolesPack.map(i => i.toObject());
|
||||
const perksPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.perk");
|
||||
this.perks = perksPack.map(i => i.toObject());
|
||||
this.actor.sheet.render(true)
|
||||
|
||||
this.actor.computeValue = true // To force value computation
|
||||
|
||||
const racesPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.race")
|
||||
this.races = racesPack.map(i => i.toObject())
|
||||
const rolesPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.role")
|
||||
this.roles = rolesPack.map(i => i.toObject())
|
||||
const perksPack = await PegasusUtility.loadCompendium("fvtt-pegasus-rpg.perk")
|
||||
this.perks = perksPack.map(i => i.toObject())
|
||||
|
||||
this.showRaces()
|
||||
}
|
||||
@ -239,12 +241,10 @@ export class PegasusActorCreate {
|
||||
|
||||
/* --------------- -------------------- --------- */
|
||||
manageRacePerks(race) {
|
||||
console.log("MANAG RACE PERKsS", this.currentRace)
|
||||
if ( !this.currentRace.data.perksgained ) {
|
||||
this.showRoles()
|
||||
return;
|
||||
}
|
||||
console.log("MANAG RACE PERKsS 2", this.currentRace)
|
||||
if ( !this.racePerks) { // First init
|
||||
if ( this.currentRace.data.perksall) {
|
||||
this.racePerks = duplicate(this.perks)
|
||||
@ -337,7 +337,7 @@ export class PegasusActorCreate {
|
||||
formData.rolestats.push( duplicate(this.actor.data.data.statistics[stat.name.toLowerCase()]) )
|
||||
}
|
||||
}
|
||||
console.log("STAT", this.roleStats, formData)
|
||||
//console.log("STAT", this.roleStats, formData)
|
||||
this.renderChatMessage( formData)
|
||||
}
|
||||
|
||||
@ -362,7 +362,8 @@ export class PegasusActorCreate {
|
||||
|
||||
/* -------------------------------------------- */
|
||||
async showCharacterEnd() {
|
||||
this.actor.computeNRGHealth()
|
||||
await this.actor.computeNRGHealth()
|
||||
this.actor.computeValue = false // To force value computation
|
||||
let formData = this.createFormData("character-end")
|
||||
this.renderChatMessage( formData)
|
||||
}
|
||||
|
Reference in New Issue
Block a user