forked from public/foundryvtt-reve-de-dragon
Réduction de l'espace des TMR
This commit is contained in:
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user