Réduction de l'espace des TMR

This commit is contained in:
2023-11-15 22:14:00 +01:00
parent da3091dc4b
commit bfd3b0d74a
49 changed files with 1288 additions and 463 deletions

View File

@ -1,31 +1,26 @@
import { ChatUtility } from "../chat-utility.js";
import { Grammar } from "../grammar.js";
import { TMRUtility } from "../tmr-utility.js";
import { tmrConstants, tmrTokenZIndex } from "../tmr-constants.js";
import { tmrTokenZIndex } from "../tmr-constants.js";
import { Draconique } from "./draconique.js";
export class PresentCites extends Draconique {
constructor() {
super();
}
type() { return 'tete' }
match(item) { return Draconique.isTeteDragon(item) && Grammar.toLowerCaseNoAccent(item.name).includes('present des cites'); }
manualMessage() { return false }
async onActorCreateOwned(actor, tete) { await this._ajouterPresents(actor, tete); }
code() { return 'present-cites' }
tooltip(linkData) { return `La ${this.tmrLabel(linkData)} a un présent` }
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/gift.webp' }
tooltip(linkData) { return `La cité a un présent` }
img() { return 'systems/foundryvtt-reve-de-dragon/icons/tmr/present.svg' }
createSprite(pixiTMR) {
return pixiTMR.sprite(this.code(),
{
zIndex: tmrTokenZIndex.tetes,
alpha: 0.9,
taille: tmrConstants.third,
decallage: tmrConstants.topRight
decallage: pixiTMR.sizes.decallage(-1, -1),
taille: () => pixiTMR.sizes.third
});
}
@ -40,7 +35,7 @@ export class PresentCites extends Draconique {
else {
let cites = TMRUtility.filterTMR(it => it.type == 'cite');
for (let tmr of cites) {
await this.createCaseTmr(actor, 'Présent: ' + tmr.label, tmr, tete.id);
await this.createCaseTmr(actor, 'Présent', tmr, tete.id);
}
}
}