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