Auto reformat

This commit is contained in:
Vincent Vandemeulebrouck 2022-12-14 20:00:35 +01:00
parent 92643d1c46
commit 1040ec1be2

View File

@ -12,6 +12,7 @@ import { DialogRepos } from "./dialog-repos.js";
import { RdDSheetUtility } from "./rdd-sheet-utility.js";
import { STATUSES } from "./settings/status-effects.js";
import { Monnaie } from "./item-monnaie.js";
import { MAINS_DIRECTRICES } from "./actor.js";
/* -------------------------------------------- */
/**
@ -52,10 +53,10 @@ export class RdDActorSheet extends ActorSheet {
limited: this.actor.limited,
options: this.options,
owner: this.actor.isOwner,
description: await TextEditor.enrichHTML(this.object.system.description, {async: true}),
biographie: await TextEditor.enrichHTML(this.object.system.biographie, {async: true}),
notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}),
notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, {async: true}),
description: await TextEditor.enrichHTML(this.object.system.description, { async: true }),
biographie: await TextEditor.enrichHTML(this.object.system.biographie, { async: true }),
notes: await TextEditor.enrichHTML(this.object.system.notes, { async: true }),
notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, { async: true }),
calc: {
fortune: Monnaie.getFortune(this.actor),
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
@ -76,8 +77,8 @@ export class RdDActorSheet extends ActorSheet {
formData.options.mainsDirectrices = MAINS_DIRECTRICES;
formData.byCateg = Misc.classify(formData.competences, it => it.system.categorie)
formData.calc.comptageArchetype = RdDItemCompetence.computeResumeArchetype(formData.competences);
formData.calc.competenceXPTotal= RdDItemCompetence.computeTotalXP(formData.competences);
formData.calc.fatigue= RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max);
formData.calc.competenceXPTotal = RdDItemCompetence.computeTotalXP(formData.competences);
formData.calc.fatigue = RdDUtility.calculFatigueHtml(formData.system.sante.fatigue.value, formData.system.sante.endurance.max);
formData.competences.forEach(item => {
item.system.isVisible = this.options.recherche
@ -386,7 +387,7 @@ export class RdDActorSheet extends ActorSheet {
})
.keyup(async event => {
const nouvelleRecherche = this._optionRecherche(event.currentTarget);
if (this.options.recherche?.text != nouvelleRecherche?.text){
if (this.options.recherche?.text != nouvelleRecherche?.text) {
this.options.recherche = nouvelleRecherche;
if (this.timerRecherche) {
clearTimeout(this.timerRecherche);
@ -520,7 +521,7 @@ export class RdDActorSheet extends ActorSheet {
}
_optionRecherche(target) {
if (!target.value?.length){
if (!target.value?.length) {
return undefined;
}
return {
@ -549,7 +550,7 @@ export class RdDActorSheet extends ActorSheet {
const sheetTabs = this.element.find(".sheet-tabs");
const sheetBody = this.element.find(".sheet-body");
let bodyHeight = position.height - sheetHeader[0].clientHeight;
if (sheetTabs.length>0) {
if (sheetTabs.length > 0) {
bodyHeight -= sheetTabs[0].clientHeight;
}
sheetBody.css("height", bodyHeight);