forked from public/foundryvtt-reve-de-dragon
Carte des TMR alternatives
Ajout d'une option pour choisir parmi les TMRs des 3 éditions
This commit is contained in:
@ -135,6 +135,7 @@ export class SystemReveDeDragon {
|
||||
RdDCalendrier.initSettings()
|
||||
SystemCompendiums.initSettings()
|
||||
DialogChronologie.initSettings()
|
||||
EffetsDraconiques.initSettings()
|
||||
RdDTMRDialog.initSettings()
|
||||
Environnement.initSettings()
|
||||
|
||||
|
@ -1,32 +1,3 @@
|
||||
// pixiTMR.animate(pixiApp => pixiApp.ticker.add((delta) => {
|
||||
// if (!sprite.waveAnimation) {
|
||||
// sprite.waveAnimation = {
|
||||
// originx: sprite.x,
|
||||
// movex: 0,
|
||||
// step: 0.03
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// if (Math.abs(sprite.waveAnimation.movex) > 2) {
|
||||
// sprite.waveAnimation.step = -sprite.waveAnimation.step
|
||||
// }
|
||||
// sprite.waveAnimation.movex += sprite.waveAnimation.step;
|
||||
// }
|
||||
// sprite.x = sprite.waveAnimation.originx + sprite.waveAnimation.movex
|
||||
// }));
|
||||
|
||||
// return pixiTMR.square(this.code(),
|
||||
// {
|
||||
// zIndex: tmrTokenZIndex.trounoir,
|
||||
// tint: tmrColors.trounoir,
|
||||
// alpha: 1,
|
||||
// taille: () => pixiTMR.sizes.full,
|
||||
// decallage: {
|
||||
// x: -pixiTMR.sizes.half,
|
||||
// y: -pixiTMR.sizes.half
|
||||
// }
|
||||
// })
|
||||
|
||||
export class TMRAnimations {
|
||||
|
||||
static withAnimation(sprite, pixiTMR, ...animations) {
|
||||
|
@ -1,16 +1,38 @@
|
||||
import { TMRUtility } from "../tmr-utility.js";
|
||||
import { SYSTEM_RDD } from "../constants.js";
|
||||
import { Draconique } from "./draconique.js";
|
||||
import { PixiTMR } from "./pixi-tmr.js";
|
||||
|
||||
const IMAGE_CARTE_TMR = 'image-carte-tmr';
|
||||
const TMR_V1 = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v1.webp";
|
||||
const TMR_V2 = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v2.webp";
|
||||
const TMR_V3_COULEUR = "systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr-v3-couleur.webp";
|
||||
|
||||
export class CarteTmr extends Draconique {
|
||||
|
||||
static initSettings() {
|
||||
game.settings.register(SYSTEM_RDD, IMAGE_CARTE_TMR,
|
||||
{
|
||||
name: 'Carte des TMR',
|
||||
hint: "Choix de l'image de la carte des TMR",
|
||||
scope: "world",
|
||||
config: true,
|
||||
choices: {
|
||||
[TMR_V3_COULEUR]: "TMR Scriptarium v3 couleur",
|
||||
[TMR_V2]: "TMR Multisim v2",
|
||||
[TMR_V1]: "TMR NEF v1",
|
||||
},
|
||||
default: TMR_V3_COULEUR,
|
||||
type: String
|
||||
})
|
||||
}
|
||||
|
||||
type() { return '' }
|
||||
match(item) { return false; }
|
||||
manualMessage() { return false }
|
||||
async onActorCreateOwned(actor, item) { }
|
||||
|
||||
code() { return 'tmr' }
|
||||
img() { return 'systems/foundryvtt-reve-de-dragon/styles/img/ui/tmr.webp' }
|
||||
img() { return game.settings.get(SYSTEM_RDD, IMAGE_CARTE_TMR) }
|
||||
|
||||
createSprite(pixiTMR) {
|
||||
const img = PixiTMR.getImgFromCode(this.code())
|
||||
|
@ -43,6 +43,9 @@ export class EffetsDraconiques {
|
||||
|
||||
static augmentationSeuil = new AugmentationSeuil();
|
||||
|
||||
static initSettings() {
|
||||
CarteTmr.initSettings()
|
||||
}
|
||||
static init() {
|
||||
Draconique.init();
|
||||
Draconique.register(EffetsDraconiques.carteTmr);
|
||||
|
@ -17,11 +17,11 @@ export class SortReserve extends Draconique {
|
||||
createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.sort,
|
||||
decallage: pixiTMR.sizes.decallage(-1, 0),
|
||||
taille: () => pixiTMR.sizes.third,
|
||||
decallage: pixiTMR.sizes.decallage(-0.6, 0),
|
||||
taille: () => pixiTMR.sizes.half,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
tokens(pixiTMR, linkData, coordTMR, type = undefined) {
|
||||
if (TMRUtility.getTMR(coordTMR()).type == 'fleuve') {
|
||||
const tooltip = this.tooltip(linkData)
|
||||
|
@ -19,8 +19,8 @@ export class TerreAttache extends Draconique {
|
||||
createSprite(pixiTMR) {
|
||||
return pixiTMR.sprite(this.code(), {
|
||||
zIndex: tmrTokenZIndex.tetes,
|
||||
decallage: pixiTMR.sizes.decallage(1, 1),
|
||||
taille: () => pixiTMR.sizes.third
|
||||
decallage: pixiTMR.sizes.decallage(0.8, 0.8),
|
||||
taille: () => pixiTMR.sizes.half
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user