Compare commits

..

45 Commits
v13 ... v11

Author SHA1 Message Date
6b338314c4 Merge pull request 'Fix fatigue à la descente des TMR' (#760) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 2m14s
Reviewed-on: #760
2025-05-04 19:16:25 +02:00
6661805f6f Fix fatigue à la descente des TMR
La modification d'un activeEffect déclenche un render, qui
utilise les valeurs courante de l'actor.

Du coup, si l'update de l'actor est fait après:
- le render en cours utilise les anciennes valeurs
- comme un render est en cours, le nouveau render est ignoré

En faisant les changements d'active effect après ceux de l'actor,
l'affichage se fait correctement.,
2025-05-04 18:24:39 +02:00
29931fdcb5 Merge pull request 'Fix: sommeil avec double rêve' (#758) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: #758
2025-04-30 14:01:03 +02:00
ec24e4a7e7 Fix: sommeil avec double rêve 2025-04-27 17:51:50 +02:00
d1adf3f6c4 Merge pull request '12.0.49 - La deuxième lame d'Astrobazzarh' (#757) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 1m20s
Reviewed-on: #757
2025-04-24 16:46:35 +02:00
8eb1387be4 attaques à distance sans difficulté libre 2025-04-24 00:58:42 +02:00
85378d74e3 Fix parade des vieux boucliers 2025-04-24 00:43:32 +02:00
9471420d38 Fix défenses particulières 2025-04-23 22:01:29 +02:00
6e456ca92c Merge pull request '12.0.48 - La chèvre d'Astrobazzarh' (#756) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 2m2s
Reviewed-on: #756
2025-04-23 11:50:59 +02:00
482256c218 L'armure du Bandersnatch 2025-04-22 20:42:43 +02:00
fa1c4ff221 Correction: particulières sur carac dérivées 2025-04-22 20:42:21 +02:00
b777271657 Echec à la mise en réserve
Un échec au lancement de sort brise la concentration, la mise en
réserve présuppose le lancement du sort.
2025-04-22 20:41:49 +02:00
d06a55b615 Amélioration message lancement sort en réserve 2025-04-22 20:41:35 +02:00
adfbc11eb8 Consistance chèvre
La consistance chèvre est supportée (caractères accentués)
2025-04-22 20:41:31 +02:00
9dd905134b Correction sur les mise à jour en cascade + correction sur le force rendering après un changement de competence
All checks were successful
Release Creation / build (release) Successful in 2m25s
2025-04-06 23:15:10 +02:00
f32b6af7b6 Correction sur les mise à jour en cascade + correction sur le force rendering après un changement de competence 2025-04-06 23:13:59 +02:00
9b8a600e22 Merge pull request '## 12.0.46 - Le double demi d'Astrobazzarh' (#755) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 1m25s
Reviewed-on: #755
2025-03-18 20:48:20 +01:00
25db7e0712 Amélioration des fermetures de TMR
- un seul message lors de la fermeture au MJ et joueur
- le déclenchement de sort en réserve
2025-03-18 01:56:26 +01:00
776d4ce9ec correction des raffraîchissement lors du sommeil
On peut de nouveau dormir plusieurs heures
2025-03-18 01:50:00 +01:00
1de0806e37 Fix changelog 2025-03-16 00:20:48 +01:00
03366fdf26 Gestion armes naturelles sur defense
All checks were successful
Release Creation / build (release) Successful in 1m51s
2025-03-15 22:04:37 +01:00
14f324360d Merge pull request 'Fix: difficulté des médiations' (#754) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: #754
2025-03-15 20:32:20 +01:00
d60c9f1b28 Renommage révéler/masquer le demi-rêve 2025-03-15 17:18:41 +01:00
cf514470fd Fix: difficulté des médiations
La difficulté des méditations n'augmente plus en cas de réussite
et d'échec normal
2025-03-15 17:17:29 +01:00
b09b095897 Formatage changelog
All checks were successful
Release Creation / build (release) Successful in 1m53s
2025-03-05 08:26:37 +01:00
d81965155c Correction sur heures de repos 2025-03-05 08:25:00 +01:00
9fa8a2e6f3 Merge pull request '12.0.44 - Les errements d'Astrobazzarh, suite' (#753) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: #753
2025-03-05 08:24:13 +01:00
da7f87fd45 Changelog 12.0.44 2025-03-04 23:06:39 +01:00
6aba92900c Fix erreurs sorts variables
- correction de la sélection de la voie de draconique pour
  sort à voie variable
- en cas de sort avec un coût en rêve numérique, ce n'est pas variable
2025-03-04 23:01:04 +01:00
4939e5564e Fix possessions 2025-03-04 22:46:28 +01:00
40be65a94e Merge pull request 'v11 - sommeil' (#752) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
Reviewed-on: #752
2025-03-04 22:11:00 +01:00
633638a9ab Fix récupération sommeil
Les différentsq updates pouvaient ne pas être visibles lors du sommeil

En forçant un render 20ms après la fin des actions qui impliquent un
sommeil, les mises à jour sont correctes
2025-03-04 22:04:52 +01:00
88a3464eed Add command to run debug server 2025-03-04 21:32:21 +01:00
921e470498 Petit fixes de synchro + essai pour corriger message XP + roll
All checks were successful
Release Creation / build (release) Successful in 2m32s
2025-02-27 22:53:06 +01:00
0009876a6d Merge pull request '12.0.42' (#751) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 1m39s
Reviewed-on: #751
2025-02-10 07:58:31 +01:00
54785f0c3a Version 12.0.42 2025-02-10 01:54:25 +01:00
df76c4bd78 Corrections automatisations combat
Visiblement des changements sur les callbacks n'avaient pas
été finalisés
2025-02-10 01:54:25 +01:00
5f3c678195 Fix: jet de caractéristique/difficulté
Les jets avec difficulté ne fonctionnaient plus à cause des armes
 à 1 main / à 2 mains
2025-02-09 22:51:06 +01:00
89bbe63340 Merge pull request 'La loupe d'Astrobazzar' (#748) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 1m27s
Reviewed-on: #748
2025-02-09 00:30:52 +01:00
149990e352 Correction: diminution stress transformé 2025-02-07 21:29:50 +01:00
3e355784c7 Message d'expérience en sort
Adaptation du message d'xp en sort au renommage des voies draconiques
2025-02-07 20:47:20 +01:00
b92055d5dd Commande /tirer cachée
Pour les messages sans actor, la méthode getOwners ne marchait
pas. En cas d'absence d'acteur, les gmroll doivent être pour le
joueur courant et les MJs
2025-02-07 20:47:20 +01:00
220f8142f5 Merge pull request 'v11 Fix choix particulière' (#746) from VincentVk/foundryvtt-reve-de-dragon:v11 into v11
All checks were successful
Release Creation / build (release) Successful in 1m45s
Reviewed-on: #746
2025-02-06 10:42:25 +01:00
a8bb00ad0b Fix choix particulière 2025-02-05 22:56:24 +01:00
78e30b5503 Correction message min/max de race 2025-02-02 00:06:38 +01:00
164 changed files with 3107 additions and 5260 deletions

View File

@ -12,8 +12,6 @@ jobs:
#- uses: actions/checkout@v3
- uses: RouxAntoine/checkout@v3.5.4
with:
ref: 'v13'
# get part of the tag after the `v`
- name: Extract tag version number
@ -48,7 +46,7 @@ jobs:
apt update -y
apt install -y zip
- run: zip -r ./rddsystem.zip system.json template.json README.md LICENSE.txt assets/ css/ fonts/ icons lang/ module/ packs/ pic/ sounds/ styles/ templates/
- run: zip -r ./rddsystem.zip system.json template.json README.md LICENSE.txt assets/ fonts/ icons lang/ module/ packs/ pic/ sounds/ styles/ templates/
- name: setup go
uses: actions/setup-go@v3
@ -64,13 +62,13 @@ jobs:
system.json
api_key: '${{secrets.ALLOW_PUSH_RELEASE}}'
#- name: Publish to Foundry server
# uses: djlechuck/foundryvtt-publish-package-action@v1
# with:
# token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
# id: 'foundryvtt-reve-de-dragon'
# version: ${{github.event.release.tag_name}}
# manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
# notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v13/changelog.md'
# compatibility-minimum: '13'
# compatibility-verified: '13'
- name: Publish to Foundry server
uses: djlechuck/foundryvtt-publish-package-action@v1
with:
token: ${{ secrets.FOUNDRYVTT_RELEASE_TOKEN }}
id: 'foundryvtt-reve-de-dragon'
version: ${{github.event.release.tag_name}}
manifest: 'https://www.uberwald.me/gitea/${{gitea.repository}}/releases/download/${{github.event.release.tag_name}}/system.json'
notes: 'https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon/raw/branch/v11/changelog.md'
compatibility-minimum: '12'
compatibility-verified: '12'

0
.gitlab/.gitkeep Normal file
View File

View File

View File

@ -0,0 +1,14 @@
Pour que le bug soit traité, merci de préciser quelques détails.
### Environment
> Indiquez quelques éléments de votre installation
* Foundry VTT Version: (Example 0.5.4)
* OS: [Windows, MacOS, Linux (which distro)]
* Modules ?: Liste des modules utilisés
### Description du problème
/label ~Bug ~Nonrepro

View File

@ -0,0 +1,14 @@
### Résumé de la fonctionnalité
> Décrivez de manière simple et concise la fonction que vous voulez voir ajoutée.
### Expérience Utilisateur
> Indiquez ce que l'utilisateur aura comme bénéfice avec cette fonction.
### Priority/Importance
> Selon vous, quelle est l'importance de cette fonctionnalité.
/label ~Feature

View File

@ -1,9 +1,3 @@
# 13.0
## 13.0.0 - Le début de l'errance d'Illysis
- Migration vers la version 13 de Foundry
# 12.0
## 12.0.50 - Le sommeil d'Astrobazzarh
- Le don de double rêve n'interrompt plus le sommeil toutes les heures
@ -54,18 +48,22 @@
- Correction des jets `@roll[vue/-2]` qui tentaient de chercher une compétence -2 (à cause des armes à 1/2 mains)
## 12.0.41 - La loupe d'Astrobazzarh
- On peut de nouveau effectuer des tirages cachés
- Le stress transformé est bien diminué lorsqu'on met le stress dans une compétence
## 12.0.40 - Les mains d'Astrobazzarh
- correction des attaques particulières en combat
- correction de message sur les min/max liés aux modificateurs de races (s'applique uniquement sur la taille)
## 12.0.39 - Les mains d'Astrobazzarh
- les armes à 1 ou 2 mains fonctionnent dans les liens de jets de dés
- commande `/jet` pour poster une demande de jet de dés
## 12.0.38 - Les prévisions d'Astrobazzarh
- Correction de modifications de personnages qui ne s'affichaient pas:
- changements d'endurance/vie/fatigue, transformé, ...
- Migration des compétences "Ecriture" en "Écriture" dans les tâches, livres, oeuvres et méditations
@ -75,12 +73,14 @@
- utilisation de l'extension hbs pour tous les fichiers handlebars
## 12.0.37 - Les enchantements d'Astrobazzarh
- les potions ont un état, seules les potions liquides sont enchantables
- les lancements de sorts du jour sont conservés jusqu'à chateau dormant
- lorsqu'un joueur souhaite enchanter une potion, les sorts d'enchantements/purification/permanence doivent avoir été lancés auparavant
- on peut enchanter des gemmes exactement comme des potions
## 12.0.36 - L'alchimie d'Astrobazzarh
- Nouveautés
- ajout d'un bouton pour enchanter les potions
- standardisation des boutons d'actions sur les items
@ -95,9 +95,11 @@
- Corrections de descriptions pour proposer les jet de dés
## 12.0.35 - La Solution d'Astrobazzarh
- Fix problème d'initialisation des feuilles d'items
## 12.0.34 - la tête d'Astrobazzarh
- support de liens "jets de dés"
- on peut ajouter des liens "jet de dés" dans les journaux, descriptions, notes, maladresses, ...
- avec la syntaxe `@roll[...]` on peut ajouter le lien vers:
@ -112,21 +114,26 @@
- gestion des blocs secrets dans les descriptions
## 12.0.33 - la vieillesse d'Astrobazzarh
- retour de l'expérience pour les joueurs
- suppression du message "Pas de caractéristique" sur les jets d'odorat-goût
## 12.0.32 - les rêveries d'Astrobazzarh
- Ajout des Items Race pour gérer les ajustements liés aux races
## 12.0.31 - le mausolée d'Astrobazzarh
- Correction: les automatisation de combat jouer-MJ fonctionnentde nouveau
## 12.0.30 - le cauchemar d'Astrobazzarh
- calcul automatique du niveau des entités selon leur rêve
- la description des créatures venimeuses contient un lien vers leur venin
- Correction: les messages de combats ne marchaient plus (Changement combiné Foundry + rêve de Dragon)
## 12.0.29 - L'indexation d'Astrobazzarh
- les liens dans la descriptions des sorts pointent vers les sorts du compendium
- la description du chrasme contient le lien vers son venin plutôt qu'un tableau
@ -608,3 +615,4 @@ Vu qu'elles ne peuvent pas être utilisées, permet de savoir pourquoi
- correction des achats par le MJ sans acteur sélectionné
Cf branche v10 pour l'historique des versions 10

File diff suppressed because it is too large Load Diff

View File

@ -1,37 +0,0 @@
const gulp = require('gulp');
const less = require('gulp-less');
function onError(err) {
util.log(util.colors.red.bold('[ERROR LESS]:'),util.colors.bgRed(err.message));
this.emit('end');
};
/* ----------------------------------------- */
/* Compile LESS
/* ----------------------------------------- */
function compileLESS() {
return gulp.src("less/foundryvtt-reve-de-dragon.less")
.pipe(less()).on('error',console.log.bind(console))
.pipe(gulp.dest("./css"))
}
const css = gulp.series(compileLESS);
/* ----------------------------------------- */
/* Watch Updates
/* ----------------------------------------- */
const SIMPLE_LESS = ["less/*.less"];
function watchUpdates() {
gulp.watch(SIMPLE_LESS, css);
}
/* ----------------------------------------- */
/* Export Tasks
/* ----------------------------------------- */
exports.default = gulp.series(
gulp.parallel(css),
watchUpdates
);
exports.css = css;
exports.watchUpdates = watchUpdates;

View File

@ -1,45 +0,0 @@
:root {
/* =================== 2. DEBUGGING HIGHLIGHTERS ============ */
// --debug-background-color-red: #ff000054;
// --debug-background-color-blue: #1d00ff54;
// --debug-background-color-green: #54ff0054;
// --debug-box-shadow-red: inset 0 0 2px red;
// --debug-box-shadow-blue: inset 0 0 2px blue;
// --debug-box-shadow-green: inset 0 0 2px green;
/* =================== 3. some constants ============ */
--color-controls:rgba(0, 0, 0, 0.9);
--color-controls-light:hsla(0, 0%, 20%, 0.8);
--color-controls-hover:hsla(60, 100%, 75%, 0.7);
--color-control-border-hover:rgba(255, 128, 0, 0.8);
--color-gold: rgba(191, 149, 63, 0.8);
--gradient-gold: linear-gradient(30deg, rgba(191, 149, 63, 0.3), rgba(252, 246, 186, 0.3), rgba(179, 135, 40, 0.3), rgba(251, 245, 183, 0.3), rgba(170, 119, 28, 0.3));
--gradient-silver: linear-gradient(30deg, rgba(61, 55, 93, 0.3), rgba(178, 179, 196, 0.3), rgba(59, 62, 63, 0.6), rgba(206, 204, 199, 0.3), rgba(61, 46, 49, 0.3));
--gradient-green: linear-gradient(30deg, rgba(7, 76, 0, 0.3), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.1), rgba(66, 163, 65, 0.2), rgba(184, 226, 163, 0.3));
--gradient-red: linear-gradient(150deg, rgba(255, 0, 0, 0.3), rgba(255, 200, 128, 0.05),rgba(255, 200, 128, 0.1), rgba(255,10,0,0.3));
--gradient-violet: linear-gradient(150deg, rgba(100, 45, 124, 0.6), rgba(216, 157, 192, 0.3), rgba(177, 157, 216, 0.5), rgba(107, 62, 121, 0.3), rgba(100, 45, 124, 0.6));
--gradient-purple-black: linear-gradient(150deg, rgba(0, 0, 0, 0.7), rgba(100, 45, 124, 0.4), rgba(82, 17, 131, 0.3),rgba(100, 45, 124, 0.4), rgba(0, 0, 0, 0.7));
--gradient-silver-light: linear-gradient(30deg, rgba(61, 55, 93, 0.2), rgba(178, 179, 196, 0.1), rgba(59, 62, 63, 0.2), rgba(206, 204, 199, 0.1), rgba(61, 46, 49, 0.2));
--gradient-daylight: conic-gradient(
from 0deg,
hsla(50, 100%, 80%, 0.7),
hsla(30, 30%, 40%, 0.1) 25%,
hsla(250, 50%, 40%, 0.1) 25%,
hsla(250, 30%, 30%, 0.7) 50%,
hsla(250, 50%, 40%, 0.1) 75%,
hsla(30, 30%, 40%, 0.1) 75%,
hsla(50, 100%, 80%, 0.7)
);
--background-custom-button: linear-gradient(to bottom, rgba(33, 55, 74, 0.988) 5%, rgba(21, 40, 51, 0.671) 100%);
--background-custom-button-hover: linear-gradient(to bottom, rgb(128, 0, 0) 5%, rgb(62, 1, 1) 100%);
--background-control-selected: linear-gradient(to bottom, hsla(0, 100%, 25%, 0.5) 5%, hsla(0, 100%, 12%, 0.5) 100%);
--background-tooltip: hsla(60, 12%, 85%, 0.95);
--color-tooltip:hsla(282, 47%, 33%, 0.9);
--color-tooltip-faint:hsla(282, 47%, 66%, 0.5);
--background-error:hsla(16, 100%, 50%, 0.8);
--color-profile-border: hsla(0, 0%, 80%, 0.05);
}

View File

@ -1,84 +0,0 @@
/* ==================== (A) Fonts ==================== */
@font-face {
font-family: "GoudyAcc";
src: url('../fonts/goudyacc.ttf') format("truetype");
}
@font-face {
font-family: "MedievalSharp";
src: url('../fonts/MedievalSharp.ttf') format("truetype");
}
@font-face {
font-family: "GrenzeGotisch";
src: url('../fonts/GrenzeGotisch-Regular.ttf') format("truetype");
}
@font-face {
font-family: "Fondamento";
src: url('../fonts/Fondamento.ttf') format("truetype");
}
@font-face {
font-family: "CaslonAntique";
src: url('../fonts/CaslonAntique.ttf') format("truetype");
}
@font-face {
font-family: 'HeuresDraconiques';
src:
url('../fonts/heuresdraconiques2.woff') format('woff'),
url('../fonts/heuresdraconiques2.woff2') format('woff2'),
url('../fonts/heuresdraconiques2.ttf') format('truetype');
font-weight: normal;
font-style: normal;
}
:root {
/* =================== 1. ACTOR SHEET FONT STYLES =========== */
--window-header-title-font-family: CaslonAntique;
--window-header-title-font-size: 1.6rem;
--window-header-title-font-weight: normal;
--window-header-title-color: #f5f5f5;
--major-button-font-family: CaslonAntique;
--major-button-font-size: 1.4rem;
--major-button-font-weight: normal;
--major-button-color: #dadada;
--tab-header-font-family: CaslonAntique;
--tab-header-font-size: 1.2rem;
--tab-header-font-weight: 700;
--tab-header-color: #403f3e;
--tab-header-color-active: #4a0404;
--actor-input-font-family: CaslonAntique;
--actor-input-font-size: 1.2rem;
--actor-input-font-weight: 500;
--actor-input-color: black;
--actor-label-font-family: CaslonAntique;
--actor-label-font-size: 1.2rem;
--actor-label-font-weight: 700;
--actor-label-color: #464331c4;
}
/* Global styles & Font */
.window-app {
font-family: CaslonAntique;
text-align: justify;
font-size: 1rem;
letter-spacing: 1px;
}
/* Fonts */
.sheet header.sheet-header h1 input,
.window-app .window-header,
#actors .directory-list,
#navigation #scene-list .scene.nav-item {
font-family: "GoudyAcc"
}
/* For title, sidebar character and scene */
.sheet nav.sheet-tabs,
.window-app input,
.sheet header.sheet-header .header-compteurs,
.sheet header.sheet-header .flex-group-center.flex-fatigue,
select, .item-checkbox, #sidebar, #players, #navigation #nav-toggle {
font-family: "CaslonAntique"; /* For sheet parts; For nav and title */
}

File diff suppressed because it is too large Load Diff

View File

@ -1,10 +0,0 @@
.application.sheet.fvtt-rdd {
.sheet-common();
section.window-content{
padding: 0rem;
section header.sheet-header {
.sheet-header();
}
}
}

View File

@ -1,32 +0,0 @@
.sheet-common() {
.window-content{
font-family: CaslonAntique;
text-align: justify;
font-size: 1rem;
letter-spacing: 1px;
font-size: calc(var(--font-size-standard) * 1);
color: var(--color-dark-1);
background: var(--background-image-base) no-repeat;
background-size: 100% 100%;
}
}
.sheet-header() {
background: #011d33 url(../assets/ui/bg_header.webp) no-repeat left top;
color: rgba(255, 255, 255, 1);
:is(
input[type="text"],
input[type="number"],
input[type="password"],
input[type="datetime-local"],
input[type="date"],
input[type="time"]) {
color: rgba(255, 255, 255, 0.75);
background: rgba(255, 255, 255, 0.1);
border: 0 none;
margin-bottom: 0.2rem;
}
}

View File

@ -1795,8 +1795,10 @@ export class RdDActor extends RdDBaseActorSang {
};
RollDataAjustements.calcul(rollData, this);
await RdDResolutionTable.rollData(rollData);
this.gererExperience(rollData);
await RdDRollResult.displayRollData(rollData, this)
this.gererExperience(rollData);
return rollData.rolled;
}

View File

@ -14,11 +14,11 @@ import { ItemAction } from "../item/item-actions.js";
* Extend the basic ActorSheet with some very simple modifications
* @extends {ActorSheet}
*/
export class RdDBaseActorSheet extends foundry.appv1.sheets.ActorSheet {
export class RdDBaseActorSheet extends ActorSheet {
/** @override */
static get defaultOptions() {
return foundry.utils.mergeObject(foundry.appv1.sheets.ActorSheet.defaultOptions, {
return foundry.utils.mergeObject(ActorSheet.defaultOptions, {
classes: ["rdd", "sheet", "actor"],
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "carac" }],
dragDrop: [{ dragSelector: ".item-list .item", dropSelector: undefined }],

View File

@ -734,7 +734,7 @@ export class RdDBaseActor extends Actor {
name: this.getAlias(),
system: { description: this.system.description }
}
foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.hbs', chatData)
renderTemplate('systems/foundryvtt-reve-de-dragon/templates/post-actor.hbs', chatData)
.then(html => ChatMessage.create(RdDUtility.chatDataSetup(html, modeOverride)));
}

View File

@ -7,7 +7,7 @@ import { CATEGORIES_COMPETENCES, CATEGORIES_DRACONIC, Mapping } from "./mapping.
export class RdDActorExportSheet extends RdDActorSheet {
static init() {
foundry.applications.handlebars.loadTemplates([
loadTemplates([
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/arme.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessure.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/blessures.hbs",
@ -21,7 +21,7 @@ export class RdDActorExportSheet extends RdDActorSheet {
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/protection.hbs",
"systems/foundryvtt-reve-de-dragon/templates/actor/export-scriptarium/sort.hbs",
])
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
Actors.registerSheet(SYSTEM_RDD, RdDActorExportSheet, { types: ["personnage"], makeDefault: false, label: "Feuille simplifiée" })
}
static get defaultOptions() {

View File

@ -3,7 +3,7 @@ import { Misc } from "../../misc.js"
import { EXPORT_CSV_SCRIPTARIUM, OptionsAvancees } from "../../settings/options-avancees.js"
import { Mapping } from "./mapping.js"
const IMG_SCRIPTARIUM = '<img class="context-menu-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/scriptarium.svg">'
const IMG_SCRIPTARIUM = '<img class="context-menu-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/scriptarium.svg">'
export class ExportScriptarium {

View File

@ -26,7 +26,7 @@ const RANDOM_VALUES = {
export class AppPersonnageAleatoire extends FormApplication {
static preloadHandlebars() {
foundry.applications.handlebars.loadTemplates([
loadTemplates([
'systems/foundryvtt-reve-de-dragon/templates/actor/random/champ-aleatoire.hbs',
])
}

View File

@ -1,5 +0,0 @@
export { default as RdDItemBaseSheet} from "./common-item-sheet.mjs"
export { default as RdDMonnaieSheet } from "./monnaie-sheet.mjs"
export { default as RdDMunitionSheet } from "./munition-sheet.mjs"
export { default as RdDTarotSheet } from "./tarot-sheet.mjs"

View File

@ -1,111 +0,0 @@
const { HandlebarsApplicationMixin } = foundry.applications.api
import { SYSTEM_RDD } from "../../constants.js"
import { Misc } from "../../misc.js"
import { RdDSheetUtility } from "../../rdd-sheet-utility.js";
export default class RdDItemBaseSheet extends HandlebarsApplicationMixin(foundry.applications.sheets.ItemSheetV2) {
static preloadHandlebars(...templatesList) {
const handlebars = ["systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/header.hbs"]
templatesList.forEach(templates =>
templates.forEach(t =>
t.handlebars().forEach(h => handlebars.push(h))
)
)
loadTemplates(Misc.distinct(handlebars))
}
static register(sheetClass) {
const itemType = sheetClass.ITEM_TYPE
Items.registerSheet(SYSTEM_RDD, sheetClass, {
label: Misc.typeName('Item', itemType),
types: [itemType],
makeDefault: true
})
}
static registerAll(...sheetClasses) {
const handlebars = ["systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/header.hbs"]
sheetClasses.forEach(sheetClass => {
sheetClass.TEMPLATES.forEach(t =>
t.handlebars().forEach(h => handlebars.push(h))
)
const itemType = sheetClass.ITEM_TYPE
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, sheetClass, {
label: Misc.typeName('Item', itemType),
types: [itemType],
makeDefault: true
})
})
foundry.applications.handlebars.loadTemplates(Misc.distinct(handlebars))
}
static get ITEM_TYPE() { return undefined }
constructor(options = {}) {
super(options)
}
static get TEMPLATES() { return [] }
/** @override */
static DEFAULT_OPTIONS = {
classes: ["fvtt-rdd", "item"],
position: {
width: 600,
height: "auto",
},
form: {
submitOnChange: true,
},
window: {
resizable: true,
},
actions: {
editImage: RdDItemBaseSheet.#onEditImage,
}
}
/** @override */
async _prepareContext() {
return {
item: this.document,
options: RdDSheetUtility.getOptions(this.document, this.isEditable),
fields: this.document.schema.fields,
systemFields: this.document.system.schema.fields,
system: this.document.system,
source: this.document.toObject(),
isEditable: this.isEditable,
}
}
// #region Actions
/**
* Handle changing a Document's image.
*
* @this RdDItemBaseSheet
* @param {PointerEvent} event The originating click event
* @param {HTMLElement} target The capturing HTML element which defined a [data-action]
* @returns {Promise}
* @private
*/
static async #onEditImage(event, target) {
const attr = target.dataset.edit
const current = foundry.utils.getProperty(this.document, attr)
const { img } = this.document.constructor.getDefaultArtwork?.(this.document.toObject()) ?? {}
const fp = new FilePicker({
current,
type: "image",
redirectToRoot: img ? [img] : [],
callback: (path) => {
this.document.update({ [attr]: path })
},
top: this.position.top + 40,
left: this.position.left + 10,
})
return fp.browse()
}
// #endregion
}

View File

@ -1,35 +0,0 @@
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
import { ITEM_TYPES } from "../../constants.js";
import RdDItemBaseSheet from "./common-item-sheet.mjs";
export default class RdDMonnaieSheet extends RdDItemBaseSheet {
/** @override */
static get ITEM_TYPE() { return ITEM_TYPES.monnaie }
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE] }
/** @override */
static DEFAULT_OPTIONS = Object.assign({},
RdDItemBaseSheet.DEFAULT_OPTIONS,
{
classes: ["fvtt-rdd", "item", "monnaie"],
position: { width: 400 },
window: { contentClasses: ["monnaie-content"] }
})
/** @override */
static PARTS = {
main: {
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/monnaie.hbs",
},
}
/** @override */
async _prepareContext() {
return Object.assign(
await super._prepareContext(),
await TEMPLATE_DESCRIPTION.prepareContext(this.document),
await TEMPLATE_INVENTAIRE.prepareContext(this.document)
)
}
}

View File

@ -1,34 +0,0 @@
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
import { ITEM_TYPES } from "../../constants.js";
import RdDItemBaseSheet from "./common-item-sheet.mjs";
export default class RdDMunitionSheet extends RdDItemBaseSheet {
/** @override */
static get ITEM_TYPE() { return ITEM_TYPES.munition }
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE] }
/** @override */
static DEFAULT_OPTIONS = Object.assign({},
RdDItemBaseSheet.DEFAULT_OPTIONS,
{
classes: ["fvtt-rdd", "item", "munition"],
position: { width: 400 },
window: { contentClasses: ["munition-content"] }
})
/** @override */
static PARTS = {
main: {
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/munition.hbs",
},
}
/** @override */
async _prepareContext() {
return Object.assign(
await super._prepareContext(),
await TEMPLATE_DESCRIPTION.prepareContext(this.document),
await TEMPLATE_INVENTAIRE.prepareContext(this.document)
)
}
}

View File

@ -1,33 +0,0 @@
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../../common/_module.mjs";
import { ITEM_TYPES } from "../../constants.js";
import RdDItemBaseSheet from "./common-item-sheet.mjs";
export default class RdDTarotSheet extends RdDItemBaseSheet {
/** @override */
static get ITEM_TYPE() { return ITEM_TYPES.tarot }
static get TEMPLATES() { return [TEMPLATE_DESCRIPTION] }
/** @override */
static DEFAULT_OPTIONS = Object.assign({},
RdDItemBaseSheet.DEFAULT_OPTIONS,
{
classes: ["fvtt-rdd", "item", "tarot"],
position: { width: 400 },
window: { contentClasses: ["tarot-content"] }
})
/** @override */
static PARTS = {
main: {
template: "systems/foundryvtt-reve-de-dragon/templates/sheets/item/tarot.hbs",
},
}
/** @override */
async _prepareContext() {
return Object.assign(
await super._prepareContext(),
await TEMPLATE_DESCRIPTION.prepareContext(this.document)
)
}
}

View File

@ -13,7 +13,7 @@ const TEXT_ROLL_MANAGERS = [
export class RdDTextEditor {
static registerChatCallbacks(html) {
$(html).on("click", '.roll-text', async event => await RdDTextEditor.rollText(event))
html.on("click", '.roll-text', async event => await RdDTextEditor.rollText(event))
}
static async enrichHTML(text, object, options = {showlink:true}) {
@ -30,7 +30,7 @@ export class RdDTextEditor {
context.text = await manager.onReplaceRoll(context);
}
return await foundry.applications.ux.TextEditor.implementation.enrichHTML(context.text, {
return await TextEditor.enrichHTML(context.text, {
relativeTo: object,
secrets: object?.isOwner,
async: true

View File

@ -10,7 +10,7 @@ import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
export class ChatUtility {
static async init() {
Hooks.on("renderChatMessageHTML", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
Hooks.on("renderChatMessage", async (app, html, msg) => await ChatUtility.onRenderChatMessage(app, html, msg))
Hooks.on("createChatMessage", async (chatMessage, options, id) => await ChatUtility.onCreateChatMessage(chatMessage, options, id))
}
@ -190,8 +190,8 @@ export class ChatUtility {
if (rddTimestamp) {
const timestamp = new RdDTimestamp(rddTimestamp);
const timestampData = timestamp.toCalendrier();
const dateHeure = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
$(html).find('header.message-header .message-sender').after(dateHeure)
const dateHeure = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/common/date-heure.hbs', timestampData);
html.find('header.message-header .message-sender').after(dateHeure)
}
}

View File

@ -5,13 +5,13 @@ const INFO_COEUR = 'info-coeur';
export class RdDCoeur {
static registerChatCallbacks(html) {
$(html).on("click", 'a.accepter-tendre-moment', event => {
html.on("click", 'a.accepter-tendre-moment', event => {
RdDCoeur.accepterTendreMoment(RdDCoeur.extractInfoCoeur(event))
})
$(html).on("click", 'a.refuser-tendre-moment', event => {
html.on("click", 'a.refuser-tendre-moment', event => {
RdDCoeur.refuserTendreMoment(RdDCoeur.extractInfoCoeur(event))
})
$(html).on("click", 'a.perdre-point-coeur-douceur', event => {
html.on("click", 'a.perdre-point-coeur-douceur', event => {
RdDCoeur.perdreEnDouceur(
RdDCoeur.extractInfoCoeur(event),
event.currentTarget.attributes['data-actor-id'].value)

View File

@ -1,8 +0,0 @@
import { CommonDescription } from "./description.mjs";
import { CommonInventaire } from "./inventaire.mjs";
export const TEMPLATE_DESCRIPTION = new CommonDescription()
export const TEMPLATE_INVENTAIRE = new CommonInventaire()
export const ALL_COMMON_TEMPLATES = [TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE]

View File

@ -1,10 +0,0 @@
/**
* class describing common methods implemented by template parts,
* used for sheet/models/documents
*/
export default class CommonTemplate {
fields() { }
handlebars() { return [] }
actions() { return {} }
async prepareContext(item) { }
}

View File

@ -1,32 +0,0 @@
import { RdDTextEditor } from "../apps/rdd-text-roll-editor.js"
import CommonTemplate from "./common-template.mjs"
import { HTMLSTRING } from "./field-types.mjs"
const fields = foundry.data.fields
export class CommonDescription extends CommonTemplate {
fields() {
return {
description: new fields.HTMLField({ ...HTMLSTRING }),
descriptionmj: new fields.HTMLField({ gmOnly: true, ...HTMLSTRING })
}
}
handlebars() {
return [
"systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/template-description.hbs",
]
}
actions() {
return {}
}
async prepareContext(item) {
const enriched = {
description: await RdDTextEditor.enrichHTML(item.system.description, item),
descriptionmj: await RdDTextEditor.enrichHTML(item.system.descriptionmj, item),
}
return { enriched }
}
}

View File

@ -1,9 +0,0 @@
export const INTEGER = { required: true, nullable: false, min: 0, integer: true }
export const DECIMAL = { required: true, nullable: false, min: 0, integer: false } /* TODO: validation de nombre décimales?*/
export const INTEGER_SIGNED = { required: true, nullable: false, integer: true }
export const DECIMAL_SIGNED = { required: true, nullable: false, integer: false }
export const STRING = { required: true, nullable: false, blank: true, trim: true }
export const HTMLSTRING = { initial: "", required: true, nullable: false, blank: true, textSearch: true }
export const MODEL_ARRAY = { initial: [], required: true, nullable: false }

View File

@ -1,36 +0,0 @@
import CommonTemplate from "./common-template.mjs"
import { RARETES } from "../item/raretes.js"
import { DECIMAL, INTEGER, INTEGER_SIGNED, MODEL_ARRAY, STRING } from "./field-types.mjs"
const fields = foundry.data.fields
export class CommonInventaire extends CommonTemplate {
fields() {
return {
encombrement: new fields.NumberField({ label: "Encombrement", initial: 0, ...INTEGER }),
quantite: new fields.NumberField({ label: "Quantité", initial: 1, ...INTEGER }),
qualite: new fields.NumberField({ label: "Qualité", initial: 0, ...INTEGER_SIGNED }),
cout: new fields.NumberField({ label: "Coût", initial: 0.0, ...DECIMAL }),
environnement: new fields.ArrayField(
new fields.SchemaField({
milieu: new fields.StringField({ label: "Milieu", initial: "", ...STRING }),
rarete: new fields.StringField({
label: "Rareté", initial: RARETES[0].code, ...STRING,
validate: (value, options) => RARETES.find(it => it.code == value)
}),
frequence: new fields.NumberField({ label: "Fréquence", initial: RARETES[0].frequence, ...INTEGER }),
}),
{ label: "Environnement", ...MODEL_ARRAY }),
}
}
handlebars() {
return [
"systems/foundryvtt-reve-de-dragon/templates/sheets/item/common/template-inventaire.hbs"
]
}
async prepareContext(item) {
return {}
}
}

View File

@ -1,3 +0,0 @@
export { default as RdDModelMonnaie } from "./monnaie.mjs"
export { default as RdDModelMunition } from "./munition.mjs"
export { default as RdDModelTarot } from "./tarot.mjs"

View File

@ -1,7 +0,0 @@
import { RdDItem } from "../item.js";
export default class RdDItemMonnaie extends RdDItem {
static get defaultIcon() {
return 'systems/foundryvtt-reve-de-dragon/icons/objets/piece_etain_poisson.webp'
}
}

View File

@ -1,7 +0,0 @@
import { RdDItem } from "../item.js";
export default class RdDItemMunition extends RdDItem {
static get defaultIcon() {
return 'systems/foundryvtt-reve-de-dragon/icons/objets/fleche.webp'
}
}

View File

@ -1,7 +0,0 @@
import { RdDItem } from "../item.js";
export default class RdDItemTarot extends RdDItem {
static get defaultIcon() {
return 'systems/foundryvtt-reve-de-dragon/icons/objets/tarot.webp'
}
}

View File

@ -14,11 +14,12 @@ import { RdDItem } from "./item.js";
import { FLEUVE_COORD, TMRUtility } from "./tmr-utility.js";
import { RdDTextEditor } from "./apps/rdd-text-roll-editor.js";
import { ItemAction } from "./item/item-actions.js";
import { RdDItemGemme } from "./item/gemme.js";
/**
* Extend the basic ItemSheet for RdD specific items
*/
export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
export class RdDItemSheet extends ItemSheet {
static get ITEM_TYPE() {
return undefined
@ -31,7 +32,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
}
static register(sheetClass) {
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, sheetClass, {
Items.registerSheet(SYSTEM_RDD, sheetClass, {
label: Misc.typeName('Item', sheetClass.ITEM_TYPE),
types: [sheetClass.ITEM_TYPE],
makeDefault: true
@ -42,7 +43,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
static get defaultOptions() {
return foundry.utils.mergeObject(super.defaultOptions, {
classes: [SYSTEM_RDD, "sheet", "item"],
template: RdDItemSheetV1.defaultTemplate(RdDItemSheetV1.ITEM_TYPE),
template: RdDItemSheet.defaultTemplate(RdDItemSheet.ITEM_TYPE),
width: 550,
height: 550
}, { inplace: false });
@ -50,7 +51,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
/* -------------------------------------------- */
get template() {
return RdDItemSheetV1.defaultTemplate(this.item.type);
return RdDItemSheet.defaultTemplate(this.item.type);
}
get title() {
@ -100,7 +101,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
description: await RdDTextEditor.enrichHTML(this.item.system.description, this.item),
descriptionmj: await RdDTextEditor.enrichHTML(this.item.system.descriptionmj, this.item),
isComestible: this.item.getUtilisationCuisine(),
options: RdDSheetUtility.mergeDocumentRights({}, this.item, this.isEditable),
options: RdDSheetUtility.mergeDocumentRights(this.options, this.item, this.isEditable),
competences: await SystemCompendiums.getCompetences(ACTOR_TYPES.personnage),
categories: RdDItem.getCategories(this.item.type),
}
@ -263,7 +264,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
_updateObject(event, formData) {
switch (this.item.type) {
case ITEM_TYPES.sort:
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheetV1._listCaseTmr(
formData['system.bonuscase'] = RdDItemSort.bonuscasesToString(RdDItemSheet._listCaseTmr(
formData.caseTmrCoord,
formData.caseTmrBonus,
formData.caseTmrAdd
@ -313,7 +314,7 @@ export class RdDItemSheetV1 extends foundry.appv1.sheets.ItemSheet {
async _onDrop(event) {
// Try to extract the dragData
let dragData = RdDItemSheetV1.$extractDragData(event);
let dragData = RdDItemSheet.$extractDragData(event);
if (!dragData) return false;
const allowed = Hooks.call("dropActorSheetData", this.actor, this, dragData);
if (allowed === false) return false;

View File

@ -1,14 +1,14 @@
import { HtmlUtility } from "../html-utility.js";
import { RdDItemSheetV1 } from "../item-sheet.js";
import { RdDItemSheet } from "../item-sheet.js";
import { Misc } from "../misc.js";
import { RdDRaretes } from "./raretes.js";
const TYPE_ITEMS_NATURELS = ["faune", "herbe", "plante", "ingredient"];
export class RdDItemInventaireSheet extends RdDItemSheetV1 {
export class RdDItemInventaireSheet extends RdDItemSheet {
static get defaultOptions() {
return foundry.utils.mergeObject(RdDItemSheetV1.defaultOptions, {
return foundry.utils.mergeObject(RdDItemSheet.defaultOptions, {
tabs: [{ navSelector: ".sheet-tabs", contentSelector: ".sheet-body", initial: "informations" }]
}, { inplace: false })
}

View File

@ -1,6 +1,6 @@
import { RdDItemSheetV1 } from "../item-sheet.js";
import { RdDItemSheet } from "../item-sheet.js";
export class RdDBlessureItemSheet extends RdDItemSheetV1 {
export class RdDBlessureItemSheet extends RdDItemSheet {
static get ITEM_TYPE() { return "blessure" };

View File

@ -9,7 +9,7 @@ export class RdDFauneItemSheet extends RdDItemInventaireSheet {
if (!this.options.editable) return;
$(html).find("a.linked-actor-delete").click(async event => await this.onDeleteLinkedActor());
html.find("a.linked-actor-delete").click(async event => await this.onDeleteLinkedActor());
}
async _onDropActor(event, dragData) {

View File

@ -1,7 +1,7 @@
import { RdDRencontre } from "./rencontre.js";
import { RdDItemSheetV1 } from "../item-sheet.js";
import { RdDItemSheet } from "../item-sheet.js";
export class RdDRencontreItemSheet extends RdDItemSheetV1 {
export class RdDRencontreItemSheet extends RdDItemSheet {
static get ITEM_TYPE() { return "rencontre" };

View File

@ -1,6 +1,6 @@
import { RdDItemSheetV1 } from "../item-sheet.js";
import { RdDItemSheet } from "../item-sheet.js";
export class RdDServiceItemSheet extends RdDItemSheetV1 {
export class RdDServiceItemSheet extends RdDItemSheet {
static get ITEM_TYPE() { return "service" };

View File

@ -1,12 +1,12 @@
import { RdDItemSheetV1 } from "../item-sheet.js";
import { RdDItemSheet } from "../item-sheet.js";
import { RdDItemSigneDraconique } from "./signedraconique.js";
import { TMRUtility } from "../tmr-utility.js";
/**
* Item sheet pour signes draconiques
* @extends {RdDItemSheetV1}
* @extends {RdDItemSheet}
*/
export class RdDSigneDraconiqueItemSheet extends RdDItemSheetV1 {
export class RdDSigneDraconiqueItemSheet extends RdDItemSheet {
static get ITEM_TYPE() { return "signedraconique" }
@ -36,9 +36,9 @@ export class RdDSigneDraconiqueItemSheet extends RdDItemSheetV1 {
if (!this.options.editable) return;
$(html).find(".signe-aleatoire").click(async event => await this.setSigneAleatoire());
$(html).find("input.select-tmr").change(async event => await this.onSelectTmr(event));
$(html).find(".signe-xp-sort").change(async event => await this.onValeurXpSort(event.currentTarget.attributes['data-typereussite']?.value, Number(event.currentTarget.value)));
html.find(".signe-aleatoire").click(async event => await this.setSigneAleatoire());
html.find("input.select-tmr").change(async event => await this.onSelectTmr(event));
html.find(".signe-xp-sort").change(async event => await this.onValeurXpSort(event.currentTarget.attributes['data-typereussite']?.value, Number(event.currentTarget.value)));
}
async setSigneAleatoire() {

View File

@ -3,10 +3,10 @@ import { SYSTEM_RDD } from "../constants.js";
import { Misc } from "../misc.js";
export class RdDJournalSheet extends foundry.appv1.sheets.JournalTextPageSheet {
export class RdDJournalSheet extends JournalTextPageSheet {
static register() {
foundry.applications.apps.DocumentSheetConfig.unregisterSheet(JournalEntryPage, "core", foundry.appv1.sheets.JournalTextPageSheet)
foundry.applications.apps.DocumentSheetConfig.registerSheet(JournalEntryPage,
DocumentSheetConfig.unregisterSheet(JournalEntryPage, "core", JournalTextPageSheet)
DocumentSheetConfig.registerSheet(JournalEntryPage,
SYSTEM_RDD,
RdDJournalSheet, {
types: ["text"],

View File

@ -265,7 +265,7 @@ export class Misc {
const subset = elements.filter(options.preFilter)
.filter(it => Grammar.toLowerCaseNoAccent(options.mapper(it))?.includes(value))
.sort(Misc.ascending(it => options.mapper(it)))
if (subset.length == 0) {
if (subset.length == 0 && options?.onMessage) {
options.onMessage(`Pas de ${options.description} correspondant à ${value}`);
}
return subset;

View File

@ -1,3 +0,0 @@
export { default as RdDModelMonnaie } from "./monnaie.mjs"
export { default as RdDModelMunition } from "./munition.mjs"
export { default as RdDModelTarot } from "./tarot.mjs"

View File

@ -1,10 +0,0 @@
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../common/_module.mjs";
export default class RdDModelMonnaie extends foundry.abstract.TypeDataModel {
static defineSchema() {
return Object.assign({},
TEMPLATE_DESCRIPTION.fields(),
TEMPLATE_INVENTAIRE.fields()
)
}
}

View File

@ -1,10 +0,0 @@
import { TEMPLATE_DESCRIPTION, TEMPLATE_INVENTAIRE } from "../common/_module.mjs";
export default class RdDModelMunition extends foundry.abstract.TypeDataModel {
static defineSchema() {
return Object.assign({},
TEMPLATE_DESCRIPTION.fields(),
TEMPLATE_INVENTAIRE.fields()
)
}
}

View File

@ -1,18 +0,0 @@
import { TEMPLATE_DESCRIPTION } from "../common/_module.mjs";
import { DECIMAL, INTEGER, INTEGER_SIGNED, MODEL_ARRAY, STRING } from "../common/field-types.mjs"
const fields = foundry.data.fields
export default class RdDModelTarot extends foundry.abstract.TypeDataModel {
static defineSchema() {
let tarotFields = {
concept : new fields.StringField({ label: "Concept", initial: "", ...STRING }),
aspect : new fields.StringField({ label: "Aspect", initial: "", ...STRING }),
frequence : new fields.NumberField({ label: "Fréquence", initial: 1, ...INTEGER })
}
return Object.assign({},
TEMPLATE_DESCRIPTION.fields(),
tarotFields
)
}
}

View File

@ -483,7 +483,7 @@ export class RdDCombat {
'.appel-destinee-attaque',
'.echec-total-attaque',
]) {
$(html).on("click", button, event => {
html.on("click", button, event => {
const rddCombat = RdDCombat.rddCombatForAttackerAndDefender(
event.currentTarget.attributes['data-attackerId']?.value,
event.currentTarget.attributes['data-attackerTokenId']?.value,
@ -494,7 +494,7 @@ export class RdDCombat {
}
});
}
$(html).on("click", 'a.chat-jet-vie', event => {
html.on("click", 'a.chat-jet-vie', event => {
event.preventDefault();
RdDCombat._callJetDeVie(event);
});

View File

@ -9,7 +9,7 @@ export class RdDCompendiumOrganiser {
console.log('onRenderCompendium', compendium, html, compendiumData);
const pack = compendium.collection
if (pack.metadata.system === SYSTEM_RDD) {
$(html).find('.directory-item').each((i, element) => {
html.find('.directory-item').each((i, element) => {
RdDCompendiumOrganiser.setEntityTypeName(pack, element);
});
}

View File

@ -12,7 +12,7 @@ const imgHeures = [1, 2, 3, 4, 5, 6, 7, 9, 9, 10, 11, 12].map(heure => {
const imgSigneDragon = imgHeures[4]
/** De pour les jets de rencontre */
export class DeTMR extends foundry.dice.terms.Die {
export class DeTMR extends Die {
/** @override */
static DENOMINATION = "t";
@ -50,7 +50,7 @@ export class DeTMR extends foundry.dice.terms.Die {
}
/** DeDraconique pour le D8 sans limite avec 8=>0 */
export class DeDraconique extends foundry.dice.terms.Die {
export class DeDraconique extends Die {
/** @override */
static DENOMINATION = "r";
@ -89,7 +89,7 @@ export class DeDraconique extends foundry.dice.terms.Die {
}
/** De 12 avec les heures */
export class DeHeure extends foundry.dice.terms.Die {
export class DeHeure extends Die {
/** @override */
static DENOMINATION = "h";

View File

@ -15,36 +15,36 @@ export class RdDEmpoignade {
/* -------------------------------------------- */
static registerChatCallbacks(html) {
$(html).on("click", '.defense-empoignade-cac', event => {
html.on("click", '.defense-empoignade-cac', event => {
const chatMessage = ChatUtility.getChatMessage(event);
const rollData = RdDEmpoignade.$readRollEmpoignade(chatMessage);
let defenseMode = event.currentTarget.attributes['data-defense-mode'].value
RdDEmpoignade.onDefenseEmpoignade(rollData, defenseMode, "Corps à corps", "melee")
});
$(html).on("click", '.defense-empoignade-esquive', event => {
html.on("click", '.defense-empoignade-esquive', event => {
const chatMessage = ChatUtility.getChatMessage(event);
const rollData = RdDEmpoignade.$readRollEmpoignade(chatMessage);
let defenseMode = event.currentTarget.attributes['data-defense-mode'].value
RdDEmpoignade.onDefenseEmpoignade(rollData, defenseMode, "Esquive", "derobee")
});
$(html).on("click", '.empoignade-poursuivre', event => {
html.on("click", '.empoignade-poursuivre', event => {
let attackerId = event.currentTarget.attributes['data-attackerId'].value
let defenderId = event.currentTarget.attributes['data-defenderId'].value
RdDEmpoignade.onAttaqueEmpoignadeValidee(game.actors.get(attackerId), game.actors.get(defenderId))
});
$(html).on("click", '.empoignade-entrainer-sol', event => {
html.on("click", '.empoignade-entrainer-sol', event => {
const chatMessage = ChatUtility.getChatMessage(event);
const rollData = RdDEmpoignade.$readRollEmpoignade(chatMessage);
RdDEmpoignade.entrainerAuSol(rollData)
ChatUtility.removeChatMessageId(chatMessage.id)
});
$(html).on("click", '.empoignade-projeter-sol', event => {
html.on("click", '.empoignade-projeter-sol', event => {
const chatMessage = ChatUtility.getChatMessage(event);
const rollData = RdDEmpoignade.$readRollEmpoignade(chatMessage);
RdDEmpoignade.projeterAuSol(rollData)
ChatUtility.removeChatMessageId(chatMessage.id)
});
$(html).on("change", '.empoignade-perte-endurance', event => {
html.on("change", '.empoignade-perte-endurance', event => {
const chatMessage = ChatUtility.getChatMessage(event);
const rollData = RdDEmpoignade.$readRollEmpoignade(chatMessage);
if (event.currentTarget.value && event.currentTarget.value != "none") {

View File

@ -54,7 +54,7 @@ import { RdDItemSouffle } from "./item/souffle.js"
import { RdDRencontre } from "./item/rencontre.js"
import { RdDItemSheetV1 } from "./item-sheet.js"
import { RdDItemSheet } from "./item-sheet.js"
import { RdDBlessureItemSheet } from "./item/sheet-blessure.js"
import { RdDServiceItemSheet } from "./item/sheet-service.js"
import { RdDRencontreItemSheet } from "./item/sheet-rencontre.js"
@ -80,10 +80,6 @@ import { RdDItemPotion } from "./item/potion.js"
import { RdDItemGemme } from "./item/gemme.js"
import { RdDGemmeItemSheet } from "./item/sheet-gemme.js"
import * as models from "./models/_module.mjs"
import * as items from "./documents/_module.mjs"
import * as sheets from "./applications/sheets/_module.mjs"
/**
* RdD system
* Author: LeRatierBretonnien
@ -104,9 +100,6 @@ export class SystemReveDeDragon {
this.RdDHotbar = RdDHotbar
this.RdDStatBlockParser = RdDStatBlockParser
this.itemClasses = {
monnaie: items.RdDItemMonnaie,
munition: items.RdDItemMunition,
tarot: items.RdDModelTarot,
armure: RdDItemArmure,
blessure: RdDItemBlessure,
gemme: RdDItemGemme,
@ -136,9 +129,6 @@ export class SystemReveDeDragon {
/* -------------------------------------------- */
onInit() {
game.system.rdd = this
globalThis.RdD = game.system
this.AppAstrologie = AppAstrologie
console.log(`Initializing Reve de Dragon System Settings`)
@ -185,11 +175,6 @@ export class SystemReveDeDragon {
console.log(`Initializing Reve de Dragon Documents`)
CONFIG.Actor.documentClass = RdDBaseActor
CONFIG.Item.documentClass = RdDItem
CONFIG.Item.dataModels = {
monnaie: models.RdDModelMonnaie,
munition: models.RdDModelMunition,
tarot: models.RdDModelTarot,
}
CONFIG.RDD = {
resolutionTable: RdDResolutionTable.resolutionTable,
carac_array: RdDUtility.getCaracArray(),
@ -199,51 +184,45 @@ export class SystemReveDeDragon {
/* -------------------------------------------- */
// Register sheet application classes
foundry.documents.collections.Actors.unregisterSheet("core", foundry.appv1.sheets.ActorSheet)
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDCommerceSheet, { types: ["commerce"], makeDefault: true })
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorSheet, { types: ["personnage"], makeDefault: true })
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDCreatureSheet, { types: ["creature"], makeDefault: true })
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorVehiculeSheet, { types: ["vehicule"], makeDefault: true })
foundry.documents.collections.Actors.registerSheet(SYSTEM_RDD, RdDActorEntiteSheet, { types: ["entite"], makeDefault: true })
foundry.documents.collections.Items.unregisterSheet("core", foundry.appv1.sheets.ItemSheet)
Actors.unregisterSheet("core", ActorSheet)
Actors.registerSheet(SYSTEM_RDD, RdDCommerceSheet, { types: ["commerce"], makeDefault: true })
Actors.registerSheet(SYSTEM_RDD, RdDActorSheet, { types: ["personnage"], makeDefault: true })
Actors.registerSheet(SYSTEM_RDD, RdDCreatureSheet, { types: ["creature"], makeDefault: true })
Actors.registerSheet(SYSTEM_RDD, RdDActorVehiculeSheet, { types: ["vehicule"], makeDefault: true })
Actors.registerSheet(SYSTEM_RDD, RdDActorEntiteSheet, { types: ["entite"], makeDefault: true })
Items.unregisterSheet("core", ItemSheet)
RdDActorExportSheet.init()
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
Items.registerSheet(SYSTEM_RDD, RdDItemInventaireSheet, {
types: [
"objet", "arme", "armure", "livre", "nourritureboisson",
"objet", "arme", "armure", "livre", "munition",
"monnaie", "nourritureboisson",
],
makeDefault: true
})
sheets.RdDItemBaseSheet.registerAll(
sheets.RdDMonnaieSheet,
sheets.RdDMunitionSheet,
sheets.RdDTarotSheet
)
foundry.documents.collections.Items.registerSheet(SYSTEM_RDD, RdDItemSheetV1, {
Items.registerSheet(SYSTEM_RDD, RdDItemSheet, {
types: [
"competence", "competencecreature",
"recettealchimique", "musique", "chant", "danse", "jeu", "race",
"recettecuisine", "oeuvre", "meditation",
"queue", "ombre", "souffle", "tete", "casetmr", "sort", "sortreserve",
"nombreastral", "tache", "maladie", "poison", "possession",
"extraitpoetique", "empoignade"
"tarot", "extraitpoetique", "empoignade"
],
makeDefault: true
})
RdDItemSheetV1.register(RdDBlessureItemSheet)
RdDItemSheetV1.register(RdDConteneurItemSheet)
RdDItemSheetV1.register(RdDFauneItemSheet)
RdDItemSheetV1.register(RdDGemmeItemSheet)
RdDItemSheetV1.register(RdDHerbeItemSheet)
RdDItemSheetV1.register(RdDIngredientItemSheet)
RdDItemSheetV1.register(RdDPlanteItemSheet)
RdDItemSheetV1.register(RdDPotionItemSheet)
RdDItemSheetV1.register(RdDRencontreItemSheet)
RdDItemSheetV1.register(RdDServiceItemSheet)
RdDItemSheetV1.register(RdDSigneDraconiqueItemSheet)
RdDItemSheet.register(RdDBlessureItemSheet)
RdDItemSheet.register(RdDConteneurItemSheet)
RdDItemSheet.register(RdDFauneItemSheet)
RdDItemSheet.register(RdDGemmeItemSheet)
RdDItemSheet.register(RdDHerbeItemSheet)
RdDItemSheet.register(RdDIngredientItemSheet)
RdDItemSheet.register(RdDPlanteItemSheet)
RdDItemSheet.register(RdDPotionItemSheet)
RdDItemSheet.register(RdDRencontreItemSheet)
RdDItemSheet.register(RdDServiceItemSheet)
RdDItemSheet.register(RdDSigneDraconiqueItemSheet)
RdDJournalSheet.register()
// préparation des différents modules

View File

@ -268,7 +268,7 @@ export class RdDResolutionTable {
maxCarac = Math.min(maxCarac, minCarac + 20);
minLevel = Math.max(minLevel, -10);
maxLevel = Math.max(Math.min(maxLevel, 30), minLevel + colonnes);
return await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/resolution-table.hbs', {
return await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/resolution-table.hbs', {
carac: carac,
difficulte: level,
min: minLevel,

View File

@ -12,6 +12,6 @@ export class RdDRollResult {
static async buildRollDataHtml(rollData, template = 'chat-resultat-general.hbs') {
rollData.show = rollData.show || {};
return await foundry.applications.handlebars.renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/${template}`, rollData);
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/${template}`, rollData);
}
}

View File

@ -22,7 +22,7 @@ export class RdDRoll extends Dialog {
RdDRoll._ensureCorrectAction(action);
RdDRoll._setDefaultOptions(actor, rollData);
const html = await foundry.applications.handlebars.renderTemplate(dialogConfig.html, rollData);
const html = await renderTemplate(dialogConfig.html, rollData);
let options = { classes: ["rdd-roll-dialog"], width: 650, height: 'fit-content', 'z-index': 99999, close: html => { } };
if (dialogConfig.close) {
@ -344,7 +344,7 @@ export class RdDRoll extends Dialog {
/* -------------------------------------------- */
async buildAjustements(rollData) {
return await foundry.applications.handlebars.renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.hbs`, rollData);
return await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/partial-roll-ajustements.hbs`, rollData);
}
/* -------------------------------------------- */

View File

@ -3,11 +3,11 @@ import { RdDItem } from "./item.js";
export class RdDSheetUtility {
static getOptions(document, editable) {
static mergeDocumentRights(options, document, editable) {
const userRightLevel = game.user.isGM
? CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
: document.getUserLevel(game.user);
return {
let newOptions = {
isGM: game.user.isGM,
isOwned: document.parent ? true : false,
editable: editable,
@ -16,15 +16,10 @@ export class RdDSheetUtility {
isObserver: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OBSERVER,
isOwner: userRightLevel >= CONST.DOCUMENT_OWNERSHIP_LEVELS.OWNER
}
}
static mergeDocumentRights(options, document, editable) {
const newOptions = RdDSheetUtility.getOptions(document, editable);
foundry.utils.mergeObject(options, newOptions);
return options;
}
static getItem(event, actor) {
return actor.items.get(RdDSheetUtility.getItemId(event))
}

View File

@ -47,7 +47,7 @@ export class RdDTMRDialog extends Dialog {
static async create(actor, tmrData) {
await PixiTMR.init()
let html = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.hbs', tmrData);
let html = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/dialog-tmr.hbs', tmrData);
if (tmrData.mode != 'visu' && !game.user.isGM) {
ChatMessage.create({ content: actor.name + " est monté dans les TMR en mode : " + tmrData.mode, whisper: ChatUtility.getGMs() });
}
@ -508,7 +508,7 @@ export class RdDTMRDialog extends Dialog {
ChatMessage.create({
whisper: ChatUtility.getOwners(this.actor),
content: await foundry.applications.handlebars.renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-rencontre-tmr.hbs`, rencData)
content: await renderTemplate(`systems/foundryvtt-reve-de-dragon/templates/chat-rencontre-tmr.hbs`, rencData)
});
this.$updateValuesDisplay();

View File

@ -14,8 +14,8 @@ export class RdDTokenHud {
/* -------------------------------------------- */
static async removeExtensionHud(app, html, tokenId) {
$(html).find('.control-icon.rdd-combat').remove();
$(html).find('.control-icon.rdd-initiative').remove();
html.find('.control-icon.rdd-combat').remove();
html.find('.control-icon.rdd-initiative').remove();
}
/* -------------------------------------------- */
@ -50,7 +50,7 @@ export class RdDTokenHud {
{ name: 'Initiative +1', command: 'inc', value: 0.01 },
{ name: 'Initiative -1', command: 'dec', value: -0.01 }]
};
const controlIconCombat = $(html).find('.control-icon[data-action=combat]');
const controlIconCombat = html.find('.control-icon[data-action=combat]');
await RdDTokenHud._configureSubMenu(controlIconCombat,
'systems/foundryvtt-reve-de-dragon/templates/hud-actor-init.hbs',
hudData,
@ -69,7 +69,7 @@ export class RdDTokenHud {
static async addExtensionHudCombat(html, combatant, token, actions) {
const hudData = { combatant, token, actions, commandes: [] };
const controlIconTarget = $(html).find('.control-icon[data-action=target]');
const controlIconTarget = html.find('.control-icon[data-action=target]');
await RdDTokenHud._configureSubMenu(controlIconTarget, 'systems/foundryvtt-reve-de-dragon/templates/hud-actor-attaque.hbs', hudData,
(event) => {
const actionIndex = event.currentTarget.attributes['data-action-index']?.value;
@ -112,7 +112,7 @@ export class RdDTokenHud {
/* -------------------------------------------- */
static async addTokenHudExtensions(app, html, tokenId) {
const controlIconCombat = $(html).find('.control-icon[data-action=combat]');
const controlIconCombat = html.find('.control-icon[data-action=combat]');
if (controlIconCombat.length > 0) {
controlIconCombat.click(event => {
if (event.currentTarget.className.includes('active')) {

View File

@ -349,7 +349,7 @@ export class RdDUtility {
Handlebars.registerHelper('typeTmr-name', type => TMRUtility.typeTmrName(type));
Handlebars.registerHelper('effetRencontre-name', coord => TMRUtility.typeTmrName(coord));
foundry.applications.handlebars.loadTemplates(templatePaths);
loadTemplates(templatePaths);
}
static getItem(itemId, actorId = undefined) {
@ -733,14 +733,14 @@ export class RdDUtility {
RdDTextEditor.registerChatCallbacks(html)
// Gestion spécifique message passeurs
$(html).on("click", '.tmr-passeur-coord a', event => {
html.on("click", '.tmr-passeur-coord a', event => {
let coord = event.currentTarget.attributes['data-tmr-coord'].value;
let actorId = event.currentTarget.attributes['data-actor-id'].value;
let actor = game.actors.get(actorId);
actor.tmrApp.positionnerDemiReve(coord);
});
// Gestion spécifique des sorts en réserve multiples (ie têtes)
$(html).on("click", '.declencher-sort-reserve', event => {
html.on("click", '.declencher-sort-reserve', event => {
let coord = event.currentTarget.attributes['data-tmr-coord'].value;
let sortId = event.currentTarget.attributes['data-sort-id'].value;
let actorId = event.currentTarget.attributes['data-actor-id'].value;
@ -750,7 +750,7 @@ export class RdDUtility {
});
// gestion bouton tchat Possession
$(html).on("click", '.defense-possession', event => {
html.on("click", '.defense-possession', event => {
let attackerId = event.currentTarget.attributes['data-attackerId'].value
let defenderId = event.currentTarget.attributes['data-defenderId'].value
let possessionId = event.currentTarget.attributes['data-possessionId'].value
@ -758,16 +758,16 @@ export class RdDUtility {
});
// gestion bouton tchat Acheter
$(html).on("click", '.button-acheter', event => {
html.on("click", '.button-acheter', event => {
const venteData = DialogItemAchat.preparerAchat(event.currentTarget);
if (venteData) {
DialogItemAchat.onAcheter(venteData);
}
});
$(html).on("click", '.button-creer-acteur', event => RdDNameGen.onCreerActeur(event));
html.on("click", '.button-creer-acteur', event => RdDNameGen.onCreerActeur(event));
// Gestion du bouton payer
$(html).on("click", '.payer-button', event => {
html.on("click", '.payer-button', event => {
let sommeAPayer = Number(event.currentTarget.attributes['data-somme-a-payer']?.value ?? 0);
let actor = RdDUtility.getSelectedActor("Pour effectuer le paiement:");
if (actor) {
@ -775,8 +775,8 @@ export class RdDUtility {
ChatUtility.removeChatMessageId(RdDUtility.findChatMessageId(event.currentTarget));
}
});
$(html).on("click", '.rdd-world-content-link', async event => {
const htmlElement = $(html).find(event.currentTarget);
html.on("click", '.rdd-world-content-link', async event => {
const htmlElement = html.find(event.currentTarget);
const id = htmlElement?.data("id");
const doctype = htmlElement?.data("doctype");
switch (doctype ?? 'Item') {

View File

@ -75,7 +75,7 @@ export class OptionsAvancees extends FormApplication {
}
activateListeners(html) {
$(html).find(".select-option").click((event) => {
html.find(".select-option").click((event) => {
if (event.currentTarget.attributes.name) {
let id = event.currentTarget.attributes.name.value
let isChecked = event.currentTarget.checked
@ -88,3 +88,4 @@ export class OptionsAvancees extends FormApplication {
this.close()
}
}

View File

@ -112,7 +112,7 @@ export class ReglesOptionnelles extends FormApplication {
}
activateListeners(html) {
$(html).find(".select-option").click((event) => {
html.find(".select-option").click((event) => {
if (event.currentTarget.attributes.name) {
let id = event.currentTarget.attributes.name.value;
let isChecked = event.currentTarget.checked;
@ -125,3 +125,4 @@ export class ReglesOptionnelles extends FormApplication {
this.close();
}
}

View File

@ -131,7 +131,7 @@ export class StatusEffects extends FormApplication {
}
activateListeners(html) {
$(html).find(".select-effect").click((event) => {
html.find(".select-effect").click((event) => {
let id = event.currentTarget.attributes.name?.value;
if (id) {
let selected = StatusEffects._getUseStatusEffects();
@ -151,3 +151,4 @@ export class StatusEffects extends FormApplication {
this.close();
}
}

View File

@ -184,7 +184,7 @@ export class SystemCompendiums extends FormApplication {
}
activateListeners(html) {
$(html).find("select.system-compendium-setting").change((event) => {
html.find("select.system-compendium-setting").change((event) => {
const compendium = $(event.currentTarget).data('compendium')
const value = $(event.currentTarget).val();
const systemCompendium = CONFIGURABLE_COMPENDIUMS[compendium];

View File

@ -9,7 +9,7 @@ export class DialogChateauDormant extends Dialog {
motifStress: `Nuit du ${date}`,
finChateauDormant: game.system.rdd.calendrier.getTimestampFinChateauDormant()
};
const html = await foundry.applications.handlebars.renderTemplate("systems/foundryvtt-reve-de-dragon/templates/sommeil/dialog-chateau-dormant.hbs",
const html = await renderTemplate("systems/foundryvtt-reve-de-dragon/templates/sommeil/dialog-chateau-dormant.hbs",
dialogData);
new DialogChateauDormant(dialogData, html)
@ -36,7 +36,7 @@ export class DialogChateauDormant extends Dialog {
activateListeners(html) {
super.activateListeners(html);
this.html = $(html);
this.html = html;
this.html.find('input.sommeil-insomnie').change(event => this.onInsomnie(event));
this._activateListenerOnActorMoral(this.html);
}

View File

@ -102,7 +102,7 @@ export class TMRRencontres {
/* -------------------------------------------- */
async $chatRolledRencontre(row, rencontre, tmr) {
const flavorContent = await foundry.applications.handlebars.renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-compendium-table-roll-rencontre.hbs',
const flavorContent = await renderTemplate('systems/foundryvtt-reve-de-dragon/templates/chat-compendium-table-roll-rencontre.hbs',
{
roll: row.roll,
rencontre,
@ -113,7 +113,7 @@ export class TMRRencontres {
});
const messageData = {
user: game.user.id,
type: CONST.CHAT_MESSAGE_STYLES.ROLL,
type: CONST.CHAT_MESSAGE_TYPES.ROLL,
roll: row.roll,
sound: CONFIG.sounds.dice,
content: flavorContent

View File

@ -3,9 +3,9 @@ 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/assets/ui/tmr-v1.webp";
const TMR_V2 = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v2.webp";
const TMR_V3_COULEUR = "systems/foundryvtt-reve-de-dragon/assets/ui/tmr-v3-couleur.webp";
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 {

View File

@ -106,9 +106,9 @@ export class DialogFatigueVoyage extends Dialog {
activateListeners(html) {
if (this.html == undefined) {
$(html).find('select[name="code-terrain"]').trigger("focus")
html.find('select[name="code-terrain"]').trigger("focus")
}
this.html = $(html);
this.html = html;
super.activateListeners(html);
this.html.find('select[name="code-terrain"]').change(event => this.changeParameters())

View File

@ -1,37 +1,15 @@
{
"name": "foundryvtt-reve-de-dragon",
"description": "<h2><em>Rêve de Dragon</em> pour Foundry Virtual TableTop</h2>",
"private": true,
"version": "1.0.0",
"license": "Creative Commons",
"main": "gulpfile.js",
"scripts": {
"build": "npx vite build",
"gulp": "gulp",
"run": "npx vite serve",
"packCompendiumsToDist": "node ./tools/packCompendiumsToDist.mjs",
"packCompendiumsToPublic": "node ./tools/packCompendiumsToPublic.mjs",
"unpackCompendiumsFromPublic": "node ./tools/unpackCompendiumsFromPublic.mjs"
},
"devDependencies": {
"@eslint/js": "^9.8.0",
"@foundryvtt/foundryvtt-cli": "^1.0.3",
"commander": "^11.1.0",
"eslint": "^9.9.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-jsdoc": "^48.11.0",
"eslint-plugin-prettier": "^5.2.1",
"globals": "^15.9.0",
"less": "^4.1.3",
"prettier": "^3.3.3"
"@foundryvtt/foundryvtt-cli": "^1.0.3"
},
"dependencies": {
"gulp": "^5.0.0",
"gulp-less": "^5.0.0",
"rollup-plugin-visualizer": "^5.12.0"
},
"repository": {
"type": "git",
"url": "https://www.uberwald.me/gitea/public/foundryvtt-reve-de-dragon.git"
}
}

View File

@ -2,7 +2,7 @@ name: Terres médianes du rêve
type: script
scope: global
author: Hp9ImM4o9YRTSdfu
img: systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg
img: systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg
command: |-
const selected = game.system.rdd.RdDUtility.getSelectedActor();
if (!selected) {
@ -18,8 +18,8 @@ command: |-
title: `Monter dans les TMR`,
content: `Monter dans les TMR`,
buttons: {
normale: { label: `normale`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg" alt="Montée dans les Terres M&eacute;dianes !"/>`, callback: () => selected.displayTMR("normal") },
rapide: { label: `rapide`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres M&eacute;dianes !"/>`, callback: () => selected.displayTMR("rapide") },
normale: { label: `normale`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" alt="Montée dans les Terres M&eacute;dianes !"/>`, callback: () => selected.displayTMR("normal") },
rapide: { label: `rapide`, icon: `<img class="button-img" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" alt="Montée accélérée dans les Terres M&eacute;dianes !"/>`, callback: () => selected.displayTMR("rapide") },
},
});

View File

@ -5,7 +5,7 @@ sort: 0
pages:
- name: 'Figure: Documentation MJ/Joueurs'
type: image
src: systems/foundryvtt-reve-de-dragon/assets/logo.webp
src: systems/foundryvtt-reve-de-dragon/styles/img/logo.webp
title:
show: false
level: 1
@ -94,9 +94,9 @@ pages:
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/bones.svg" width="25" height="30" /> Encaisser des dommages</li>
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/regen.svg" width="25" height="30" /> Remise à neuf (Uniquement pour le MJ) pour enlever toutes les blessures/états du personnage.</li>
<li><img style="background-color:purple;vertical-align:middle" src="icons/svg/sleep.svg" width="25" height="30" /> Le sommeil (dormir une heure, une nuit, gris rêve)</li>
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-normal.svg" width="25" height="30" /> Montée dans les Terres Médianes</li>
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-rapide.svg" width="25" height="30" /> Montée rapide</li>
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/assets/ui/icon-tmr-view.svg" width="25" height="30" /> Regarder ses terres médianes (sans monter)</li>
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-normal.svg" width="25" height="30" /> Montée dans les Terres Médianes</li>
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-rapide.svg" width="25" height="30" /> Montée rapide</li>
<li><img style="background-color:purple;vertical-align:middle" src="systems/foundryvtt-reve-de-dragon/styles/img/ui/icon-tmr-view.svg" width="25" height="30" /> Regarder ses terres médianes (sans monter)</li>
</ul>
<h1>Combat</h1>
<p>Pour l'initiative et les attaques, des options sont disponibles
@ -171,7 +171,7 @@ pages:
<li>Les retours que vous nous ferez via <a href="https://discord.gg/pPSDNJk">discord</a>
(channel #rêve-de-dragon) ;-)</li>
</ul>
<p><img style="border:0;display:block;margin-left:auto;margin-right:auto" src="systems/foundryvtt-reve-de-dragon/assets/rdd_pause.webp" width="210" height="216" /></p>
<p><img style="border:0;display:block;margin-left:auto;margin-right:auto" src="systems/foundryvtt-reve-de-dragon/styles/img/rdd_pause.webp" width="210" height="216" /></p>
_id: p0xOSy6tZwU4DOq5
image: {}
video:

View File

@ -5,7 +5,7 @@ sort: 0
pages:
- name: 'Figure: Passeur fou'
type: image
src: systems/foundryvtt-reve-de-dragon/assets/ui/tmp_main_r1.webp
src: systems/foundryvtt-reve-de-dragon/styles/img/ui/tmp_main_r1.webp
title:
show: false
level: 1

View File

@ -5,7 +5,7 @@ sort: 0
pages:
- name: 'Figure: Tourbillon rouge'
type: image
src: systems/foundryvtt-reve-de-dragon/assets/ui/tmp_main_r1.webp
src: systems/foundryvtt-reve-de-dragon/styles/img/ui/tmp_main_r1.webp
title:
show: false
level: 1

View File

@ -1,6 +1,6 @@
name: Rêve de Dragon
type: rencontre
img: systems/foundryvtt-reve-de-dragon/assets/rdd_pause.webp
img: systems/foundryvtt-reve-de-dragon/styles/img/rdd_pause.webp
system:
description: ''
descriptionmj: ''

View File

@ -38,7 +38,7 @@ regions: []
ownership:
default: 0
background:
src: systems/foundryvtt-reve-de-dragon/assets/ecran_rdd.webp
src: systems/foundryvtt-reve-de-dragon/styles/img/ecran_rdd.webp
offsetX: 0
offsetY: 0
anchorX: 0

4
styles/img/.directory Normal file
View File

@ -0,0 +1,4 @@
[Dolphin]
Timestamp=2020,11,21,13,59,38
Version=4
VisibleRoles=Details_text,Details_size,Details_modificationtime,Details_creationtime,CustomizedDetails

View File

Before

Width:  |  Height:  |  Size: 193 KiB

After

Width:  |  Height:  |  Size: 193 KiB

View File

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

View File

Before

Width:  |  Height:  |  Size: 163 KiB

After

Width:  |  Height:  |  Size: 163 KiB

View File

Before

Width:  |  Height:  |  Size: 103 KiB

After

Width:  |  Height:  |  Size: 103 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 8.2 KiB

After

Width:  |  Height:  |  Size: 8.2 KiB

View File

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 16 KiB

View File

Before

Width:  |  Height:  |  Size: 13 KiB

After

Width:  |  Height:  |  Size: 13 KiB

View File

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

View File

Before

Width:  |  Height:  |  Size: 716 KiB

After

Width:  |  Height:  |  Size: 716 KiB

View File

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 36 KiB

View File

Before

Width:  |  Height:  |  Size: 6.0 KiB

After

Width:  |  Height:  |  Size: 6.0 KiB

View File

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 40 KiB

View File

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

5
styles/img/ui/.directory Normal file
View File

@ -0,0 +1,5 @@
[Dolphin]
HeaderColumnWidths=634,87,118
Timestamp=2020,6,10,17,19,0
Version=4
ViewMode=1

View File

Before

Width:  |  Height:  |  Size: 3.7 KiB

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

Before

Width:  |  Height:  |  Size: 3.8 KiB

After

Width:  |  Height:  |  Size: 3.8 KiB

View File

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

Before

Width:  |  Height:  |  Size: 6.6 KiB

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

Before

Width:  |  Height:  |  Size: 3.3 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

Before

Width:  |  Height:  |  Size: 5.0 KiB

After

Width:  |  Height:  |  Size: 5.0 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

Some files were not shown because too many files have changed in this diff Show More