Conserve l'historique des réponses
All checks were successful
Release Creation / build (release) Successful in 1m26s
All checks were successful
Release Creation / build (release) Successful in 1m26s
This commit is contained in:
@ -11,6 +11,7 @@ export class TeDeumCharacterCreator {
|
||||
this.religion = undefined
|
||||
this.caracBonus = {}
|
||||
this.competenceBonus = {}
|
||||
this.suiviReponses = []
|
||||
this.competences = TeDeumUtility.getCompetencesForDropDown()
|
||||
|
||||
for (let k in game.system.tedeum.config.caracteristiques) {
|
||||
@ -168,6 +169,8 @@ export class TeDeumCharacterCreator {
|
||||
let selectedResponse = question.reponses[context.responseKey]
|
||||
let compName = context.competences[context.responseKey] || selectedResponse.compName
|
||||
this.increaseCompetence(compName)
|
||||
|
||||
this.suiviReponses.push({ etape: stage.name, question: question.question, reponse: selectedResponse.reponse, compName: compName })
|
||||
}
|
||||
}
|
||||
|
||||
@ -573,6 +576,12 @@ export class TeDeumCharacterCreator {
|
||||
newArgent /= this.ageViril.system.cagnotteDivider
|
||||
await actor.update({ [`system.fortune.${this.origineSociale.cagnotteUnit}`]: newArgent})
|
||||
|
||||
let histoire = ""
|
||||
for (let reponse of this.suiviReponses) {
|
||||
histoire += `<p>${reponse.question}<br>${reponse.reponse} (${reponse.compName})</p>`
|
||||
}
|
||||
await actor.update({ "system.histoire": histoire})
|
||||
|
||||
actor.render(true)
|
||||
|
||||
const content = await renderTemplate("systems/fvtt-te-deum/templates/dialogs/character-creator-finished.hbs", context)
|
||||
|
Reference in New Issue
Block a user